mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-30 02:17:07 +00:00
Merge https://github.com/nigels-com/glew.git into master HEAD at Tue Nov 17 17:44:14 GMT 2015
This commit is contained in:
commit
80726c2df7
@ -40,7 +40,21 @@ endif()
|
||||
foreach(_glew_target glew glewmx)
|
||||
set(_glew_src_target "GLEW::${_glew_target}${_glew_target_postfix}")
|
||||
string(TOUPPER "GLEW::${_glew_target}" _glew_dest_target)
|
||||
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})
|
||||
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()
|
||||
|
@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8.12)
|
||||
project(glew-cmake-test)
|
||||
|
||||
find_package(GLEW REQUIRED CONFIG)
|
||||
find_package(GLEW REQUIRED CONFIG) # call twice to test multiple call
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
add_executable(cmake-test main.c)
|
||||
|
@ -1,3 +1,4 @@
|
||||
GLEW_DEST = /usr/local
|
||||
NAME = $(GLEW_NAME)
|
||||
CC = cc
|
||||
LD = cc
|
||||
|
@ -1,3 +1,4 @@
|
||||
GLEW_DEST = /usr/local
|
||||
NAME = $(GLEW_NAME)
|
||||
CC = cc
|
||||
LD = cc
|
||||
|
@ -1,3 +1,4 @@
|
||||
GLEW_DEST = /usr/local
|
||||
NAME = $(GLEW_NAME)
|
||||
CC = cc
|
||||
LD = cc
|
||||
|
@ -1,3 +1,4 @@
|
||||
GLEW_DEST = /usr/local
|
||||
NAME = $(GLEW_NAME)
|
||||
CC = cc
|
||||
LD = cc
|
||||
|
Loading…
Reference in New Issue
Block a user