diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-07 15:44:20 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-07 15:44:20 +0200 |
commit | f98dcfc2360302753f9a8bf66ee8ccfe4366f0e7 (patch) | |
tree | a068abf3a21781f0a6450fc0fabdc606c1a4ddfb /tracker-rs/CMakeLists.txt | |
parent | 5f5ca66c58ad30d0c218b2da904aa3f722e18ebe (diff) |
tracker/rs: use static linkage
There's no reason not to link statically the impl library.
As suggested by @ph0b, use subdirs for each arch. This helps with object
file clobber.
Diffstat (limited to 'tracker-rs/CMakeLists.txt')
-rw-r--r-- | tracker-rs/CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tracker-rs/CMakeLists.txt b/tracker-rs/CMakeLists.txt index b624bdfc..adde1dde 100644 --- a/tracker-rs/CMakeLists.txt +++ b/tracker-rs/CMakeLists.txt @@ -1,12 +1,14 @@ if(WIN32) opentrack_boilerplate(opentrack-tracker-rs) if(opentrack-64bit) - set(suffix _amd64) + set(subdir amd64) else() - set(suffix "") + set(subdir ia32) endif() - target_link_libraries(opentrack-tracker-rs "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl${suffix}.lib") - install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl${suffix}.dll" DESTINATION . ${opentrack-perms}) + set(libpath "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/${subdir}/rs-impl.lib") + add_custom_target(opentrack-tracker-rs-impl DEPENDS ${libpath}) + add_dependencies(opentrack-tracker-rs opentrack-tracker-rs-impl) + target_link_libraries(opentrack-tracker-rs "${libpath}" advapi32) install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/intel_rs_sdk_runtime_websetup_10.0.26.0396.exe" DESTINATION ./contrib/ ${opentrack-perms}) install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/RS_EULA.rtf" DESTINATION ./contrib/ ${opentrack-perms}) endif() |