diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-01-08 22:12:09 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-01-08 22:12:09 +0100 |
commit | 1285712aa22382a1a0d943aa29b310ecf6ebd365 (patch) | |
tree | d3e621fe3309b6ea11877cd1ec3f8ca857d251bd /src/CMakeLists.txt | |
parent | 5a6b3f005a83363d323e00b499756d6ecc277574 (diff) | |
download | colobot-1285712aa22382a1a0d943aa29b310ecf6ebd365.tar.gz colobot-1285712aa22382a1a0d943aa29b310ecf6ebd365.tar.bz2 colobot-1285712aa22382a1a0d943aa29b310ecf6ebd365.zip |
CMakeLists enhancements
- compiler detection (clang and gcc version check)
- compile flags only for src/ subdir
- system and local include paths
- fix for clang compilation
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c00d347..a90b735 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,13 @@ -# CBot library is built separately +# Compile flags as defined in global CMakeLists +set(CMAKE_CXX_FLAGS ${COLOBOT_CXX_FLAGS}) +set(CMAKE_CXX_FLAGS_RELEASE ${COLOBOT_CXX_FLAGS_RELEASE}) +set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG}) + + +# Subdirectories + add_subdirectory(CBot) -# Tools directory is built separately add_subdirectory(tools) add_subdirectory(po) @@ -196,10 +202,16 @@ ${OPTIONAL_LIBS} ${PLATFORM_LIBS} ) +# Local include_directories( . .. ${CMAKE_CURRENT_BINARY_DIR} +) + +# System +include_directories( +SYSTEM ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR} |