Put generated files in library_config subdirectory

This commit is contained in:
Max Bruckner 2017-04-12 21:49:36 +02:00
parent 609bb75421
commit 8fd46d51b1
5 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ if (NOT WIN32)
target_link_libraries("${CJSON_LIB}" m) target_link_libraries("${CJSON_LIB}" m)
endif() endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcjson.pc.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" @ONLY)
install(FILES cJSON.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cjson") install(FILES cJSON.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cjson")
@ -130,7 +130,7 @@ 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("${CMAKE_CURRENT_SOURCE_DIR}/libcjson_utils.pc.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson_utils.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc" @ONLY)
install(TARGETS "${CJSON_UTILS_LIB}" DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${CJSON_UTILS_LIB}") install(TARGETS "${CJSON_UTILS_LIB}" DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${CJSON_UTILS_LIB}")
@ -149,10 +149,10 @@ endif()
# create the other package config files # create the other package config files
configure_file( configure_file(
cJSONConfig.cmake.in "${CMAKE_CURRENT_SOURCE_DIR}/library_config/cJSONConfig.cmake.in"
${PROJECT_BINARY_DIR}/cJSONConfig.cmake @ONLY) ${PROJECT_BINARY_DIR}/cJSONConfig.cmake @ONLY)
configure_file( configure_file(
cJSONConfigVersion.cmake.in "${CMAKE_CURRENT_SOURCE_DIR}/library_config/cJSONConfigVersion.cmake.in"
${PROJECT_BINARY_DIR}/cJSONConfigVersion.cmake @ONLY) ${PROJECT_BINARY_DIR}/cJSONConfigVersion.cmake @ONLY)
# Install package config files # Install package config files