forked from CatacombGames/TheCatacomb
-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
42 lines (35 loc) · 1019 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
33
34
35
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 2.8)
project(TheCatacomb)
include(CheckFunctionExists)
check_function_exists(stricmp STRICMP_EXISTS)
check_function_exists(strnicmp STRNICMP_EXISTS)
if(NOT STRICMP_EXISTS)
add_definitions(-Dstricmp=strcasecmp)
endif(NOT STRICMP_EXISTS)
if(NOT STRNICMP_EXISTS)
add_definitions(-Dstrnicmp=strncasecmp)
endif(NOT STRNICMP_EXISTS)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/;${CMAKE_MODULE_PATH}")
find_package(SDL2)
include_directories(${SDL2_INCLUDE_DIR})
if(MSVC)
add_definitions("/wd4996")
else(MSVC)
set(CMAKE_C_FLAGS "-Wall -Wno-unused-result ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Wno-unused-result ${CMAKE_CXX_FLAGS}")
endif(MSVC)
# Typically reasonable to assume that an h file has a c/cpp file with it, so
# we can take the easy way and glob them.
file(GLOB HEADER_FILES *.h)
add_executable(catacomb
${HEADER_FILES}
cat_play.c
catacomb.c
catasm.c
cpanel.c
objects.c
pcrlib_a.c
pcrlib_c.c
rleasm.c
)
target_link_libraries(catacomb ${SDL2_LIBRARY})