mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-17 01:57:59 +00:00
[VTK/GLEW] Fix Regression of VTK with newer CMake Versions (#7967)
* Add glew variables lost by cmakes new FindGLEW to wrapper The variables are required by ports like VTK * fix file location. * completly refactor wrapper. Static case was not handled correctly * add singular variables for pangolin
This commit is contained in:
parent
ab51cc9aa1
commit
257bd7a60f
@ -1,4 +1,4 @@
|
||||
Source: glew
|
||||
Version: 2.1.0-5
|
||||
Version: 2.1.0-6
|
||||
Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.
|
||||
Homepage: https://github.com/nigels-com/glew
|
||||
|
@ -63,5 +63,6 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew )
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
|
25
ports/glew/vcpkg-cmake-wrapper.cmake
Normal file
25
ports/glew/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
include(SelectLibraryConfigurations)
|
||||
_find_package(GLEW CONFIG)
|
||||
if(GLEW_FOUND AND TARGET GLEW::GLEW AND NOT DEFINED GLEW_INCLUDE_DIRS)
|
||||
get_target_property(GLEW_INCLUDE_DIRS GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS})
|
||||
get_target_property(_GLEW_DEFS GLEW::GLEW INTERFACE_COMPILE_DEFINITIONS)
|
||||
if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC")
|
||||
get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_LOCATION_DEBUG)
|
||||
get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_LOCATION_RELEASE)
|
||||
else()
|
||||
get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_IMPLIB_DEBUG)
|
||||
get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_IMPLIB_RELEASE)
|
||||
endif()
|
||||
get_target_property(_GLEW_LINK_INTERFACE GLEW::GLEW IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) # same for debug and release
|
||||
list(APPEND GLEW_LIBRARIES ${_GLEW_LINK_INTERFACE})
|
||||
list(APPEND GLEW_LIBRARY ${_GLEW_LINK_INTERFACE})
|
||||
select_library_configurations(GLEW)
|
||||
if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC")
|
||||
set(GLEW_STATIC_LIBRARIES ${GLEW_LIBRARIES})
|
||||
else()
|
||||
set(GLEW_SHARED_LIBRARIES ${GLEW_LIBRARIES})
|
||||
endif()
|
||||
unset(_GLEW_DEFS)
|
||||
unset(_GLEW_LINK_INTERFACE)
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user