-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (24 loc) · 954 Bytes
/
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
31
32
PROJECT(FIXME_PROJECT)
# meta
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# flags
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
# depends
IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/extlibs/libSDL2pp/CMakeLists.txt)
MESSAGE(FATAL_ERROR "The source directory\n ${PROJECT_SOURCE_DIR}/extlibs/libSDL2pp\ndoes not contain a CMakeLists.txt file.\nIt is likely that you forgot to run\n git submodule init && git submodule update")
ENDIF(NOT EXISTS ${PROJECT_SOURCE_DIR}/extlibs/libSDL2pp/CMakeLists.txt)
SET(SDL2PP_WITH_IMAGE TRUE)
SET(SDL2PP_WITH_TTF TRUE)
ADD_SUBDIRECTORY(extlibs/libSDL2pp)
# datadir
ADD_DEFINITIONS(-DDATADIR="${PROJECT_SOURCE_DIR}/data")
# sources
SET(FIXME_PROJECT_SOURCES
main.cc
)
SET(FIXME_PROJECT_HEADERS
)
# binary
INCLUDE_DIRECTORIES(SYSTEM ${SDL2PP_INCLUDE_DIRS})
ADD_EXECUTABLE(FIXME_PROGNAME ${FIXME_PROJECT_SOURCES} ${FIXME_PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(FIXME_PROGNAME ${SDL2PP_LIBRARIES})