From 12cc3b05b9bcfb39dd7c895bb1c415381f392dd9 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 13 May 2021 12:57:52 +0200 Subject: [PATCH] Fixed an issue where CMAKE_INSTALL_PREFIX was not cached. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5c2f7531..4e16a95de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,11 +197,11 @@ endif() if(NOT WIN32 AND NOT APPLE) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CMAKE_INSTALL_PREFIX "/usr") + set(CMAKE_INSTALL_PREFIX "/usr" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") - set(CMAKE_INSTALL_PREFIX "/usr/pkg") + set(CMAKE_INSTALL_PREFIX "/usr/pkg" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") else() - set(CMAKE_INSTALL_PREFIX "/usr/local") + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") endif() endif() message("-- Installation prefix is set to " ${CMAKE_INSTALL_PREFIX})