forked from bugix/OpenGGS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (28 loc) · 978 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
cmake_minimum_required(VERSION 3.15)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
project(openggs VERSION 0.1)
message("${CMAKE_PROJECT_NAME} version ${CMAKE_PROJECT_VERSION}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_mixer REQUIRED)
include(FetchContent)
FetchContent_Declare(spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG v1.8.5
GIT_SHALLOW ON
)
set(SPDLOG_BUILD_SHARED OFF)
set(BUILD_SHARED_LIBS OFF)
FetchContent_MakeAvailable(spdlog)
set(CMAKE_CXX_STANDARD 17)
add_executable(${PROJECT_NAME} )
target_include_directories( ${PROJECT_NAME}
PRIVATE
${SDL2_INCLUDE_DIR}
${SDL2_IMAGE_INCLUDE_DIR}
${SDL2_MIXER_INCLUDE_DIR})
add_subdirectory(src)