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 f30b0a2..b95fd62 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 ()
 
 #-----------------------------------------------------------------------