diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1babdcfd654..7f69baa0d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() |