diff options
Diffstat (limited to 'ports/glbinding')
| -rw-r--r-- | ports/glbinding/CONTROL | 2 | ||||
| -rw-r--r-- | ports/glbinding/fix-uwpmacro.patch | 33 | ||||
| -rw-r--r-- | ports/glbinding/portfile.cmake | 10 |
3 files changed, 40 insertions, 5 deletions
diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index f63cec773..a6db3dcde 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 3.0.2-5 +Version: 3.1.0 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glbinding/fix-uwpmacro.patch b/ports/glbinding/fix-uwpmacro.patch new file mode 100644 index 000000000..61c179662 --- /dev/null +++ b/ports/glbinding/fix-uwpmacro.patch @@ -0,0 +1,33 @@ +diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt
+index 97654c8..bca68d1 100644
+--- a/source/glbinding/CMakeLists.txt
++++ b/source/glbinding/CMakeLists.txt
+@@ -261,6 +261,11 @@ target_link_libraries(${target}
+ # Compile definitions
+ #
+
++
++if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
++ target_compile_definitions(${target} PRIVATE SYSTEM_WINDOWS WINDOWS_STORE)
++endif()
++
+ target_compile_definitions(${target}
+ PRIVATE
+ # since we use stl and stl is intended to use exceptions, exceptions should not be disabled
+diff --git a/source/glbinding/source/getProcAddress.cpp b/source/glbinding/source/getProcAddress.cpp
+index c1cfc5c..7e5f8bc 100644
+--- a/source/glbinding/source/getProcAddress.cpp
++++ b/source/glbinding/source/getProcAddress.cpp
+@@ -18,7 +18,11 @@ namespace glbinding {
+
+ ProcAddress getProcAddress(const char * name)
+ {
+- static auto module = LoadLibrary(_T("OPENGL32.DLL"));
++#ifdef WINDOWS_STORE
++ static auto module = ::LoadPackagedLibrary(_T("OPENGL32.DLL"), 0);
++#else
++ static auto module = ::LoadLibrary(_T("OPENGL32.DLL"));
++#endif
+
+ // Prevent static linking of opengl32
+ static auto wglGetProcAddress_ = reinterpret_cast<void * (__stdcall *)(const char *)>(::GetProcAddress(module, "wglGetProcAddress"));
diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index e645e5021..659d7c23c 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -2,10 +2,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/glbinding - REF d7a1873ad741fb13a9c6dcbae93d0cda45a11933 - SHA512 70848d8ddad3e2ddfc54549ed3cdde569991858135140b30b50fa6e92c5aec6e3dd235418e091456f9b68da2fad09fbef117dedac7b48c26bcab62b6f0fa791f + REF v3.1.0 + SHA512 d7294c9a0dc47a7c107b134e5dfa78c5812fc6bf739b9fd778fa7ce946d5ea971839a65c3985e0915fd75311e4a85fb221d33a71856c460199eab0e7622f7151 HEAD_REF master - PATCHES force-system-install.patch + PATCHES + force-system-install.patch + fix-uwpmacro.patch ) vcpkg_configure_cmake( @@ -47,7 +49,7 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) file(WRITE ${TARGET_CMAKE} "${_contents}") endforeach() -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/glbinding-aux/glbinding-aux-export.cmake)\nset(glbinding_FOUND TRUE)\n") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/glbinding-aux/glbinding-aux-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/KHRplatform/KHRplatform-export.cmake)\nset(glbinding_FOUND TRUE)\n") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright |
