-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (42 loc) · 1.14 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
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.21)
include(FetchContent)
FetchContent_Declare(
serious-cmake-library
GIT_REPOSITORY [email protected]:UsatiyNyan/serious-cmake-library.git
GIT_TAG main
)
FetchContent_MakeAvailable(serious-cmake-library)
# Project
sl_project_prologue(
CXX_STANDARD 20
C_STANDARD 17)
project(
serious-graphics-library
VERSION 0.0.1
DESCRIPTION "graphics library"
HOMEPAGE_URL "TODO"
LANGUAGES C CXX)
add_library(${PROJECT_NAME}
STATIC
src/ctx/context.cpp
src/ctx/window.cpp
src/ctx/imgui.cpp
src/ctx/implot.cpp
src/detail/log.cpp
src/shader/shader.cpp
src/shader/program.cpp
src/vtx/vertex_array.cpp
src/vtx/texture.cpp)
add_library(sl::gfx ALIAS ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} PUBLIC include)
add_subdirectory(dependencies)
# Tests and examples
if (NOT PROJECT_IS_TOP_LEVEL)
return()
endif ()
sl_compiler_warnings(${PROJECT_NAME} WARNINGS_AS_ERRORS)
include(CTest)
if (BUILD_TESTING)
add_subdirectory(test)
endif ()
add_subdirectory(examples)