Skip to content

Commit

Permalink
Only compile hsWindows.cpp on Windows
Browse files Browse the repository at this point in the history
The file was ifdef'ed out on non-Windows platforms, but it sometimes
causes linker warnings about the file having no symbols. Better to just
avoid compiling/linking it entirely on non-Windows platforms.
  • Loading branch information
dpogue committed Nov 6, 2023
1 parent fd5115a commit cba2861
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Plasma/CoreLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(CoreLib_SOURCES
plLoadMask.cpp
plProduct.cpp
plViewTransform.cpp
hsWindows.cpp
$<$<PLATFORM_ID:Windows>:hsWindows.cpp>
)

if(CMAKE_USE_WIN32_THREADS_INIT)
Expand Down
4 changes: 0 additions & 4 deletions Sources/Plasma/CoreLib/hsWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ You can contact Cyan Worlds, Inc. by email [email protected]
*==LICENSE==*/

#ifdef HS_BUILD_FOR_WIN32

#include "HeadSpin.h"
#include "hsWindows.h"
#include <combaseapi.h>
Expand Down Expand Up @@ -93,5 +91,3 @@ const RTL_OSVERSIONINFOEXW& hsGetWindowsVersion()
}
return s_WinVer;
}

#endif

0 comments on commit cba2861

Please sign in to comment.