diff options
author | Christian Beier <dontmind@freeshell.org> | 2017-02-21 17:20:10 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2017-02-21 17:20:10 +0100 |
commit | f21825bac0cc60efb300fe0edaf351c48adb1fb1 (patch) | |
tree | 9c3527538a0167e7547262a4ebb1dad3e9e59c61 | |
parent | a6c599a5fcd9e3a5c8f4a77e77b7af37c4f43707 (diff) | |
download | libtdevnc-f21825bac0cc60efb300fe0edaf351c48adb1fb1.tar.gz libtdevnc-f21825bac0cc60efb300fe0edaf351c48adb1fb1.zip |
CMake: add libm to tests only on Unix
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3afb28a..125155f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -472,6 +472,11 @@ endforeach(e ${LIBVNCCLIENT_EXAMPLES}) # # them tests # + +if(UNIX) + set(ADDITIONAL_TEST_LIBS m) +endif(UNIX) + set(SIMPLETESTS cargstest copyrecttest @@ -489,7 +494,7 @@ foreach(t ${SIMPLETESTS}) add_executable(test_${t} ${TESTS_DIR}/${t}.c) set_target_properties(test_${t} PROPERTIES OUTPUT_NAME ${t}) set_target_properties(test_${t} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test) - target_link_libraries(test_${t} vncserver vncclient m) + target_link_libraries(test_${t} vncserver vncclient ${ADDITIONAL_TEST_LIBS}) endforeach(t ${SIMPLETESTS}) if(FOUND_LIBJPEG_TURBO) @@ -502,7 +507,7 @@ if(FOUND_LIBJPEG_TURBO) ) set_target_properties(test_tjunittest PROPERTIES OUTPUT_NAME tjunittest) set_target_properties(test_tjunittest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test) - target_link_libraries(test_tjunittest vncserver vncclient m) + target_link_libraries(test_tjunittest vncserver vncclient ${ADDITIONAL_TEST_LIBS}) add_executable(test_tjbench ${TESTS_DIR}/tjbench.c @@ -515,7 +520,7 @@ if(FOUND_LIBJPEG_TURBO) ) set_target_properties(test_tjbench PROPERTIES OUTPUT_NAME tjbench) set_target_properties(test_tjbench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test) - target_link_libraries(test_tjbench vncserver vncclient m) + target_link_libraries(test_tjbench vncserver vncclient ${ADDITIONAL_TEST_LIBS}) endif(FOUND_LIBJPEG_TURBO) |