added installing of cmake configure files to CMakeLists.txt

* added yaml-cpp-{config,version,targets}.cmake to bet installed into
    lib/cmake/yaml-cpp/ so other cmake projects can find the necessary
    files for building.
This commit is contained in:
Noah Harvey 2015-11-25 09:57:38 -05:00
parent 03d6e7d672
commit c7fe4de253

View File

@ -317,6 +317,15 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in
"${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY)
install(
FILES
"${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"
"${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
"${PROJECT_BINARY_DIR}/yaml-cpp-targets.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/yaml-cpp/"
)
if(UNIX)
set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc)
configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)