Commit d17016e76cac6784ccbf244b2cf22213d1e3e00e
Committed by
GitHub
1 parent
2d2372d5
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>
Showing
2 changed files
with
3 additions
and
3 deletions
CMakeLists.txt
| @@ -197,14 +197,14 @@ if(CLI11_INSTALL) | @@ -197,14 +197,14 @@ if(CLI11_INSTALL) | ||
| 197 | 197 | ||
| 198 | # Make version available in the install | 198 | # Make version available in the install |
| 199 | install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake" | 199 | install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake" |
| 200 | - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CLI11") | 200 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/CLI11") |
| 201 | 201 | ||
| 202 | # Install the export target as a file | 202 | # Install the export target as a file |
| 203 | install( | 203 | install( |
| 204 | EXPORT CLI11Targets | 204 | EXPORT CLI11Targets |
| 205 | FILE CLI11Config.cmake | 205 | FILE CLI11Config.cmake |
| 206 | NAMESPACE CLI11:: | 206 | NAMESPACE CLI11:: |
| 207 | - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CLI11") | 207 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/CLI11") |
| 208 | 208 | ||
| 209 | # Use find_package on the installed package | 209 | # Use find_package on the installed package |
| 210 | export( | 210 | export( |
cmake/CLI11GeneratePkgConfig.cmake
| 1 | configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY) | 1 | configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY) |
| 2 | 2 | ||
| 3 | -install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") | 3 | +install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig") |