1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 12:43:52 +00:00

fix(build): relocate cmake and pkgconfig files to an arch-independent path (#635)

* Relocate cmake and pkgconfig files to an arch-independent path

Use CMAKE_INSTALL_DATADIR instead of CMAKE_INSTALL_LIBDIR for
installing the pkgconfig and cmake files.

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>

* style: pre-commit.ci fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jose Luis Rivero 2021-08-23 05:51:30 +02:00 committed by GitHub
parent 2d2372d596
commit d17016e76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -197,14 +197,14 @@ if(CLI11_INSTALL)
# Make version available in the install # Make version available in the install
install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake" install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CLI11") DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/CLI11")
# Install the export target as a file # Install the export target as a file
install( install(
EXPORT CLI11Targets EXPORT CLI11Targets
FILE CLI11Config.cmake FILE CLI11Config.cmake
NAMESPACE CLI11:: NAMESPACE CLI11::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CLI11") DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/CLI11")
# Use find_package on the installed package # Use find_package on the installed package
export( export(

View File

@ -1,3 +1,3 @@
configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY) configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY)
install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")