Skip to content

Commit

Permalink
Install pkgconfig and cmake files into arch-dependent locations (jbed…
Browse files Browse the repository at this point in the history
  • Loading branch information
tgurr authored and davemccann committed Jul 29, 2023
1 parent 8796fa6 commit b66851c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ set_target_properties(yaml-cpp PROPERTIES
PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}"
DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")

# FIXME(felix2012): A more common place for the cmake export would be
# `CMAKE_INSTALL_LIBDIR`, as e.g. done in ubuntu or in this project for GTest
set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp")
set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp")
set(EXPORT_TARGETS yaml-cpp)
configure_package_config_file(
"${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in"
Expand Down Expand Up @@ -175,7 +173,7 @@ if (YAML_CPP_INSTALL)
"${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
DESTINATION "${CONFIG_EXPORT_DIR}")
install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc"
DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
unset(CONFIG_EXPORT_DIR)

Expand Down

0 comments on commit b66851c

Please sign in to comment.