Skip to content

Commit

Permalink
(conan-io#3413) Bump glad/0.1.34
Browse files Browse the repository at this point in the history
* define GLAD_GLAPI_EXPORT if shared

* download .tar.gz instead of .zip

* add glad/0.1.34
  • Loading branch information
SpaceIm authored Nov 5, 2020
1 parent 0391bf4 commit 2dafcdc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
10 changes: 8 additions & 2 deletions recipes/glad/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
sources:
"0.1.34":
url: "https://github.com/Dav1dde/glad/archive/v0.1.34.tar.gz"
sha256: "4be2900ff76ac71a2aab7a8be301eb4c0338491c7e205693435b09aad4969ecd"
"0.1.33":
url: "https://github.com/Dav1dde/glad/archive/v0.1.33.zip"
sha256: "3175b56aa5ff16c5bfb33df3f36d6a7eb680e7d9f1675035472015e007a88660"
url: "https://github.com/Dav1dde/glad/archive/v0.1.33.tar.gz"
sha256: "4bc850062e9bcfc182bd4095d45b987517507d8ec0edcc424ed58f67b4ea9e37"
patches:
"0.1.34":
- patch_file: "patches/0002-CMake-handle-all-specs.patch"
base_path: "source_subfolder"
"0.1.33":
- patch_file: "patches/0001-CMake-handle-all-specs.patch"
base_path: "source_subfolder"
2 changes: 2 additions & 0 deletions recipes/glad/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,7 @@ def package(self):

def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
if self.options.shared:
self.cpp_info.defines = ["GLAD_GLAPI_EXPORT"]
if self.settings.os == "Linux":
self.cpp_info.system_libs.append("dl")
24 changes: 24 additions & 0 deletions recipes/glad/all/patches/0002-CMake-handle-all-specs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,10 +73,17 @@ elseif(GLAD_GENERATOR STREQUAL "volt")
)
else()
set(GLAD_INCLUDE_DIRS "${GLAD_OUT_DIR}/include")
- list(APPEND GLAD_SOURCES
- "${GLAD_OUT_DIR}/src/glad.c"
- "${GLAD_INCLUDE_DIRS}/glad/glad.h"
- )
+ if(GLAD_SPEC STREQUAL "gl")
+ list(APPEND GLAD_SOURCES
+ "${GLAD_OUT_DIR}/src/glad.c"
+ "${GLAD_INCLUDE_DIRS}/glad/glad.h"
+ )
+ else()
+ list(APPEND GLAD_SOURCES
+ "${GLAD_OUT_DIR}/src/glad_${GLAD_SPEC}.c"
+ "${GLAD_INCLUDE_DIRS}/glad/glad_${GLAD_SPEC}.h"
+ )
+ endif()
endif()

if(NOT GLAD_ALL_EXTENSIONS)
2 changes: 2 additions & 0 deletions recipes/glad/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.1.34":
folder: all
"0.1.33":
folder: all

0 comments on commit 2dafcdc

Please sign in to comment.