add glew 2.2.0

This commit is contained in:
alexey.lysiuk 2021-06-22 17:21:49 +03:00
parent 21c2dff63d
commit 97ec6a0211
9 changed files with 30004 additions and 0 deletions

26427
deps/glew/include/GL/glew.h vendored Normal file

File diff suppressed because it is too large Load diff

1831
deps/glew/include/GL/glxew.h vendored Normal file

File diff suppressed because it is too large Load diff

1468
deps/glew/include/GL/wglew.h vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,88 @@
#.rst:
# CopyImportedTargetProperties
# --------------------------
#
# Copies the `INTERFACE*` and `IMPORTED*` properties from a target
# to another one.
# This function can be used to duplicate an `IMPORTED` or an `ALIAS` library
# with a different name since ``add_library(... ALIAS ...)`` does not work
# for those targets.
#
# ::
#
# copy_imported_target_properties(<source-target> <destination-target>)
#
# The function copies all the `INTERFACE*` and `IMPORTED*` target
# properties from `<source-target>` to `<destination-target>`.
#
# The function uses the `IMPORTED_CONFIGURATIONS` property to determine
# which configuration-dependent properties should be copied
# (`IMPORTED_LOCATION_<CONFIG>`, etc...)
#
# Example:
#
# Internally the CMake project of ZLIB builds the ``zlib`` and
# ``zlibstatic`` targets which can be exported in the ``ZLIB::`` namespace
# with the ``install(EXPORT ...)`` command.
#
# The config-module will then create the import libraries ``ZLIB::zlib`` and
# ``ZLIB::zlibstatic``. To use ``ZLIB::zlibstatic`` under the standard
# ``ZLIB::ZLIB`` name we need to create the ``ZLIB::ZLIB`` imported library
# and copy the appropriate properties:
#
# add_library(ZLIB::ZLIB STATIC IMPORTED)
# copy_imported_target_properties(ZLIB::zlibstatic ZLIB::ZLIB)
#
function(copy_imported_target_properties src_target dest_target)
set(config_dependent_props
IMPORTED_IMPLIB
IMPORTED_LINK_DEPENDENT_LIBRARIES
IMPORTED_LINK_INTERFACE_LANGUAGES
IMPORTED_LINK_INTERFACE_LIBRARIES
IMPORTED_LINK_INTERFACE_MULTIPLICITY
IMPORTED_LOCATION
IMPORTED_NO_SONAME
IMPORTED_SONAME
)
# copy configuration-independent properties
foreach(prop
${config_dependent_props}
IMPORTED_CONFIGURATIONS
INTERFACE_AUTOUIC_OPTIONS
INTERFACE_COMPILE_DEFINITIONS
INTERFACE_COMPILE_FEATURES
INTERFACE_COMPILE_OPTIONS
INTERFACE_INCLUDE_DIRECTORIES
INTERFACE_LINK_LIBRARIES
INTERFACE_POSITION_INDEPENDENT_CODE
INTERFACE_SOURCES
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
)
get_property(is_set TARGET ${src_target} PROPERTY ${prop} SET)
if(is_set)
get_target_property(v ${src_target} ${prop})
set_target_properties(${dest_target} PROPERTIES ${prop} "${v}")
# message(STATUS "set_target_properties(${dest_target} PROPERTIES ${prop} ${v})")
endif()
endforeach()
# copy configuration-dependent properties
get_target_property(imported_configs ${src_target}
IMPORTED_CONFIGURATIONS)
foreach(config ${imported_configs})
foreach(prop_prefix ${config_dependent_props})
set(prop ${prop_prefix}_${config})
get_property(is_set TARGET ${src_target} PROPERTY ${prop} SET)
if(is_set)
get_target_property(v ${src_target} ${prop})
set_target_properties(${dest_target}
PROPERTIES ${prop} "${v}")
# message(STATUS "set_target_properties(${dest_target} PROPERTIES ${prop} ${v})")
endif()
endforeach()
endforeach()
endfunction()

View file

@ -0,0 +1,60 @@
# This config-module creates the following import libraries:
#
# - GLEW::glew shared lib
# - GLEW::glew_s static lib
#
# Additionally GLEW::GLEW will be created as an
# copy of either the shared (default) or the static libs.
#
# Dependending on the setting of BUILD_SHARED_LIBS at GLEW build time
# either the static or shared versions may not be available.
#
# Set GLEW_USE_STATIC_LIBS to OFF or ON to force using the shared
# or static lib for GLEW::GLEW
#
include(${CMAKE_CURRENT_LIST_DIR}/glew-targets.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CopyImportedTargetProperties.cmake)
# decide which import library (glew/glew_s)
# needs to be copied to GLEW::GLEW
set(_glew_target_postfix "")
set(_glew_target_type SHARED)
if(DEFINED GLEW_USE_STATIC_LIBS)
# if defined, use only static or shared
if(GLEW_USE_STATIC_LIBS)
set(_glew_target_postfix "_s")
endif()
# else use static only if no shared
elseif(NOT TARGET GLEW::glew AND TARGET GLEW::glew_s)
set(_glew_target_postfix "_s")
endif()
if(_glew_target_postfix STREQUAL "")
set(_glew_target_type SHARED)
else()
set(_glew_target_type STATIC)
endif()
# CMake doesn't allow creating ALIAS lib for an IMPORTED lib
# so create imported ones and copy the properties
foreach(_glew_target glew)
set(_glew_src_target "GLEW::${_glew_target}${_glew_target_postfix}")
string(TOUPPER "GLEW::${_glew_target}" _glew_dest_target)
if(TARGET ${_glew_dest_target})
get_target_property(_glew_previous_src_target ${_glew_dest_target}
_GLEW_SRC_TARGET)
if(NOT _glew_previous_src_target STREQUAL _glew_src_target)
message(FATAL_ERROR "find_package(GLEW) was called the second time with "
"different GLEW_USE_STATIC_LIBS setting. Previously, "
"`glew-config.cmake` created ${_glew_dest_target} as a copy of "
"${_glew_previous_src_target}. Now it attempted to copy it from "
"${_glew_src_target}. ")
endif()
else()
add_library(${_glew_dest_target} ${_glew_target_type} IMPORTED)
# message(STATUS "add_library(${_glew_dest_target} ${_glew_target_type} IMPORTED)")
copy_imported_target_properties(${_glew_src_target} ${_glew_dest_target})
set_target_properties(${_glew_dest_target} PROPERTIES
_GLEW_SRC_TARGET ${_glew_src_target})
endif()
endforeach()

View file

@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "GLEW::glew_s" for configuration "Release"
set_property(TARGET GLEW::glew_s APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(GLEW::glew_s PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libGLEW.a"
)
list(APPEND _IMPORT_CHECK_TARGETS GLEW::glew_s )
list(APPEND _IMPORT_CHECK_FILES_FOR_GLEW::glew_s "${_IMPORT_PREFIX}/lib/libGLEW.a" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View file

@ -0,0 +1,100 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.17)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget GLEW::glew_s)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target GLEW::glew_s
add_library(GLEW::glew_s STATIC IMPORTED)
set_target_properties(GLEW::glew_s PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "GLEW_STATIC"
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "-framework OpenGL"
)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
endif()
# Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/glew-targets-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_IMPORT_CHECK_TARGETS)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

BIN
deps/glew/lib/libGLEW.a vendored Normal file

Binary file not shown.

11
deps/glew/lib/pkgconfig/glew.pc vendored Normal file
View file

@ -0,0 +1,11 @@
prefix=
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: glew
Description: The OpenGL Extension Wrangler library
Version: 2.2.0
Cflags: -I${includedir}
Libs: -L${libdir} -lGLEW -framework OpenGL
Requires: