cJSON: Option to disable exporting targets

This can be disabled when the exporting of the targets causes problems.
This commit is contained in:
Max Bruckner
2016-11-07 00:13:38 +07:00
parent 5838e279a5
commit c213f2eb58
2 changed files with 17 additions and 8 deletions

View File

@@ -9,16 +9,20 @@ get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
# The cJSON library
set(CJSON_LIBRARY "@CJSON_LIB@")
# Include the target
include("${_dir}/cjson.cmake")
if(@ENABLE_TARGET_EXPORT@)
# Include the target
include("${_dir}/cjson.cmake")
endif()
if(CJSON_UTILS_FOUND)
# The cJSON utils library
set(CJSON_UTILS_LIBRARY @CJSON_UTILS_LIB@)
# All cJSON libraries
set(CJSON_LIBRARIES "@CJSON_UTILS_LIB@" "@CJSON_LIB@")
# Include the target
include("${_dir}/cjson_utils.cmake")
if(@ENABLE_TARGET_EXPORT@)
# Include the target
include("${_dir}/cjson_utils.cmake")
endif()
else()
# All cJSON libraries
set(CJSON_LIBRARIES "@CJSON_LIB@")