From: Christoph Sommer Date: Sun, 25 Nov 2007 11:52:35 +0000 (+0000) Subject: First tries w/ CMake on OS X X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=68822da3a2633e67c8fc4ebc96507a79d47eced3;p=supertux.git First tries w/ CMake on OS X SVN-Revision: 5189 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 10dbd5af6..a47a0b2c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ MARK_AS_ADVANCED( APPDATADIR ) OPTION(ENABLE_BINRELOC "Enable autopackage's BINRELOC features" OFF) -SET(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "APPDATADIR for autopackage's BINRELOC features") +SET(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/games" CACHE STRING "APPDATADIR for autopackage's BINRELOC features") ## Check endianess @@ -304,7 +304,6 @@ IF(WIN32 AND NOT UNIX) SET(INSTALL_SUBDIR_BIN ".") SET(INSTALL_SUBDIR_SHARE "data/") SET(INSTALL_SUBDIR_DOC ".") - SET(INSTALL_SUBDIR_ICONS ".") INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/SDL.dll DESTINATION ${INSTALL_SUBDIR_BIN}) INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/SDL_image.dll DESTINATION ${INSTALL_SUBDIR_BIN}) @@ -315,20 +314,36 @@ IF(WIN32 AND NOT UNIX) INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/wrap_oal.dll DESTINATION ${INSTALL_SUBDIR_BIN}) INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/libcurl-4.dll DESTINATION ${INSTALL_SUBDIR_BIN}) + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.ico DESTINATION ".") + ELSE(WIN32 AND NOT UNIX) +IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + SET(INSTALL_SUBDIR_BIN "SuperTux.app/Contents/MacOS/") + SET(INSTALL_SUBDIR_SHARE "SuperTux.app/Contents/Resources/data/") + SET(INSTALL_SUBDIR_DOC "SuperTux.app/Contents/Resources/") + + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/tools/darwin/info.plist DESTINATION "SuperTux.app/Contents/") + + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.icns DESTINATION "SuperTux.app/Contents/Resources/") + +ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET(INSTALL_SUBDIR_BIN "games/") SET(INSTALL_SUBDIR_SHARE "share/games/supertux2/") SET(INSTALL_SUBDIR_DOC "share/doc/supertux2/") - SET(INSTALL_SUBDIR_ICONS "share/pixmaps/") - INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/supertux2.desktop DESTINATION share/applications) + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/supertux2.desktop DESTINATION "share/applications") + + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.xpm DESTINATION "share/pixmaps/") +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ENDIF(WIN32 AND NOT UNIX) INSTALL(TARGETS supertux2 DESTINATION ${INSTALL_SUBDIR_BIN}) -INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.xpm DESTINATION ${INSTALL_SUBDIR_ICONS}) + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/INSTALL ${SUPERTUX_SOURCE_DIR}/README ${SUPERTUX_SOURCE_DIR}/COPYING ${SUPERTUX_SOURCE_DIR}/WHATSNEW.txt DESTINATION ${INSTALL_SUBDIR_DOC}) + INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt ${SUPERTUX_SOURCE_DIR}/data/camera.cfg DESTINATION ${INSTALL_SUBDIR_SHARE}) INSTALL(DIRECTORY data/images DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE) INSTALL(DIRECTORY data/levels DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE) @@ -344,8 +359,12 @@ INSTALL(DIRECTORY data/locale DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SuperTux") SET(CPACK_PACKAGE_VENDOR "SuperTux Devel Team") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "${SUPERTUX_SOURCE_DIR}/README") -SET(CPACK_RESOURCE_FILE_LICENSE "${SUPERTUX_SOURCE_DIR}/COPYING") +IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # The OS X PackageMaker doesn't seem to like files with no extension +ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + SET(CPACK_PACKAGE_DESCRIPTION_FILE "${SUPERTUX_SOURCE_DIR}/README") + SET(CPACK_RESOURCE_FILE_LICENSE "${SUPERTUX_SOURCE_DIR}/COPYING") +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET(CPACK_PACKAGE_VERSION_MAJOR "0") SET(CPACK_PACKAGE_VERSION_MINOR "3") SET(CPACK_PACKAGE_VERSION_PATCH "1-SVN") diff --git a/data/images/engine/icons/supertux.icns b/data/images/engine/icons/supertux.icns new file mode 100644 index 000000000..81a50c3ee Binary files /dev/null and b/data/images/engine/icons/supertux.icns differ diff --git a/tools/darwin/info.plist b/tools/darwin/info.plist new file mode 100644 index 000000000..61f7c0138 --- /dev/null +++ b/tools/darwin/info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + supertux2 + CFBundleIconFile + supertux + CFBundleIdentifier + de.berlios.supertux + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SuperTux + CFBundlePackageType + APPL + CFBundleSignature + STUX + CFBundleVersion + 0.3.1-SVN + NSMainNibFile + SDLMain + NSPrincipalClass + NSApplication + +