some cleanups to the file (sort it a little, fix comments, ...)

This commit is contained in:
Nils Kneuper 2008-05-05 21:06:14 +00:00
parent 302fa27237
commit 8953dea54b

View file

@ -5,7 +5,7 @@
# * some other smaller stuff
# * nice INSTALL howto
# use our own version of FindBoost.cmake
# use our own version of FindBoost.cmake and other Find* scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# find all deps needed
@ -14,7 +14,6 @@ FIND_PACKAGE( SDL_image 1.2 REQUIRED )
FIND_PACKAGE( SDL_mixer 1.2 REQUIRED )
FIND_PACKAGE( SDL_net REQUIRED )
FIND_PACKAGE( SDL_ttf 2.0.8 REQUIRED )
# setting python to a "must have" for the moment, can later on be changed to be optional
FIND_PACKAGE( PythonInterp 2.4 )
FIND_PACKAGE( PythonLibs 2.4 )
FIND_PACKAGE( Boost 1.33 REQUIRED COMPONENTS iostreams regex )
@ -32,6 +31,16 @@ set(PREFERENCES_DIR "" CACHE STRING "Use a non-default preferences directory (.w
set(GUI "normal" CACHE STRING "Set for GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0) or 320x240 (PDAs) (normal|small|tiny)")
option(ENABLE_GAME "Enable compilation of the game" ON)
option(ENABLE_CAMPAIGN_SERVER "Enable compilation of campaign server")
option(ENABLE_SERVER "Enable compilation of server" ON)
option(ENABLE_EDITOR "Enable compilation of map editor")
option(ENABLE_TOOLS "Enable building and installation of tools for artists and WML maintainers")
option(ENABLE_TESTS "Build unit tests")
option(ENABLE_PYTHON "Enable in-game python extensions" ON)
if(NOT WIN32)
if(IS_ABSOLUTE ${DATADIR})
add_definitions(-DWESNOTH_PATH='\"${DATADIR}\"')
@ -58,28 +67,17 @@ if(PREFERENCES_DIR)
message("set -DPREFERENCES_DIR='\"${PREFERENCES_DIR}\"'")
endif(PREFERENCES_DIR)
if(GUI STREQUAL "tiny")
add_definitions(-DUSE_TINY_GUI)
elseif(GUI STREQUAL "small")
add_definitions(-DUSE_SMALL_GUI)
endif(GUI STREQUAL "tiny")
option(ENABLE_GAME "Enable compilation of the game" ON)
option(ENABLE_CAMPAIGN_SERVER "Enable compilation of campaign server")
option(ENABLE_SERVER "Enable compilation of server" ON)
option(ENABLE_EDITOR "Enable compilation of map editor")
option(ENABLE_TOOLS "Enable building and installation of tools for artists and WML maintainers")
option(ENABLE_TESTS "Build unit tests")
option(ENABLE_PYTHON "Enable in-game python extensions" ON)
if(ENABLE_PYTHON AND PYTHON_LIBRARY)
add_definitions(-DHAVE_PYTHON)
message("set -DHAVE_PYTHON")
endif(ENABLE_PYTHON AND PYTHON_LIBRARY)
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# only one of the subdirs working so far...
@ -87,6 +85,7 @@ add_subdirectory(po)
add_subdirectory(src)
#add_subdirectory(doc)
########### install files ###############
install(DIRECTORY data fonts images sounds DESTINATION ${DATADIR} PATTERN ".svn" EXCLUDE )