From c45fc1e4b3015a2f610c023a157f16277f2de701 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 4 Nov 2002 14:50:32 -0500 Subject: Attempt to automate apple gui generation --- Source/WXDialog/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ Templates/AppleInfo.plist | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Templates/AppleInfo.plist diff --git a/Source/WXDialog/CMakeLists.txt b/Source/WXDialog/CMakeLists.txt index 12bdefa..0787a2d 100644 --- a/Source/WXDialog/CMakeLists.txt +++ b/Source/WXDialog/CMakeLists.txt @@ -27,6 +27,34 @@ IF ( CMAKE_WX_CAN_COMPILE ) TARGET_LINK_LIBRARIES(wxCMakeSetup ${WXWINDOWS_LIBRARY}) TARGET_LINK_LIBRARIES(wxCMakeSetup CMakeLib) + IF(APPLE) + SET(APPLE_GUI_EXECUTABLE wxCMakeSetup) + SET(APPLE_GUI_INFO_STRING "CMake version 1.5.0, (c) 2002 Kitware Inc.") + SET(APPLE_GUI_IDENTIFIER "com.kitware.wxCMakeSetup") + SET(APPLE_GUI_LONG_VERSION_STRING "1.5.0, (c) 2002 Kitware Inc.") + SET(APPLE_GUI_BUNDLE_NAME "CMake") + SET(APPLE_GUI_SHORT_VERSION_STRING "1.5.0") + SET(APPLE_GUI_BUNDLE_VERSION "1.5.0") + SET(APPLE_GUI_COPYRIGHT "Copyright 2002 Kitware Inc.") + CONFIGURE_FILE(${CMAKE_ROOT}/Templates/AppleInfo.plist + ${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/Info.plist) + WRITE_FILE(${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/PkgInfo "APPL????") + + ADD_CUSTOM_COMMAND( + SOURCE wxCMakeSetup + COMMAND ${CMAKE_COMMAND} + ARGS -E copy + ${EXECUTABLE_OUTPUT_PATH}/wxCMakeSetup + ${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS/wxCMakeSetup + TARGET wxCMakeSetup) + ADD_CUSTOM_COMMAND( + SOURCE wxCMakeSetup + COMMAND ${CMAKE_COMMAND} + ARGS -E chdir ${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS + `${CMAKE_WX_CONFIG} --rezflags` + ${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS/wxCMakeSetup) + ENDIF(APPLE) + INSTALL_TARGETS(/bin wxCMakeSetup) IF(BUILD_TESTING) diff --git a/Templates/AppleInfo.plist b/Templates/AppleInfo.plist new file mode 100644 index 0000000..fe86f40 --- /dev/null +++ b/Templates/AppleInfo.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${APPLE_GUI_EXECUTABLE} + CFBundleGetInfoString + ${APPLE_GUI_INFO_STRING} + CFBundleIconFile + wxmac.icns + CFBundleIdentifier + ${APPLE_GUI_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + ${APPLE_GUI_LONG_VERSION_STRING} + CFBundleName + ${APPLE_GUI_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${APPLE_GUI_SHORT_VERSION_STRING} + CFBundleSignature + ???? + CFBundleVersion + ${APPLE_GUI_BUNDLE_VERSION} + CSResourcesFileMapped + + LSRequiresCarbon + + NSHumanReadableCopyright + ${APPLE_GUI_COPYRIGHT} + + -- cgit v0.12