Files
glad/CMakeLists.txt
2024-06-29 13:42:11 -04:00

25 lines
548 B
CMake

cmake_minimum_required(VERSION 3.18)
project(glad
VERSION 1.0
LANGUAGES C
)
file(GLOB_RECURSE HEADERS "include/*.h")
file(GLOB_RECURSE SOURCES "src/*.c")
find_package(OpenGL REQUIRED)
include_directories("include")
include_directories(${OPENGL_INCLUDE_DIRS})
if (UNIX AND NOT APPLE)
add_library(glad SHARED ${SOURCES})
endif()
if (WIN32)
add_library(glad STATIC ${SOURCES})
endif()
set_target_properties(glad PROPERTIES LINKER_LANGUAGE C)
target_link_libraries(glad PUBLIC ${OPENGL_LIBRARIES})