mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
CMake: Use CMAKE_CURRENT_SOURCE/BINARY_DIR
This commit is contained in:
parent
3353062fc8
commit
b2283dab87
@ -31,12 +31,12 @@ if (NOT WIN32)
|
|||||||
target_link_libraries(${CJSON_LIB} m)
|
target_link_libraries(${CJSON_LIB} m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file("${cJSON_SOURCE_DIR}/libcjson.pc.in"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcjson.pc.in"
|
||||||
"${cJSON_BINARY_DIR}/libcjson.pc" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" @ONLY)
|
||||||
|
|
||||||
install(TARGETS ${CJSON_LIB} DESTINATION lib${LIB_SUFFIX})
|
install(TARGETS ${CJSON_LIB} DESTINATION lib${LIB_SUFFIX})
|
||||||
install(FILES cJSON.h DESTINATION include/cjson)
|
install(FILES cJSON.h DESTINATION include/cjson)
|
||||||
install (FILES ${cJSON_BINARY_DIR}/libcjson.pc DESTINATION lib/pkgconfig)
|
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc DESTINATION lib/pkgconfig)
|
||||||
|
|
||||||
set_target_properties(${CJSON_LIB}
|
set_target_properties(${CJSON_LIB}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -54,12 +54,12 @@ if(ENABLE_CJSON_UTILS)
|
|||||||
add_library(${CJSON_UTILS_LIB} ${HEADERS_UTILS} ${SOURCES_UTILS})
|
add_library(${CJSON_UTILS_LIB} ${HEADERS_UTILS} ${SOURCES_UTILS})
|
||||||
target_link_libraries(${CJSON_UTILS_LIB} ${CJSON_LIB})
|
target_link_libraries(${CJSON_UTILS_LIB} ${CJSON_LIB})
|
||||||
|
|
||||||
configure_file("${cJSON_SOURCE_DIR}/libcjson_utils.pc.in"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcjson_utils.pc.in"
|
||||||
"${cJSON_BINARY_DIR}/libcjson_utils.pc" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc" @ONLY)
|
||||||
|
|
||||||
install(TARGETS ${CJSON_UTILS_LIB} DESTINATION lib${LIB_SUFFIX})
|
install(TARGETS ${CJSON_UTILS_LIB} DESTINATION lib${LIB_SUFFIX})
|
||||||
install(FILES cJSON_Utils.h DESTINATION include/cjson)
|
install(FILES cJSON_Utils.h DESTINATION include/cjson)
|
||||||
install (FILES ${cJSON_BINARY_DIR}/libcjson_utils.pc DESTINATION lib/pkgconfig)
|
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc DESTINATION lib/pkgconfig)
|
||||||
|
|
||||||
set_target_properties(${CJSON_UTILS_LIB}
|
set_target_properties(${CJSON_UTILS_LIB}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
Loading…
Reference in New Issue
Block a user