From 0ed7cfa534a0c99d7f5ffd0a87b0b8d18e081d96 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 29 Aug 2021 19:04:58 +0100 Subject: [PATCH] Add use cmake GNUInstallDirs module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment install target installs libraries and pkgconfig fiels in $(prefix)/lib which is not right path on 64bit systems. This patch fixes that by add use cmake GNUInstallDirs module. Signed-off-by: Tomasz Kłoczko --- DevIL/CMakeLists.txt | 2 ++ DevIL/src-IL/CMakeLists.txt | 8 ++++---- DevIL/src-ILU/CMakeLists.txt | 8 ++++---- DevIL/src-ILUT/CMakeLists.txt | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/DevIL/CMakeLists.txt b/DevIL/CMakeLists.txt index e342f93d..5f3f4f53 100644 --- a/DevIL/CMakeLists.txt +++ b/DevIL/CMakeLists.txt @@ -4,6 +4,8 @@ project(ImageLib) # include our custom modules set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") +include(GNUInstallDirs) + add_subdirectory(src-IL) add_subdirectory(src-ILU) add_subdirectory(src-ILUT) diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt index 3cda85cf..e087f423 100644 --- a/DevIL/src-IL/CMakeLists.txt +++ b/DevIL/src-IL/CMakeLists.txt @@ -311,14 +311,14 @@ configure_file( pkgconfig/IL.pc.cmake.in # Installation install (TARGETS IL - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install (FILES ../include/IL/il.h DESTINATION include/IL) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/IL.pc - DESTINATION lib/pkgconfig + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt index 44b9531b..0b506fae 100644 --- a/DevIL/src-ILU/CMakeLists.txt +++ b/DevIL/src-ILU/CMakeLists.txt @@ -75,14 +75,14 @@ endif(UNICODE) # Installation install (TARGETS ILU - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install (FILES ../include/IL/ilu.h DESTINATION include/IL) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ILU.pc - DESTINATION lib/pkgconfig + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt index 63662bc6..edc49586 100644 --- a/DevIL/src-ILUT/CMakeLists.txt +++ b/DevIL/src-ILUT/CMakeLists.txt @@ -95,14 +95,14 @@ endif(UNICODE) # Installation install (TARGETS ILUT - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install (FILES ../include/IL/ilut.h DESTINATION include/IL) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ILUT.pc - DESTINATION lib/pkgconfig + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )