## Version, for display in title bar.
## Will add r<revision number> to the end if svnversion is available.
-SET(SUPERTUX_VERSION "0.3.2-SVN")
+SET(SUPERTUX_VERSION "0.3.3-SVN")
### CMake configuration
INCLUDE(ConfigureChecks)
-## Create config.h and version.h
-
-configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
-include_directories (${CMAKE_BINARY_DIR}/)
-
## Also execute instructions in src/squirrel/CMakeLists.txt
ADD_SUBDIRECTORY(external/squirrel)
## Some additional include paths
+include_directories (${CMAKE_BINARY_DIR}/)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src/)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/include/)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/)
## Build miniswig and generate miniswig wrapper
-OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG})
+OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" OFF)
IF(GENERATE_WRAPPER)
ADD_SUBDIRECTORY(tools/miniswig)
ADD_CUSTOM_COMMAND(
## Debug options
OPTION(WERROR "Stop on first compiler warning" OFF)
-OPTION(WARNINGS "Enable long list of warnings for compiler to check" ${DEBUG})
+OPTION(WARNINGS "Enable long list of warnings for compiler to check" OFF)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "Debug flags")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE STRING "Debug flags")
REMOVE_DEFINITIONS(-Werror)
ENDIF(WERROR)
IF(WARNINGS)
- ADD_DEFINITIONS(-fdiagnostics-show-option -pedantic -Wno-long-long -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector -Wconversion -Wundef -Wsign-conversion -Wshadow -Winline -Wunsafe-loop-optimizations -Wfloat-equal -Wswitch-default -Wswitch-enum -Wcast-qual -Wsign-promo -Woverloaded-virtual -Wmissing-format-attribute -Wstrict-overflow=5 -Wformat=2-Weffc++ -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel)
+ ADD_DEFINITIONS(-fdiagnostics-show-option -pedantic -Wno-long-long -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector -Wconversion -Wundef -Wsign-conversion -Wshadow -Winline -Wunsafe-loop-optimizations -Wfloat-equal -Wswitch-default -Wswitch-enum -Wcast-qual -Wsign-promo -Woverloaded-virtual -Wmissing-format-attribute -Wstrict-overflow=5 -Wformat=2-Weffc++ -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wno-unused-parameter)
# -ansi fails in MinGW
# still left: -Wold-style-cast -Wpadded
ENDIF(WARNINGS)
## If xgettext is available, generate messages.pot for sources
-OPTION(GENERATE_MESSAGESPOT "Generate messages.pot files" ${DEBUG})
+OPTION(GENERATE_MESSAGESPOT "Generate messages.pot files" OFF)
IF(GENERATE_MESSAGESPOT)
MARK_AS_ADVANCED(
XGETTEXT_EXECUTABLE
SET(INSTALL_SUBDIR_SHARE "data" CACHE STRING "Installation subdir for data")
SET(INSTALL_SUBDIR_DOC "." CACHE STRING "Installation subdir for docs")
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SDL.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/SDL_image.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/iconv.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/libogg-0.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/libphysfs-1-0-0.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/OpenAl32.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/wrap_oal.dll
- ${CMAKE_CURRENT_SOURCE_DIR}/libcurl-4.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+ FILE(GLOB DLLS "${CMAKE_CURRENT_SOURCE_DIR}/*.dll")
+ INSTALL(FILES ${DLLS} DESTINATION ${INSTALL_SUBDIR_BIN})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.png ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.ico DESTINATION ".")
data/locale
DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+## Create config.h now that INSTALL_SUBDIR_* have been set.
+
+configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
+
## CPack/Installation-specific stuff
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "3")
-SET(CPACK_PACKAGE_VERSION_PATCH "2-SVN")
+SET(CPACK_PACKAGE_VERSION_PATCH "3-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)