diff options
author | willson-chen <53104026+willson-chen@users.noreply.github.com> | 2019-10-27 07:06:26 +0800 |
---|---|---|
committer | Mike Frysinger <vapier@gmail.com> | 2019-10-26 16:06:26 -0700 |
commit | d19cf8354ccbac6f4d9e2ac4406ab205a77f4bb2 (patch) | |
tree | d9ee0c0afc408c5d40a32e923dbeb0dce662fa3b /cmake | |
parent | 746ec81f079fe506d5ccb1fa1d1f90f3a31873f7 (diff) | |
download | libgd-d19cf8354ccbac6f4d9e2ac4406ab205a77f4bb2.tar.gz |
CMakeLists.txt: Exclude libm dependency under win
* CMakeLists.txt: Exclude libm dependency under win
* CMakeLists.txt: Move win32/m logic into cmake/modules/gd.cmake
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/gd.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/modules/gd.cmake b/cmake/modules/gd.cmake index bef21f9..963b4ae 100644 --- a/cmake/modules/gd.cmake +++ b/cmake/modules/gd.cmake @@ -7,7 +7,11 @@ MACRO(ADD_GD_TESTS) FOREACH(test_name ${TESTS_FILES}) SET(test_prog_name "test_${TEST_PREFIX}_${test_name}") add_executable(${test_prog_name} "${test_name}.c") - target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + IF(WIN32) + target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + ELSE(WIN32) + target_link_libraries (${test_prog_name} gdTest m ${ARGV0}) + ENDIF(WIN32) add_test(NAME ${test_prog_name} COMMAND ${test_prog_name}) ENDFOREACH(test_name) ENDMACRO(ADD_GD_TESTS) |