[cmake-commits] hoffman committed CMakeLists.txt 1.11 1.12 QCMake.cxx
1.19 1.20 QtDialogCPack.cmake.in 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Feb 16 13:05:05 EST 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv18681/Source/QtDialog
Modified Files:
CMakeLists.txt QCMake.cxx QtDialogCPack.cmake.in
Log Message:
ENH: support for cpack and install of cmake-gui as mac app bundle
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- CMakeLists.txt 12 Feb 2008 22:22:55 -0000 1.11
+++ CMakeLists.txt 16 Feb 2008 18:05:03 -0000 1.12
@@ -54,10 +54,15 @@
ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
+ IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
+ SET(CMAKE_INSTALL_DESTINATION_ARGS
+ BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
+ ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# if qt is not static and we are on windows then skip the install
# I don't want to distribute qt dlls
IF(CMAKE_PACKAGE_QTGUI)
- INSTALL_TARGETS(/bin cmake-gui)
+ INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin
+ ${CMAKE_INSTALL_DESTINATION_ARGS})
ENDIF(CMAKE_PACKAGE_QTGUI)
ENDIF(NOT QT4_FOUND)
Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- QCMake.cxx 15 Feb 2008 20:36:16 -0000 1.19
+++ QCMake.cxx 16 Feb 2008 18:05:03 -0000 1.20
@@ -34,13 +34,19 @@
QDir execDir(QCoreApplication::applicationDirPath());
#if defined(Q_OS_MAC)
- execDir.cd("../../../");
+ if(execDir.exists("../bin/cmake"))
+ {
+ execDir.cd("../bin");
+ }
+ else
+ {
+ execDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment)
+ }
#endif
QString cmakeCommand = QString("cmake")+cmSystemTools::GetExecutableExtension();
cmakeCommand = execDir.filePath(cmakeCommand);
-
cmSystemTools::DisableRunCommandOutput();
cmSystemTools::SetRunCommandHideConsole(true);
cmSystemTools::SetErrorCallback(QCMake::errorCallback, this);
Index: QtDialogCPack.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QtDialogCPack.cmake.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- QtDialogCPack.cmake.in 9 Feb 2008 14:53:52 -0000 1.1
+++ QtDialogCPack.cmake.in 16 Feb 2008 18:05:03 -0000 1.2
@@ -1,4 +1,13 @@
+SET(IS_APPLE @APPLE@)
SET(CMAKE_PACKAGE_QTGUI @CMAKE_PACKAGE_QTGUI@)
+
IF(CMAKE_PACKAGE_QTGUI)
SET(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "cmake-gui" "cmake-gui(beta)")
+IF(IS_APPLE)
+ # for apple install we set the install prefix to /Applications and then install
+ # cmake into the bundle for cmake-gui
+ SET(CPACK_SET_DESTDIR TRUE)
+ENDIF(IS_APPLE)
ENDIF(CMAKE_PACKAGE_QTGUI)
+
+
More information about the Cmake-commits
mailing list