-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
32 lines (22 loc) · 858 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(3DEngine)
cmake_minimum_required(VERSION 2.8)
set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin/${CMAKE_BUILD_TYPE})
file(GLOB_RECURSE source_files src/* )
add_executable(3DEngine ${source_files})
add_subdirectory(dep/SDL2)
add_subdirectory(dep/freetype)
include_directories(dep/SDL2/include)
include_directories(dep/freetype/include)
include_directories(dep/freetype/include/freetype)
if((${CMAKE_BUILD_TYPE} MATCHES "") OR (${CMAKE_BUILD_TYPE} MATCHES "Debug"))
add_definitions("-static")
endif()
add_dependencies(3DEngine SDL2)
add_dependencies(3DEngine SDL2main)
add_dependencies(SDL2TTF freetype)
add_dependencies(3DEngine SDL2TTF)
target_link_libraries(3DEngine SDL2)
target_link_libraries(3DEngine SDL2main)
target_link_libraries(3DEngine freetype)
target_link_libraries(3DEngine SDL2TTF)