Merge topic 'simplify-osx-install-prefix'
73dcba51
Simplify logic to compute install prefix in OS X CMake.app
This commit is contained in:
commit
4411d1d779
|
@ -543,10 +543,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||||
"${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
|
"${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
|
||||||
set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
|
set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
# make sure CMAKE_INSTALL_PREFIX ends in /
|
# make sure CMAKE_INSTALL_PREFIX ends in /
|
||||||
string(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
|
if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$")
|
||||||
math(EXPR LEN "${LEN} -1" )
|
|
||||||
string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
|
|
||||||
if(NOT "${ENDCH}" STREQUAL "/")
|
|
||||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_INSTALL_PREFIX
|
set(CMAKE_INSTALL_PREFIX
|
||||||
|
|
Loading…
Reference in New Issue