From ebd06067a49669eeab0ac9e8bc430fd6f8fd9ab0 Mon Sep 17 00:00:00 2001 From: Evan Todd Date: Wed, 19 Aug 2015 23:03:08 -0400 Subject: [PATCH] Remove "m" library dependency on Windows. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bf8e34..3245a4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,11 +8,15 @@ file(GLOB HEADERS cJSON.h) set(SOURCES cJSON.c) add_library(${PROJ_CJSON} STATIC ${HEADERS} ${SOURCES}) -target_link_libraries(${PROJ_CJSON} m) +if (NOT WIN32) + target_link_libraries(${PROJ_CJSON} m) +endif() add_library(${PROJ_CJSON}.shared SHARED ${HEADERS} ${SOURCES}) set_target_properties(${PROJ_CJSON}.shared PROPERTIES OUTPUT_NAME cJSON) -target_link_libraries(${PROJ_CJSON}.shared m) +if (NOT WIN32) + target_link_libraries(${PROJ_CJSON}.shared m) +endif() set(PROJ_CJSON_UTILS cJSON_utils)