提交 affedd65 编写于 作者: K Kevin Branigan

Merge pull request #11 from etodd/win-math-lib-fix

Remove "m" library dependency on Windows.
...@@ -8,11 +8,15 @@ file(GLOB HEADERS cJSON.h) ...@@ -8,11 +8,15 @@ file(GLOB HEADERS cJSON.h)
set(SOURCES cJSON.c) set(SOURCES cJSON.c)
add_library(${PROJ_CJSON} STATIC ${HEADERS} ${SOURCES}) 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}) add_library(${PROJ_CJSON}.shared SHARED ${HEADERS} ${SOURCES})
set_target_properties(${PROJ_CJSON}.shared PROPERTIES OUTPUT_NAME cJSON) 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) set(PROJ_CJSON_UTILS cJSON_utils)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册