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})