projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stack rocks without shanking.
[supertux.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
fedd77a
..
ee73e77
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-39,8
+39,12
@@
PROJECT(SUPERTUX)
### CMake configuration
### CMake configuration
-# allow building with old CMake. Use some bundled modules as a fallback
+# allow building with old CMake.
Set compatibility options.
Use some bundled modules as a fallback
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+IF(COMMAND cmake_policy)
+ CMAKE_POLICY(SET CMP0003 NEW)
+ENDIF(COMMAND cmake_policy)
+
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SUPERTUX_SOURCE_DIR}/mk/cmake)
# move some config clutter to the advanced section
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SUPERTUX_SOURCE_DIR}/mk/cmake)
# move some config clutter to the advanced section
@@
-128,19
+132,22
@@
ENDIF(CURL_FOUND)
#LINK_LIBRARIES(${ICONV_LIBRARY})
## Find revision of WC
#LINK_LIBRARIES(${ICONV_LIBRARY})
## Find revision of WC
-FIND_PACKAGE(Subversion)
-IF(Subversion_FOUND)
- Subversion_WC_INFO(${SUPERTUX_SOURCE_DIR} SUPERTUX)
+MARK_AS_ADVANCED(SVNVERSION_EXECUTABLE)
+FIND_PROGRAM(SVNVERSION_EXECUTABLE svnversion)
+IF(SVNVERSION_EXECUTABLE)
+ EXECUTE_PROCESS(COMMAND svnversion -n ${SUPERTUX_SOURCE_DIR}
+ OUTPUT_VARIABLE SUPERTUX_WC_REVISION)
SET(REVISION " r${SUPERTUX_WC_REVISION}")
SET(REVISION " r${SUPERTUX_WC_REVISION}")
-ENDIF(S
ubversion_FOUND
)
+ENDIF(S
VNVERSION_EXECUTABLE
)
## Check platform-dependent build options
INCLUDE(ConfigureChecks)
## Check platform-dependent build options
INCLUDE(ConfigureChecks)
-## Create config.h
+## Create config.h
and version.h
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
+configure_file(version.h.cmake ${CMAKE_BINARY_DIR}/version.h )
include_directories (${CMAKE_BINARY_DIR}/)
## Also execute instructions in src/squirrel/CMakeLists.txt
include_directories (${CMAKE_BINARY_DIR}/)
## Also execute instructions in src/squirrel/CMakeLists.txt
@@
-194,14
+201,24
@@
ENDIF(PRECOMPILE_HEADERS)
## Debug options
## Debug options
-OPTION(WERROR "Stops on first compiler warning in debug mode" ON)
+OPTION(DEBUG "Build with debugging options" ON)
+OPTION(WERROR "Stop on first compiler warning" ON)
IF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCC)
- ADD_DEFINITIONS(-Wall -Wextra)
+ ADD_DEFINITIONS(-Wall -Wextra -W)
+ IF (DEBUG)
+ REMOVE_DEFINITIONS(-O2)
+ ADD_DEFINITIONS(-O0 -g)
+ ELSE (DEBUG)
+ ADD_DEFINITIONS(-O2)
+ REMOVE_DEFINITIONS(-O0 -g)
+ ENDIF (DEBUG)
SET(CMAKE_CXX_FLAGS_PROFILE "-pg")
SET(CMAKE_C_FLAGS_PROFILE "-pg")
SET(CMAKE_LD_FLAGS_PROFILE "-pg")
IF(WERROR)
ADD_DEFINITIONS(-Werror)
SET(CMAKE_CXX_FLAGS_PROFILE "-pg")
SET(CMAKE_C_FLAGS_PROFILE "-pg")
SET(CMAKE_LD_FLAGS_PROFILE "-pg")
IF(WERROR)
ADD_DEFINITIONS(-Werror)
+ ELSE(WERROR)
+ REMOVE_DEFINITIONS(-Werror)
ENDIF(WERROR)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(WERROR)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
@@
-270,7
+287,7
@@
IF(GENERATE_MESSAGESPOT)
ADD_CUSTOM_COMMAND(
OUTPUT ${MESSAGES_POT_FILE}
COMMAND ${XGETTEXT_EXECUTABLE}
ADD_CUSTOM_COMMAND(
OUTPUT ${MESSAGES_POT_FILE}
COMMAND ${XGETTEXT_EXECUTABLE}
- ARGS --keyword="_:1" --language=Lisp --
sort-by-file --output=${MESSAGES_POT_FILE}
${SUPERTUX_LEVELS}
+ ARGS --keyword="_:1" --language=Lisp --
force-po --sort-by-file "--output=${MESSAGES_POT_FILE}"
${SUPERTUX_LEVELS}
DEPENDS ${SUPERTUX_LEVELS}
WORKING_DIRECTORY ${SUPERTUX_SOURCE_DIR}
COMMENT "Generating POT file ${MESSAGES_POT_FILE}"
DEPENDS ${SUPERTUX_LEVELS}
WORKING_DIRECTORY ${SUPERTUX_SOURCE_DIR}
COMMENT "Generating POT file ${MESSAGES_POT_FILE}"
@@
-390,6
+407,7
@@
INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/INSTALL ${SUPERTUX_SOURCE_DIR}/README ${SUP
INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt DESTINATION ${INSTALL_SUBDIR_SHARE})
INSTALL(DIRECTORY data/images DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
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/fonts 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)
INSTALL(DIRECTORY data/scripts 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)
INSTALL(DIRECTORY data/scripts DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)