#
# Сборка библиотеки GLAD
#
project(
  libglad VERSION "0.1.29"
  DESCRIPTION "OpenGL loader generated by glad"
  HOMEPAGE_URL "https://glad.dav1d.de/#profile=core&language=c-debug&specification=gl&loader=on&api=gl%3D3.3"
  LANGUAGES "C"
  )

# On Linux platform glad require: -libdl
if   ( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
  SET( LIBS GL "dl" )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )

## Включение экспорта всех символов для создания динамической библиотеки
#set ( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
#ADD_LIBRARY( glad SHARED "${CMAKE_SOURCE_DIR}/src/glad/glad.c" )

## Сборка статической библиотеки
ADD_LIBRARY( glad STATIC "${CMAKE_SOURCE_DIR}/src/glad/glad.c" )
TARGET_LINK_LIBRARIES( glad ${LIBS} )
