-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (31 loc) · 1.08 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.11)
project(GLEW LANGUAGES C)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(GLEW_PUBLIC_HEADERS
include/GL/eglew.h include/GL/glew.h include/GL/glxew.h include/GL/wglew.h)
add_library(GLEW STATIC ${GLEW_PUBLIC_HEADERS}
src/glew.c)
target_include_directories(GLEW PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_compile_definitions(GLEW PUBLIC GLEW_STATIC)
set_target_properties(
GLEW
PROPERTIES
FOLDER "GLEW"
POSITION_INDEPENDENT_CODE ON
PUBLIC_HEADER "${GLEW_PUBLIC_HEADERS}"
OUTPUT_NAME "glew"
OUTPUT_NAME_DEBUG "glew_d"
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/include)
add_library(GLEW::glew ALIAS GLEW)
configure_file(GLEWConfig.cmake.in "${PROJECT_BINARY_DIR}/GLEWConfig.cmake" @ONLY)
install(
FILES "${PROJECT_BINARY_DIR}/GlEWConfig.cmake"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/GLEW")
install(
TARGETS GLEW
EXPORT GLEW
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION include/GL
)