-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (21 loc) · 1 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 2.8.4)
project(Mchezo-engine)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
include(SourceFileList.cmake)
add_executable(Mchezo-engine ${SOURCE_FILES})
include (cmake/FindTinyXML2.cmake)
include (cmake/FindSDL2_mixer.cmake)
include (cmake/FindTmxParser.cmake)
INCLUDE(FindPkgConfig)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
PKG_SEARCH_MODULE(SDL2_TTF REQUIRED SDL2_ttf>=2.0.0)
PKG_SEARCH_MODULE(SDL2_TTF REQUIRED)
PKG_SEARCH_MODULE(TINYXML2 REQUIRED tinyxml2)
PKG_SEARCH_MODULE(TMXPARSER REQUIRED tmx-parser)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS}
${SDL2_TTF_INCLUDE_DIRS} ${TINYXML2_INCLUDE_DIR} ${SDL2_Mixer_INCLUDE_DIRS}
${TMXPARSER_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${SDL2_LIBRARIES}
${SDL2IMAGE_LIBRARIES} ${SDL2_TTF_LIBRARIES}
${TINYXML2_LIBRARY} ${SDLMIXER_LIBRARY} ${TMXPARSER_LIBRARY})