From d19cf8354ccbac6f4d9e2ac4406ab205a77f4bb2 Mon Sep 17 00:00:00 2001 From: willson-chen <53104026+willson-chen@users.noreply.github.com> Date: Sun, 27 Oct 2019 07:06:26 +0800 Subject: 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 --- cmake/modules/gd.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmake') 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) -- cgit v1.2.1