From 9d8043ec3cff713a5a82c0e69620c9e404830b29 Mon Sep 17 00:00:00 2001 From: Kevin Tee Date: Sun, 17 Jan 2021 08:51:45 +0000 Subject: [PATCH] Update CMakeLists.txt Hi, I found some files went into lib, but I think that if it was build on 64 bit arch it should got to lib64. So I replace the hardcode lib path and let gnuinstalldir decide. I also replace bin and include dir. Let me know what you think. Kind regards --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9660f557..222451bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,7 +337,7 @@ IF (BUILD_TESTS) ENDIF() # Configuration -set(config_install_dir "lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}") +set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION}") set(include_install_dir "include") set(version_config "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake") set(project_config "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake") @@ -366,10 +366,10 @@ export(TARGETS opengv FILE "${CMAKE_CURRENT_BINARY_DIR}/${targets_export_name}.c # Targets: install(TARGETS opengv EXPORT "${targets_export_name}" - LIBRARY DESTINATION "lib" - ARCHIVE DESTINATION "lib" - RUNTIME DESTINATION "bin" - INCLUDES DESTINATION "${include_install_dir}") + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") # Config # * /lib/cmake/opengv/opengvConfig.cmake