From 00cfa0ebed42b7daf2acbfe3297c5f630b570d4e Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Tue, 6 Nov 2007 23:00:23 -0500 Subject: ENH: For Mac OSX -- add app icon, and implement find of cmake executable. --- Source/QtDialog/CMakeLists.txt | 11 ++++++++--- Source/QtDialog/CMakeSetup.icns | Bin 0 -> 33452 bytes Source/QtDialog/QCMake.cxx | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 Source/QtDialog/CMakeSetup.icns diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 81c36cf..55fa412 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -28,10 +28,15 @@ ELSE(NOT QT4_FOUND) QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) SET(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS}) - IF(WIN32) + IF(Q_WS_WIN) SET(SRCS ${SRCS} CMakeSetup.rc) - ENDIF(WIN32) - # TODO Mac OS X icon + ENDIF(Q_WS_WIN) + IF(Q_WS_MAC) + SET(SRCS ${SRCS} CMakeSetup.icns) + SET(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns) + SET_SOURCE_FILES_PROPERTIES(CMakeSetup.icns PROPERTIES + MACOSX_PACKAGE_LOCATION Resources) + ENDIF(Q_WS_MAC) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Source/QtDialog/CMakeSetup.icns b/Source/QtDialog/CMakeSetup.icns new file mode 100644 index 0000000..8808dd6 Binary files /dev/null and b/Source/QtDialog/CMakeSetup.icns differ diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index e826527..0621aaf 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -35,7 +35,8 @@ QCMake::QCMake(QObject* p) #if defined(Q_OS_WIN) this->CMakeExecutable = appDir.filePath("cmake.exe"); #elif defined(Q_OS_MAC) -# error "need to implement for Mac OS X" + appDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment) + this->CMakeExecutable = appDir.filePath("cmake"); #else this->CMakeExecutable = appDir.filePath("cmake"); #endif -- cgit v0.12