mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2024-11-09 20:00:04 +00:00
55 lines
871 B
CMake
55 lines
871 B
CMake
|
cmake_minimum_required(VERSION 3.28)
|
||
|
|
||
|
project(glerminal
|
||
|
VERSION 0.1.0
|
||
|
LANGUAGES C CXX
|
||
|
)
|
||
|
|
||
|
add_subdirectory(glfw)
|
||
|
|
||
|
add_library(glerminal STATIC
|
||
|
include/glerminal.h
|
||
|
|
||
|
source/glerminal-private.h
|
||
|
source/glerminal.cpp
|
||
|
|
||
|
source/glad/glad.h
|
||
|
source/KHR/khrplatform.h
|
||
|
source/glad.c
|
||
|
)
|
||
|
|
||
|
set_target_properties(glerminal
|
||
|
PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
)
|
||
|
|
||
|
target_include_directories(glerminal
|
||
|
PUBLIC
|
||
|
include
|
||
|
PRIVATE
|
||
|
source
|
||
|
)
|
||
|
|
||
|
target_link_libraries(glerminal
|
||
|
PUBLIC
|
||
|
glfw
|
||
|
)
|
||
|
|
||
|
target_compile_definitions(glerminal
|
||
|
PUBLIC
|
||
|
GLERMINAL_VERSION=${PROJECT_VERSION}
|
||
|
GLERMINAL_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
|
||
|
GLERMINAL_VERSION_MINOR=${PROJECT_VERSION_MINOR}
|
||
|
GLERMINAL_VERSION_PATCH=${PROJECT_VERSION_PATCH}
|
||
|
)
|
||
|
|
||
|
if (MSVC)
|
||
|
target_link_options(glerminal
|
||
|
PUBLIC
|
||
|
"/ENTRY:mainCRTStartup"
|
||
|
)
|
||
|
endif()
|
||
|
|
||
|
if (PROJECT_IS_TOP_LEVEL)
|
||
|
add_subdirectory(examples examples)
|
||
|
endif()
|