From d1af4a3cdb4beb60490c5548f677928340684db0 Mon Sep 17 00:00:00 2001 From: Zopolis4 Date: Thu, 7 Mar 2024 11:24:51 +1100 Subject: [PATCH] Use GNUInstallDirs to set installation directories --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb32254bd..14b6d2219 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,11 @@ SET (VERSION_REVISION ${CMAKE_MATCH_1}) SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}) LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") +include(GNUInstallDirs) SET (prefix ${CMAKE_INSTALL_PREFIX}) -SET (exec_prefix "\${prefix}") -SET (libdir "\${exec_prefix}/lib") -SET (includedir "\${prefix}/include") +SET (exec_prefix ${CMAKE_INSTALL_PREFIX}) +SET (libdir ${CMAKE_INSTALL_LIBDIR}) +SET (includedir ${CMAKE_INSTALL_INCLUDEDIR}) OPTION (MSGPACK_32BIT "32bit compile" OFF)