-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (25 loc) · 885 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
30 lines (25 loc) · 885 Bytes
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
cmake_minimum_required(VERSION 4.0)
project(editor)
include(GNUInstallDirs)
set(BUILD_SHARED_LIBS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_COLOR_DIAGNOSTICS ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "ccache")
set(CMAKE_CXX_COMPILER_LAUNCHER "ccache")
endif()
add_subdirectory(glfw)
add_subdirectory(harfbuzz)
add_subdirectory(unicode)
add_subdirectory(glad)
add_subdirectory(cglm)
set(CMAKE_C_STANDARD 23)
add_compile_options(-std=gnu2x)
add_executable(editor editor.c)
target_compile_definitions(editor PRIVATE GLFW_INCLUDE_NONE ASSETS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/")
target_include_directories(editor PUBLIC include)
target_link_libraries(editor PRIVATE harfbuzz-gpu harfbuzz glfw glad cglm unicode)