Attempt to automate apple gui generation

This commit is contained in:
Andy Cedilnik 2002-11-04 14:50:32 -05:00
parent a9df6fdd8e
commit c45fc1e4b3
2 changed files with 64 additions and 0 deletions

View File

@ -27,6 +27,34 @@ IF ( CMAKE_WX_CAN_COMPILE )
TARGET_LINK_LIBRARIES(wxCMakeSetup ${WXWINDOWS_LIBRARY}) TARGET_LINK_LIBRARIES(wxCMakeSetup ${WXWINDOWS_LIBRARY})
TARGET_LINK_LIBRARIES(wxCMakeSetup CMakeLib) 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) INSTALL_TARGETS(/bin wxCMakeSetup)
IF(BUILD_TESTING) IF(BUILD_TESTING)

36
Templates/AppleInfo.plist Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${APPLE_GUI_EXECUTABLE}</string>
<key>CFBundleGetInfoString</key>
<string>${APPLE_GUI_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>wxmac.icns</string>
<key>CFBundleIdentifier</key>
<string>${APPLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${APPLE_GUI_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${APPLE_GUI_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${APPLE_GUI_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${APPLE_GUI_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${APPLE_GUI_COPYRIGHT}</string>
</dict>
</plist>