diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 07:37:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 08:39:32 +0100 |
commit | aa066bdd4622d4f6824fee864f6be6806813f04d (patch) | |
tree | 3df328b8b364cba2373a85827191b259bd78d546 /protocol-wine/CMakeLists.txt | |
parent | d6a54431d178632a2bf466c9904f74abd143afe6 (diff) |
move to subdirectory-based build system
Closes #224
Diffstat (limited to 'protocol-wine/CMakeLists.txt')
-rw-r--r-- | protocol-wine/CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/protocol-wine/CMakeLists.txt b/protocol-wine/CMakeLists.txt new file mode 100644 index 00000000..682e50de --- /dev/null +++ b/protocol-wine/CMakeLists.txt @@ -0,0 +1,26 @@ +if(NOT WIN32) + set(SDK_WINE_PREFIX "" CACHE PATH "Wine install prefix") + set(SDK_WINE_NO_WRAPPER FALSE CACHE BOOL "disable Wine wrapper -- use Wine only for X-Plane") + if(SDK_WINE_PREFIX) + opentrack_boilerplate(opentrack-proto-wine) + target_link_libraries(opentrack-proto-wine opentrack-compat opentrack-csv) + if(NOT SDK_WINE_NO_WRAPPER) + set(my-rt -lrt) + if(APPLE) + set(my-rt) + endif() + file(GLOB wine-deps ${CMAKE_SOURCE_DIR}/ftnoir_protocol_wine/*.cxx) + add_custom_command( + OUTPUT opentrack-wrapper-wine.exe.so + DEPENDS ${wine-deps} + COMMAND ${SDK_WINE_PREFIX}/bin/wineg++ -g -DNOMINMAX -O2 -m32 -std=c++11 -o + opentrack-wrapper-wine.exe -I "${CMAKE_SOURCE_DIR}" + ${wine-deps} + ${my-rt}) + add_custom_target(wine-wrapper ALL DEPENDS opentrack-wrapper-wine.exe.so) + add_dependencies(opentrack-proto-wine wine-wrapper) + add_dependencies(wine-wrapper opentrack-compat) + install(FILES "${CMAKE_BINARY_DIR}/opentrack-wrapper-wine.exe.so" DESTINATION .) + endif() + endif() +endif() |