diff options
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 084c441..1ffcadc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,8 +103,8 @@ if(NOT FMOD_FUNCTION_EXISTS) target_link_libraries(libucode m) endif() -set(CMAKE_REQUIRED_INCLUDES ${JSONC_INCLUDE_DIRS}) -set(CMAKE_REQUIRED_LIBRARIES ${JSONC_LINK_LIBRARIES}) +list(APPEND CMAKE_REQUIRED_INCLUDES ${JSONC_INCLUDE_DIRS}) +list(APPEND CMAKE_REQUIRED_LIBRARIES ${JSONC_LINK_LIBRARIES}) check_symbol_exists(json_tokener_get_parse_end "json-c/json.h" HAVE_PARSE_END) if(HAVE_PARSE_END) add_definitions(-DHAVE_PARSE_END) @@ -117,8 +117,6 @@ check_symbol_exists(json_object_new_uint64 "json-c/json.h" HAVE_JSON_UINT64) if(HAVE_JSON_UINT64) add_definitions(-DHAVE_JSON_UINT64) endif() -unset(CMAKE_REQUIRED_INCLUDES) -unset(CMAKE_REQUIRED_LIBRARIES) set(LIBRARIES "") @@ -237,11 +235,10 @@ if(ULOOP_SUPPORT) add_library(uloop_lib MODULE lib/uloop.c) set_target_properties(uloop_lib PROPERTIES OUTPUT_NAME uloop PREFIX "") target_link_options(uloop_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS}) - set(CMAKE_REQUIRED_LIBRARIES ${libubox}) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${libubox}) check_function_exists(uloop_timeout_remaining64 REMAINING64_FUNCTION_EXISTS) check_function_exists(uloop_interval_set INTERVAL_FUNCTION_EXISTS) check_function_exists(uloop_signal_add SIGNAL_FUNCTION_EXISTS) - unset(CMAKE_REQUIRED_LIBRARIES) if(REMAINING64_FUNCTION_EXISTS) target_compile_definitions(uloop_lib PUBLIC HAVE_ULOOP_TIMEOUT_REMAINING64) endif() |