rapidjson
rapidjson copied to clipboard
Export into the build tree the installed targets
Currently the CMake is modifying the CMake user's package registry by doing:
# Export package for use from the build tree
EXPORT( PACKAGE ${PROJECT_NAME} )
the above hints the binary directory as a path to find a config dir. Accordingly the config is set up and made available via:
INCLUDE(CMakePackageConfigHelpers)
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
unfortunately the config file reference the targets which are not installed in the build tree. This makes projects that find RapidJSON using the user's package registry (it must be disabled on purpose) fail because the target file cannot be found. This pull request exports the targets installed.