diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 16:00:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 16:00:25 +0200 |
commit | e481697ea6e156e456f3d51ba7c816ad4a908792 (patch) | |
tree | 5277231639a363dd17665ef6b7e76e88d3d1bf71 /CMakeLists.txt | |
parent | 490f3ddb79018d13182fc17bb92943bbe427643d (diff) |
Fix mingw-w64 cross-compile from Linux
Case-sensitivity and MSVC-isms bite again.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c5bed0f..ba4857a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,10 +342,10 @@ endif() if(WIN32 AND SDK_VJOY) include_directories(${SDK_VJOY}) add_library(opentrack-proto-vjoy SHARED ${opentrack-proto-vjoy-c} ${opentrack-proto-vjoy-moc} ${opentrack-proto-vjoy-uih} ${opentrack-proto-vjoy-rcc}) - target_link_libraries(opentrack-proto-vjoy ${MY_QT_LIBS} "${SDK_VJOY}/vjoy.lib") + target_link_libraries(opentrack-proto-vjoy ${MY_QT_LIBS} "${SDK_VJOY}/VJoy.dll") if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) SET_TARGET_PROPERTIES(opentrack-proto-vjoy - PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/posix-version-script.txt") + PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/posix-version-script.txt -Wl,--enable-stdcall-fixup") endif() endif() @@ -362,7 +362,7 @@ endif() add_library(opentrack-proto-simconnect SHARED ${opentrack-proto-simconnect-c} ${opentrack-proto-simconnect-moc} ${opentrack-proto-simconnect-uih} ${opentrack-proto-simconnect-rcc}) target_link_libraries(opentrack-proto-simconnect ${MY_QT_LIBS}) include_directories("${SDK_SIMCONNECT}/inc") - target_link_libraries(opentrack-proto-simconnect "${SDK_SIMCONNECT}/lib/simconnect.lib") + target_link_libraries(opentrack-proto-simconnect "${SDK_SIMCONNECT}/lib/SimConnect.lib") endif() add_library(opentrack-proto-freetrack SHARED ${opentrack-proto-freetrack-c} ${opentrack-proto-freetrack-moc} ${opentrack-proto-freetrack-uih} ${opentrack-proto-freetrack-rcc}) @@ -458,16 +458,19 @@ endif() endif() if(SDK_RIFT) - include_directories("${SDK_RIFT}/include") + include_directories("${SDK_RIFT}/Include") include_directories("${SDK_RIFT}/Src") add_library(opentrack-tracker-rift SHARED ${opentrack-tracker-rift-c} ${opentrack-tracker-rift-moc} ${opentrack-tracker-rift-uih} ${opentrack-tracker-rift-rcc}) target_link_libraries(opentrack-tracker-rift ${MY_QT_LIBS}) if(WIN32) - target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/lib/win32/libovr.lib" winmm.lib) + target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/Lib/Win32/libovr.lib" winmm.lib) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) SET_TARGET_PROPERTIES(opentrack-tracker-rift - PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/posix-version-script.txt") + PROPERTIES + LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/posix-version-script.txt" + COMPILE_FLAGS "-fno-strict-aliasing" + ) endif() endif() @@ -477,7 +480,13 @@ endif() add_library(opentrack-tracker-hydra SHARED ${opentrack-tracker-hydra-c} ${opentrack-tracker-hydra-moc} ${opentrack-tracker-hydra-uih} ${opentrack-tracker-hydra-rcc}) target_link_libraries(opentrack-tracker-hydra ${MY_QT_LIBS}) if(WIN32) - target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/lib/win32/release_static/sixense_s.lib" "${SDK_HYDRA}/lib/win32/release_static/sixense_utils_s.lib") + if(CMAKE_COMPILER_IS_GNUCXX) + target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/lib/win32/release_dll/sixense.lib" "${SDK_HYDRA}/lib/win32/release_dll/sixense_utils.lib") + install(FILES "${SDK_HYDRA}/bin/win32/release_dll/sixense.dll" "${SDK_HYDRA}/bin/win32/release_dll/sixense_utils.dll" + DESTINATION .) + else() + target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/lib/win32/release_static/sixense_s.lib" "${SDK_HYDRA}/lib/win32/release_static/sixense_utils_s.lib") + endif() endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) SET_TARGET_PROPERTIES(opentrack-tracker-hydra |