LIBRARY_OUTPUT_PATH
)
-
-## Some default settings
-
-OPTION(ENABLE_SQDBG "Build squirrel script interpreter with debugging options" FALSE)
-OPTION(ENABLE_OPENGL "Enable OpenGL support" TRUE)
-OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG})
-
-
## For autopackage
MARK_AS_ADVANCED(
ENABLE_BINRELOC
INCLUDE_DIRECTORIES(${SDLIMAGE_INCLUDE_DIR})
LINK_LIBRARIES(${SDLIMAGE_LIBRARY})
+OPTION(ENABLE_OPENGL "Enable OpenGL support" TRUE)
IF(ENABLE_OPENGL)
FIND_PACKAGE(OpenGL)
IF(${OPENGL_FOUND} STREQUAL "YES")
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)
+## Debug options
+
+OPTION(DEBUG "Build with debugging options" FALSE)
+OPTION(PROFILE "Build with profiling information" FALSE)
+IF(CMAKE_COMPILER_IS_GNUCC)
+ IF (DEBUG)
+ REMOVE_DEFINITIONS(-O2)
+ ADD_DEFINITIONS(-O0 -g -Wall -Werror)
+ ELSE (DEBUG)
+ ADD_DEFINITIONS(-O2)
+ REMOVE_DEFINITIONS(-O0 -g -Wall -Werror)
+ ENDIF (DEBUG)
+ IF (PROFILE)
+ ADD_DEFINITIONS(-pg)
+ ELSE (PROFILE)
+ REMOVE_DEFINITIONS(-pg)
+ ENDIF (PROFILE)
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
## Add in squirrel debug stuff
+OPTION(ENABLE_SQDBG "Build squirrel script interpreter with debugging options" FALSE)
IF(ENABLE_SQDBG)
include_directories (${SUPERTUX_SOURCE_DIR}/src/squirrel/)
FILE(GLOB SQDBG_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/squirrel/sqdbg/*.cpp)
## Build miniswig and generate miniswig wrapper
+OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG})
IF(GENERATE_WRAPPER)
ADD_SUBDIRECTORY(tools/miniswig)
ADD_CUSTOM_COMMAND(
ENDIF(GENERATE_WRAPPER)
IF(NOT EXISTS ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp)
- SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES})
+ SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp)
ENDIF(NOT EXISTS ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp)
## If xgettext is available, generate messages.pot for sources
# )
#ENDIF(${XGETTEXT} STREQUAL "XGETTEXT-NOTFOUND")
-
-## Debug options
-
-OPTION(DEBUG "Build with debugging options" FALSE)
-OPTION(PROFILE "Build with profiling information" FALSE)
-IF(CMAKE_COMPILER_IS_GNUCC)
- IF (DEBUG)
- REMOVE_DEFINITIONS(-O2)
- ADD_DEFINITIONS(-O0 -g -Wall -Werror)
- ELSE (DEBUG)
- ADD_DEFINITIONS(-O2)
- REMOVE_DEFINITIONS(-O0 -g -Wall -Werror)
- ENDIF (DEBUG)
- IF (PROFILE)
- ADD_DEFINITIONS(-pg)
- ELSE (PROFILE)
- REMOVE_DEFINITIONS(-pg)
- ENDIF (PROFILE)
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
-
## Some additional compiler switches
IF(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS(-fno-strict-aliasing)
## add additional compiler switches
ADD_DEFINITIONS(-include ${CMAKE_BINARY_DIR}/config.h)
+REMOVE_DEFINITIONS(-Wall)
+
+## Include paths to make generated files work
+
+INCLUDE_DIRECTORIES (${MINISWIG_SOURCE_DIR})
+
+## build list of source files
+
+FILE(GLOB MINISWIG_SOURCES RELATIVE ${MINISWIG_SOURCE_DIR} create_docu.cpp create_wrapper.cpp main.cpp tree.cpp xmlwriter.cpp)
## Add target for bison parser generation
DEPENDS lexer.ll ${MINISWIG_BINARY_DIR}/parser.hpp
)
-## Include paths to make generated files work
-
-INCLUDE_DIRECTORIES (${MINISWIG_SOURCE_DIR})
-
-## build list of source files
-
-FILE(GLOB MINISWIG_SOURCES RELATIVE ${MINISWIG_SOURCE_DIR} create_docu.cpp create_wrapper.cpp main.cpp tree.cpp xmlwriter.cpp)
-
## Add target for miniswig binary
ADD_EXECUTABLE(miniswig ${MINISWIG_SOURCES} ${MINISWIG_BINARY_DIR}/parser.cpp ${MINISWIG_BINARY_DIR}/lexer.cpp)