diff options
author | Sascha Montellese <sascha.montellese@gmail.com> | 2014-10-26 22:51:53 +0100 |
---|---|---|
committer | Sascha Montellese <sascha.montellese@gmail.com> | 2014-10-26 22:51:53 +0100 |
commit | 27a73772125b42cb45b9f8a15c18bb781f03d868 (patch) | |
tree | 822a7fff25aa36e966dc5a75e99f0e6aa4ac931d /project | |
parent | 441c632b23af6a0765b1ccb8795db901f3cf44cf (diff) | |
parent | fbe700b76e78524b4adeb319fc196f6f5ba676c6 (diff) |
Merge pull request #5577 from Montellese/cmake_install_prefix
cmake: handle cases when cmake has pre-initialized CMAKE_INSTALL_PREFIX
Diffstat (limited to 'project')
4 files changed, 4 insertions, 4 deletions
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt index 6593be5657..d62643d4f7 100644 --- a/project/cmake/addons/CMakeLists.txt +++ b/project/cmake/addons/CMakeLists.txt @@ -38,7 +38,7 @@ if(NOT WIN32) endif() endif() -if(NOT CMAKE_INSTALL_PREFIX) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/output/addons") endif() list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) diff --git a/project/cmake/addons/depends/CMakeLists.txt b/project/cmake/addons/depends/CMakeLists.txt index 5c4853497d..b801475eb4 100644 --- a/project/cmake/addons/depends/CMakeLists.txt +++ b/project/cmake/addons/depends/CMakeLists.txt @@ -14,7 +14,7 @@ endif() include(ExternalProject) -if(NOT CMAKE_INSTALL_PREFIX) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/../output/depends) else() file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) diff --git a/project/cmake/addons/depends/windows/CMakeLists.txt b/project/cmake/addons/depends/windows/CMakeLists.txt index e99cf0a8d5..9a71543202 100644 --- a/project/cmake/addons/depends/windows/CMakeLists.txt +++ b/project/cmake/addons/depends/windows/CMakeLists.txt @@ -10,7 +10,7 @@ endif() include(ExternalProject) -if(NOT CMAKE_INSTALL_PREFIX) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) message(FATAL_ERROR "CMAKE_INSTALL_PREFIX (${CMAKE_INSTALL_PREFIX}) is not a valid target directory.") else() file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) diff --git a/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt b/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt index 57d8a93065..404378a3e2 100644 --- a/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt +++ b/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt @@ -13,7 +13,7 @@ else() endif() get_filename_component(XBMCROOT "${XBMCROOT}" ABSOLUTE) -if(NOT CMAKE_INSTALL_PREFIX) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) message(FATAL_ERROR "CMAKE_INSTALL_PREFIX (${CMAKE_INSTALL_PREFIX}) is not a valid target directory.") else() file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) |