axmol/thirdparty/glad/CMakeLists.txt

27 lines
590 B
CMake
Raw Normal View History

2020-11-16 14:47:43 +08:00
set(lib_name glad)
set(target_name ${lib_name})
project(${target_name})
2022-08-08 18:02:17 +08:00
include(../cmake/AXConfigThirdparty.cmake)
2020-11-16 14:47:43 +08:00
add_library(${target_name}
${${target_name}_src}
2022-10-25 09:01:57 +08:00
"include/glad/gl.h"
src/gl.c
2020-11-16 14:47:43 +08:00
)
#~ set_target_properties(${target_name} PROPERTIES
#~ INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/include
#~ )
if(BUILD_SHARED_LIBS)
target_compile_definitions(${target_name}
2022-10-25 09:01:57 +08:00
PUBLIC GLAD_API_CALL_EXPORT=1
PRIVATE GLAD_API_CALL_EXPORT_BUILD=1
2020-11-16 14:47:43 +08:00
)
endif()
target_include_directories(${target_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)