Only do the portable fix on linux - thanks to Martijn Berger for
authorAntony Riakiotakis <kalast@gmail.com>
Thu, 13 Nov 2014 13:10:30 +0000 (14:10 +0100)
committerAntony Riakiotakis <kalast@gmail.com>
Thu, 13 Nov 2014 13:10:37 +0000 (14:10 +0100)
noticing!

CMakeLists.txt

index 1babdcfd6541335dfcc6e5c740c432dbcaf7376d..7f69baa0d2fbd8abc702b22f4ea67cc776072197 100644 (file)
@@ -378,14 +378,16 @@ endif()
 
 # By default we want to install to the directory we are compiling our executables
 # unless specified otherwise, which we currently do not allow
-IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WITH_INSTALL_PORTABLE)
-if(MSVC)
-       set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE )
-elseif(APPLE)
-       set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE )
-else()
-       set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH} CACHE PATH "default install path" FORCE )
-endif()
+IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+       if(MSVC)
+               set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE )
+       elseif(APPLE)
+               set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE )
+       else()
+               if (WITH_INSTALL_PORTABLE)
+                       set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH} CACHE PATH "default install path" FORCE )
+               endif()
+       endif()
 endif()