summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/CMakeLists.txt')
-rw-r--r--Stars45/CMakeLists.txt48
1 files changed, 35 insertions, 13 deletions
diff --git a/Stars45/CMakeLists.txt b/Stars45/CMakeLists.txt
index fd0f182..0232606 100644
--- a/Stars45/CMakeLists.txt
+++ b/Stars45/CMakeLists.txt
@@ -280,9 +280,6 @@ target_include_directories(
Stars45
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Opcode # FIXME: Opcode is badly injured.
- PUBLIC $ENV{DXSDK_DIR}/Include
- PUBLIC ${WINDOWSSDK_PATH}/um # FIXME: Resolve this with a Find module or even find out why is going wrong - most sources say that it should be guaranteed.
- PUBLIC ${WINDOWSSDK_PATH}/shared
)
target_precompile_headers(
Stars45
@@ -298,18 +295,43 @@ target_link_libraries(
PUBLIC Ogg::ogg
PUBLIC Png::png
PUBLIC Opcode # FIXME: Add opcode to a namespace.
- PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/Ws2_32.lib
- PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/Vfw32.lib
- PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/wsock32.lib
- PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/winmm.lib
- PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/version.lib
- PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dinput8.lib
- PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dsound.lib
- PUBLIC $ENV{DXSDK_DIR}/Lib/x86/d3d9.lib
- PUBLIC $ENV{DXSDK_DIR}/Lib/x86/d3dx9.lib
- PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dxguid.lib
)
target_compile_definitions(
Stars45
PRIVATE _ALLOW_KEYWORD_MACROS
)
+if(MSVC)
+ target_include_directories(
+ Stars45
+ PUBLIC $ENV{DXSDK_DIR}/Include
+ PUBLIC ${WINDOWSSDK_PATH}/um
+ PUBLIC ${WINDOWSSDK_PATH}/shared
+ )
+ target_link_libraries(
+ Stars45
+ PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/Ws2_32.lib
+ PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/Vfw32.lib
+ PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/wsock32.lib
+ PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/winmm.lib
+ PUBLIC ${WINDOWSSDK_LIBPATH}/um/x86/version.lib
+ PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dinput8.lib
+ PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dsound.lib
+ PUBLIC $ENV{DXSDK_DIR}/Lib/x86/d3d9.lib
+ PUBLIC $ENV{DXSDK_DIR}/Lib/x86/d3dx9.lib
+ PUBLIC $ENV{DXSDK_DIR}/Lib/x86/dxguid.lib
+ )
+else()
+ target_link_libraries(
+ Stars45
+ PUBLIC -l:libws2_32.a
+ PUBLIC -l:libvfw32.a
+ PUBLIC -l:libwsock32.a
+ PUBLIC -l:libwinmm.a
+ PUBLIC -l:libversion.a
+ PUBLIC -l:libdinput8.a
+ PUBLIC -l:libdsound.a
+ PUBLIC -l:libd3d9.a
+ PUBLIC -l:libd3dx9.a
+ PUBLIC -l:libdxguid.a
+ )
+endif()