]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
CMake: make default install prefix actually work
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 31 Jul 2017 10:58:16 +0000 (20:58 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 31 Jul 2017 10:58:16 +0000 (20:58 +1000)
CMakeLists.txt

index f30b0a2ea0df9f88c8720dd753a59f59c56bcd7b..b95fd6280666f98ccadccc6278402bc3da0cffde 100644 (file)
@@ -4,8 +4,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
 project(NetRadiant C CXX)
 option(BUILD_RADIANT "Build the gui" ON)
 
-if (NOT CMAKE_INSTALL_PREFIX)
-    set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install")
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+    set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE)
 endif ()
 
 #-----------------------------------------------------------------------