mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[glew] Update to 2.3.0 (#49034)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
--- a/build/cmake/CMakeLists.txt Mon Apr 24 15:54:00 2023
|
||||
+++ b/build/cmake/CMakeLists.txt Mon Apr 24 16:06:57 2023
|
||||
@@ -143,7 +143,9 @@
|
||||
# add options from visual studio project
|
||||
target_compile_definitions (glew PRIVATE "GLEW_BUILD;VC_EXTRALEAN")
|
||||
target_compile_definitions (glew_s PRIVATE "GLEW_STATIC;VC_EXTRALEAN")
|
||||
- target_link_libraries (glew LINK_PRIVATE -BASE:0x62AA0000)
|
||||
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i?86|x86|x86_32)$")
|
||||
+ target_link_libraries (glew LINK_PRIVATE -BASE:0x62AA0000)
|
||||
+ endif()
|
||||
# kill security checks which are dependent on stdlib
|
||||
target_compile_options (glew PRIVATE -GS-)
|
||||
target_compile_options (glew_s PRIVATE -GS-)
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
|
||||
index 419c243..8c66ae2 100644
|
||||
--- a/build/cmake/CMakeLists.txt
|
||||
+++ b/build/cmake/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@ endif ()
|
||||
|
||||
project (glew C)
|
||||
|
||||
-cmake_minimum_required (VERSION 2.8.12)
|
||||
+cmake_minimum_required (VERSION 3.5)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
|
||||
index 419c243..f81fab4 100644
|
||||
index 5649972..c0252ec 100644
|
||||
--- a/build/cmake/CMakeLists.txt
|
||||
+++ b/build/cmake/CMakeLists.txt
|
||||
@@ -120,9 +120,9 @@ if (MSVC)
|
||||
@@ -129,9 +129,6 @@ if (MSVC)
|
||||
target_compile_options (glew PRIVATE -GS-)
|
||||
target_compile_options (glew_s PRIVATE -GS-)
|
||||
# remove stdlib dependency
|
||||
- target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry)
|
||||
- target_link_libraries (glew LINK_PRIVATE libvcruntime.lib)
|
||||
- target_link_libraries (glew LINK_PRIVATE msvcrt.lib )
|
||||
+ #target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry)
|
||||
+ #target_link_libraries (glew LINK_PRIVATE libvcruntime.lib)
|
||||
+ #target_link_libraries (glew LINK_PRIVATE msvcrt.lib )
|
||||
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
||||
elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang")))
|
||||
# remove stdlib dependency on windows with GCC and Clang (for similar reasons
|
||||
|
||||
@@ -1,78 +1,61 @@
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
if("x11" IN_LIST FEATURES)
|
||||
message(WARNING "${PORT} requires the following libraries from the system package manager:\n libxmu-dev\n libxi-dev\n libgl-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxmu-dev libxi-dev libgl-dev.")
|
||||
endif()
|
||||
|
||||
# Don't change to vcpkg_from_github! The sources in the git repository (archives) are missing some files that are distributed inside releases.
|
||||
# More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz"
|
||||
FILENAME "glew-2.2.0.tgz"
|
||||
SHA512 57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1
|
||||
URLS "https://github.com/nigels-com/glew/releases/download/glew-${VERSION}/glew-${VERSION}.tgz"
|
||||
FILENAME "glew-${VERSION}.tgz"
|
||||
SHA512 a452874b7e7e5a359593fcd93475cf2c7a484f649947308f8611461df58772e060fe5a305434c22cc2411e34a20775379fcae735477f6ef056b31730ae87426e
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
SOURCE_BASE glew
|
||||
PATCHES
|
||||
fix-LNK2019.patch
|
||||
base_address.patch # Accepted upstream as https://github.com/nigels-com/glew/commit/ef7d12ecb7f1f336f6d3a80cebd6163b2c094108
|
||||
cmake_version.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS options
|
||||
FEATURES
|
||||
egl GLEW_EGL
|
||||
x11 GLEW_X11
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/build/cmake"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
${options}
|
||||
-DBUILD_UTILS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glew)
|
||||
# Skip check the required dependency opengl
|
||||
vcpkg_fixup_pkgconfig(SKIP_CHECK)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Burn-in CMake build config
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "ifndef GLEW_NO_GLU" "if 0")
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(_targets_cmake_files)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake")
|
||||
endif()
|
||||
|
||||
foreach(FILE ${_targets_cmake_files})
|
||||
file(READ ${FILE} _contents)
|
||||
string(REPLACE "libglew32" "glew32" _contents "${_contents}")
|
||||
file(WRITE ${FILE} "${_contents}")
|
||||
endforeach()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib" "${CURRENT_PACKAGES_DIR}/lib/glew32.lib")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib")
|
||||
endif()
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
set(libname GLEW)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(libname glew32)
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glew.pc" " -l${libname}" " -l${libname}")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
foreach(FILE "${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "${CURRENT_PACKAGES_DIR}/include/GL/wglew.h" "${CURRENT_PACKAGES_DIR}/include/GL/glxew.h")
|
||||
file(READ ${FILE} _contents)
|
||||
string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}")
|
||||
file(WRITE ${FILE} "${_contents}")
|
||||
endforeach()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "#ifdef GLEW_STATIC" "#if 1")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/wglew.h" "#ifdef GLEW_STATIC" "#if 1")
|
||||
endif()
|
||||
|
||||
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/${PORT}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
The package glew is compatible with built-in CMake targets:
|
||||
glew provides CMake targets:
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
target_link_libraries(main PRIVATE GLEW::GLEW)
|
||||
# Legacy CMake find module
|
||||
find_package(GLEW REQUIRED)
|
||||
target_link_libraries(main PRIVATE GLEW::GLEW)
|
||||
|
||||
# Modern CMake config package
|
||||
find_package(GLEW CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE GLEW::GLEW)
|
||||
|
||||
glew provides pkg-config modules:
|
||||
|
||||
# The OpenGL Extension Wrangler library
|
||||
glew
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "glew",
|
||||
"version": "2.2.0",
|
||||
"port-version": 6,
|
||||
"version": "2.3.0",
|
||||
"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",
|
||||
"supports": "!android",
|
||||
@@ -15,5 +14,18 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"egl": {
|
||||
"description": "Enable EGL mode",
|
||||
"supports": "!windows",
|
||||
"dependencies": [
|
||||
"egl"
|
||||
]
|
||||
},
|
||||
"x11": {
|
||||
"description": "Enable X11 mode",
|
||||
"supports": "!ios & !osx & !windows"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1658,6 +1658,7 @@ gegl(osx) = fail # meson bug on osx. See https://github.com/microsoft/vcpkg/issu
|
||||
geogram[graphics] = feature-fails # imgui not found. See https://github.com/microsoft/vcpkg/issues/32421
|
||||
ginkgo[openmp](osx) = feature-fails # No openmp on osx
|
||||
ginkgo[openmp](windows) = feature-fails # needs openmp 3.0 support but msvc only supports openmp 2.0
|
||||
glew[egl](osx) = feature-fails
|
||||
glib-networking[openssl, gnutls] = options # You have to select exactly one ssl backend
|
||||
google-cloud-cpp[storagetransfer](osx) = feature-fails # See https://github.com/microsoft/vcpkg/issues/32149
|
||||
graphviz(osx) = fail # CMake configure error. See https://github.com/microsoft/vcpkg/issues/44414
|
||||
|
||||
@@ -3353,8 +3353,8 @@
|
||||
"port-version": 4
|
||||
},
|
||||
"glew": {
|
||||
"baseline": "2.2.0",
|
||||
"port-version": 6
|
||||
"baseline": "2.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"glfw3": {
|
||||
"baseline": "3.4",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "dcf0a0902b63ffe4673a6757ea8974c56d2ecb30",
|
||||
"version": "2.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "98d4ecc965968cdc8c85c0347c4638bbda36bef4",
|
||||
"version": "2.2.0",
|
||||
|
||||
Reference in New Issue
Block a user