summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-02-18 20:50:37 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-02-18 20:50:37 (GMT)
commita3781c85fcaee3f49b95e101317a19594f575c98 (patch)
tree302f5df770485a3ba526ed622746466f9ef0caf3 /CMakeLists.txt
parent001d7fa3485f29eda3cee02e43e96e34d8aee32e (diff)
downloadCMake-a3781c85fcaee3f49b95e101317a19594f575c98.zip
CMake-a3781c85fcaee3f49b95e101317a19594f575c98.tar.gz
CMake-a3781c85fcaee3f49b95e101317a19594f575c98.tar.bz2
ENH: install seems to be working for cmake-gui
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6d5921..2f9a655 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -419,8 +419,15 @@ IF(BUILD_QtDialog)
SET(CMAKE_INSTALL_SUBDIR
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_DATE}")
ENDIF(CMake_VERSION_DATE)
- SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SUBDIR}")
- SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SUBDIR}/cmake-gui.app/Contents")
+ # make sure CMAKE_INSTALL_PREFIX ends in /
+ STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
+ MATH(EXPR LEN "${LEN} -1" )
+ STRING(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
+ IF(NOT "${ENDCH}" STREQUAL "/")
+ SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
+ ENDIF(NOT "${ENDCH}" STREQUAL "/")
+ SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}${CMAKE_INSTALL_SUBDIR}")
+ SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}${CMAKE_INSTALL_SUBDIR}/cmake-gui.app/Contents")
ENDIF(APPLE)
SET(QT_NEED_RPATH FALSE)