X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=CMakeLists.txt;h=c7079261fdd17bef72bc2cd9f95dc7ef3cf909e2;hb=20864f86fbdcdbdb0b326f25836fbd52e3ce284d;hp=e527a9c289b72c629eccca44de4ac7434093fb3c;hpb=4a0d0e39a3e00ab61bc3ee27111f7225cd934012;p=supertux.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e527a9c28..c7079261f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ PROJECT(SUPERTUX) ## Version, for display in title bar. ## Will add r to the end if svnversion is available. -SET(SUPERTUX_VERSION "0.3.2-SVN") +SET(SUPERTUX_VERSION "0.3.3-SVN") ### CMake configuration @@ -113,7 +113,7 @@ IF(SVNVERSION_EXECUTABLE) ADD_CUSTOM_TARGET(svnversion ALL cmake -E echo "#ifndef VERSION_H" > "${CMAKE_BINARY_DIR}/version.h.tmp" COMMAND cmake -E echo "#define VERSION_H" >> "${CMAKE_BINARY_DIR}/version.h.tmp" - COMMAND cmake -E echo_append "#define PACKAGE_VERSION \"${SUPERTUX_VERSION}r" >> "${CMAKE_BINARY_DIR}/version.h.tmp" + COMMAND cmake -E echo_append "#define PACKAGE_VERSION \"${SUPERTUX_VERSION} r" >> "${CMAKE_BINARY_DIR}/version.h.tmp" COMMAND svnversion -n ${CMAKE_CURRENT_SOURCE_DIR} >> "${CMAKE_BINARY_DIR}/version.h.tmp" COMMAND cmake -E echo "\"" >> "${CMAKE_BINARY_DIR}/version.h.tmp" COMMAND cmake -E echo "#endif" >> "${CMAKE_BINARY_DIR}/version.h.tmp" @@ -147,11 +147,6 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/src/addon/addon_manager. 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) @@ -162,6 +157,7 @@ LINK_DIRECTORIES(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/) @@ -185,7 +181,7 @@ ENDIF(HAVE_OPENGL) ## 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( @@ -223,7 +219,7 @@ ENDIF(COMPILE_AMALGATION) ## 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") @@ -237,7 +233,7 @@ IF(CMAKE_COMPILER_IS_GNUCC) 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) @@ -245,7 +241,7 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) ## 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 @@ -359,14 +355,8 @@ IF(WIN32 AND NOT UNIX) 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 ".") @@ -410,6 +400,10 @@ INSTALL(DIRECTORY data/images 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 @@ -433,7 +427,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 "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)