X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=CMakeLists.txt;h=975c5f02973eb27cb013524f7e826ae6857bc617;hb=ec05b8e317929f2572f31896639947fb7200d0d0;hp=a47a0b2c3642d832e07a048ee4a36e1ee1d94e93;hpb=68822da3a2633e67c8fc4ebc96507a79d47eced3;p=supertux.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a47a0b2c3..975c5f029 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,12 +32,6 @@ # -# -# Open Issues: -# - none? -# - - ## Project name to use as command prefix PROJECT(SUPERTUX) @@ -56,6 +50,8 @@ MARK_AS_ADVANCED( CMAKE_INSTALL_PREFIX EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH + CMAKE_OSX_ARCHITECTURES + CMAKE_OSX_SYSROOT ) ## For autopackage @@ -64,7 +60,7 @@ MARK_AS_ADVANCED( APPDATADIR ) OPTION(ENABLE_BINRELOC "Enable autopackage's BINRELOC features" OFF) -SET(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/games" CACHE STRING "APPDATADIR for autopackage's BINRELOC features") +SET(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/games/supertux2" CACHE STRING "APPDATADIR where data files reside") ## Check endianess @@ -128,11 +124,11 @@ INCLUDE_DIRECTORIES(${PHYSFS_INCLUDE_DIR}) LINK_LIBRARIES(${PHYSFS_LIBRARY}) FIND_PACKAGE(CURL) -IF(${CURL_FOUND}) +IF(CURL_FOUND) INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR}) LINK_LIBRARIES(${CURL_LIBRARY}) SET(HAVE_LIBCURL TRUE) -ENDIF(${CURL_FOUND}) +ENDIF(CURL_FOUND) #FIND_PACKAGE(ICONV REQUIRED) #INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) @@ -216,22 +212,19 @@ ENDIF(NOT EXISTS ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp) OPTION(GENERATE_MESSAGESPOT "Generate messages.pot files" ${DEBUG}) IF(GENERATE_MESSAGESPOT) MARK_AS_ADVANCED( - XGETTEXT + XGETTEXT_EXECUTABLE ) - FIND_PROGRAM( - XGETTEXT - NAMES "xgettext" - PATHS "/usr/bin" - ) - IF(${XGETTEXT} STREQUAL "XGETTEXT-NOTFOUND") + FIND_PROGRAM(XGETTEXT_EXECUTABLE xgettext) + IF(NOT XGETTEXT_EXECUTABLE) MESSAGE(STATUS "Warning: xgettext not found - will not update messages.pot") - ELSE(${XGETTEXT} STREQUAL "XGETTEXT-NOTFOUND") - MESSAGE(STATUS "Found xgettext: ${XGETTEXT}") + ELSE(NOT XGETTEXT_EXECUTABLE) + MESSAGE(STATUS "Found xgettext: ${XGETTEXT_EXECUTABLE}") SET(MESSAGES_POT_FILE ${SUPERTUX_SOURCE_DIR}/data/locale/messages.pot) ADD_CUSTOM_COMMAND( OUTPUT ${MESSAGES_POT_FILE} - COMMAND "/usr/bin/xgettext" --keyword=_ --language=C++ --output=${MESSAGES_POT_FILE} ${SUPERTUX_SOURCES} + COMMAND ${XGETTEXT_EXECUTABLE} + ARGS --keyword=_ --language=C++ --output=${MESSAGES_POT_FILE} ${SUPERTUX_SOURCES} DEPENDS ${SUPERTUX_SOURCES} WORKING_DIRECTORY ${SUPERTUX_SOURCE_DIR} COMMENT "Generating POT file ${MESSAGES_POT_FILE}" @@ -243,15 +236,19 @@ IF(GENERATE_MESSAGESPOT) FOREACH(SUPERTUX_LEVEL_DIR ${SUPERTUX_LEVEL_DIRS}) FILE(GLOB SUPERTUX_LEVELS RELATIVE ${SUPERTUX_SOURCE_DIR} ${SUPERTUX_LEVEL_DIR}/*.stl ${SUPERTUX_LEVEL_DIR}/*.stwm ${SUPERTUX_LEVEL_DIR}/*.txt) + ## Do not add target if SUPERTUX_LEVELS is empty. This is needed for cmake <=2.4 + IF(SUPERTUX_LEVELS) SET(MESSAGES_POT_FILE ${SUPERTUX_SOURCE_DIR}/${SUPERTUX_LEVEL_DIR}/messages.pot) ADD_CUSTOM_COMMAND( OUTPUT ${MESSAGES_POT_FILE} - COMMAND "/usr/bin/xgettext" --keyword="_:1" --language=Lisp --sort-by-file --output=${MESSAGES_POT_FILE} ${SUPERTUX_LEVELS} + COMMAND ${XGETTEXT_EXECUTABLE} + ARGS --keyword="_:1" --language=Lisp --sort-by-file --output=${MESSAGES_POT_FILE} ${SUPERTUX_LEVELS} DEPENDS ${SUPERTUX_LEVELS} WORKING_DIRECTORY ${SUPERTUX_SOURCE_DIR} COMMENT "Generating POT file ${MESSAGES_POT_FILE}" ) LIST(APPEND MESSAGES_POT_FILES ${MESSAGES_POT_FILE}) + ENDIF(SUPERTUX_LEVELS) ENDFOREACH(SUPERTUX_LEVEL_DIR) @@ -260,7 +257,7 @@ IF(GENERATE_MESSAGESPOT) DEPENDS ${MESSAGES_POT_FILES} ) - ENDIF(${XGETTEXT} STREQUAL "XGETTEXT-NOTFOUND") + ENDIF(NOT XGETTEXT_EXECUTABLE) ENDIF(GENERATE_MESSAGESPOT) ## Some additional compiler switches @@ -268,6 +265,10 @@ IF(CMAKE_COMPILER_IS_GNUCC) ADD_DEFINITIONS(-fno-strict-aliasing) ENDIF(CMAKE_COMPILER_IS_GNUCC) +IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ADD_DEFINITIONS(-DMACOSX) +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ## On Windows, add an icon @@ -357,8 +358,17 @@ INSTALL(DIRECTORY data/locale DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" ## CPack/Installation-specific stuff INCLUDE(InstallRequiredSystemLibraries) -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SuperTux") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Jump'n'Run Game featuring Tux") SET(CPACK_PACKAGE_VENDOR "SuperTux Devel Team") +SET(CPACK_PACKAGE_CONTACT "SuperTux Devel Team ") +SET(CPACK_DEBIAN_PACKAGE_NAME "supertux2") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.5), libgcc1 (>= 1:4.1), libgl1-mesa-glx | libgl1, libogg0 (>= 1.1.3), libopenal0a, libphysfs-1.0-0, libsdl-image1.2 (>= 1.2.5), libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.1.2), libvorbis0a (>= 1.1.2), libvorbisfile3 (>= 1.1.2), libcurl3 (>= 7.16)") +SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completly redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/") +SET(CPACK_DEBIAN_PACKAGE_SECTION "games") +SET(CPACK_RPM_PACKAGE_NAME "supertux2") +SET(CPACK_RPM_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completly redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/") +SET(CPACK_RPM_PACKAGE_LICENSE "GNU General Public License (GPL)") +SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Games/Action/Arcade") 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") @@ -367,7 +377,7 @@ ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 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") +SET(CPACK_PACKAGE_VERSION_PATCH "2-SVN") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "SuperTux ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") SET(CPACK_PACKAGE_EXECUTABLES "..\\\\supertux2" "SuperTux ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") IF(WIN32 AND NOT UNIX)