X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=CMakeLists.txt;h=807b529a179571fe84138dfc68f9672148470314;hb=65d0d1559c7327b38a707adee1b37aa801cd10d5;hp=9f65048beebdcf94b56392cfb0d4a4b4ccd830ae;hpb=cbadcad8583475095a8430ba368d9dd1f30230a9;p=supertux.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f65048be..807b529a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,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") ## Check endianess @@ -158,19 +158,24 @@ include_directories (${SUPERTUX_SOURCE_DIR}/src/squirrel/include/) ## Build list of sources for supertux binary -FILE(GLOB SUPERTUX_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/*.cpp src/audio/*.cpp src/badguy/*.cpp src/binreloc/*.cpp src/control/*.cpp src/gui/*.cpp src/lisp/*.cpp src/math/*.cpp src/object/*.cpp src/physfs/*.cpp src/sprite/*.cpp src/tinygettext/*.cpp src/trigger/*.cpp src/video/*.cpp src/worldmap/*.cpp src/scripting/*.cpp src/obstack/*.c) +FILE(GLOB SUPERTUX_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/*.cpp src/audio/*.cpp src/badguy/*.cpp src/binreloc/*.cpp src/control/*.cpp src/gui/*.cpp src/lisp/*.cpp src/math/*.cpp src/object/*.cpp src/physfs/*.cpp src/sprite/*.cpp src/tinygettext/*.cpp src/trigger/*.cpp src/video/*.cpp src/worldmap/*.cpp src/scripting/*.cpp src/addon/*.cpp src/obstack/*.c) ## Debug options OPTION(DEBUG "Build with debugging options" OFF) OPTION(PROFILE "Build with profiling information" OFF) +OPTION(WERROR "Stops on first compiler warning in debug mode" ON) IF(CMAKE_COMPILER_IS_GNUCC) + ADD_DEFINITIONS(-Wall -W) IF (DEBUG) REMOVE_DEFINITIONS(-O2) - ADD_DEFINITIONS(-O0 -g -Wall -Werror) + ADD_DEFINITIONS(-O0 -g) + IF(WERROR) + ADD_DEFINITIONS(-Werror) + ENDIF(WERROR) ELSE (DEBUG) ADD_DEFINITIONS(-O2) - REMOVE_DEFINITIONS(-O0 -g -Wall -Werror) + REMOVE_DEFINITIONS(-O0 -g) ENDIF (DEBUG) IF (PROFILE) ADD_DEFINITIONS(-pg) @@ -193,13 +198,15 @@ ENDIF(ENABLE_SQDBG) OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG}) IF(GENERATE_WRAPPER) ADD_SUBDIRECTORY(tools/miniswig) + FILE(GLOB GENERATE_WRAPPER_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/scripting/*.?pp) + LIST(REMOVE_ITEM GENERATE_WRAPPER_SOURCES "src/scripting/wrapper.cpp" "src/scripting/wrapper.hpp") ADD_CUSTOM_COMMAND( OUTPUT ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp COMMAND cd ${SUPERTUX_SOURCE_DIR} && ${CMAKE_CXX_COMPILER} ARGS -x "c++" -E -CC -DSCRIPTING_API src/scripting/wrapper.interface.hpp -o ${SUPERTUX_BINARY_DIR}/miniswig.tmp COMMAND tools/miniswig/miniswig ARGS --input miniswig.tmp --output-cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp --output-hpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp --module supertux --select-namespace Scripting - DEPENDS src/scripting/wrapper.interface.hpp tools/miniswig/miniswig + DEPENDS ${GENERATE_WRAPPER_SOURCES} tools/miniswig/miniswig ) ENDIF(GENERATE_WRAPPER) @@ -345,7 +352,7 @@ INSTALL(TARGETS supertux2 DESTINATION ${INSTALL_SUBDIR_BIN}) 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(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt 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) INSTALL(DIRECTORY data/music DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE) @@ -358,12 +365,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)") -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_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 completely 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 completely 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") @@ -372,7 +384,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)