-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (34 loc) · 1.31 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
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.8)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
project(Preon)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
#set(CMAKE_CXX_FLAGS_DEBUG "-g")
#set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(PREON_VERSION "0.1.0-dev")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/src/CompileConfig.h.in"
"${CMAKE_CURRENT_SOURCE_DIR}/include/CompileConfig.h"
)
find_package(SDL2 CONFIG REQUIRED)
find_package(CURL REQUIRED)
find_package(Threads REQUIRED)
find_package(TIDY REQUIRED)
find_package(Freetype REQUIRED)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps/quickjspp)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CURL_INCLUDE_DIRS} ${TIDY_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} SDL2::SDL2 ${CMAKE_CURRENT_SOURCE_DIR}/deps/)
file(GLOB_RECURSE PREON_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
)
file(GLOB_RECURSE INIH_SRC
${CMAKE_CURRENT_SOURCE_DIR}/deps/inih/ini.cpp
${CMAKE_CURRENT_SOURCE_DIR}/deps/inih/INIReaders.cpp
)
file(GLOB_RECURSE TINYXML2_SRC
${CMAKE_CURRENT_SOURCE_DIR}/deps/tinyxml2/tinyxml2.cpp
)
link_libraries(${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${TIDY_LIBRARIES} SDL2::SDL2 ${FREETYPE_LIBRARIES})
add_executable(${PROJECT_NAME} ${PREON_SRC} ${INIH_SRC} ${TINYXML2_SRC})