2020-12-22 17:10:01 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(glad)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
2021-01-06 18:19:01 +00:00
|
|
|
if (WIN32)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc -static")
|
|
|
|
endif()
|
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
add_library(glad
|
|
|
|
source/glad.c
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(glad PUBLIC include)
|
2021-01-06 15:29:34 +00:00
|
|
|
|
2021-01-06 18:19:01 +00:00
|
|
|
if (WIN32)
|
|
|
|
target_link_libraries(glad PRIVATE libdl.a)
|
|
|
|
else()
|
|
|
|
target_link_libraries(glad PRIVATE dl)
|
|
|
|
endif()
|