-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
0001-cmake.patch
39 lines (37 loc) · 1.53 KB
/
0001-cmake.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 028a924..27616a3 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -2,10 +2,6 @@
# The created library will automatically generate the glad sources.
# Consumers can link to the the library.
#
-# configuration variables:
-# GLAD_SOURCES_DIR: path to the sources of glad (=python module)
-#
-#
# glad_add_library(<TARGET> [SHARED|STATIC|MODULE|INTERFACE] [EXCLUDE_FROM_ALL] [MERGE] [QUIET] [LOCATION <PATH>]
# [LANGUAGE <LANG>] [API <API1> [<API2> ...]] [EXTENSIONS [<EXT1> [<EXT2> ...]]])
# - <TARGET>
@@ -38,15 +34,8 @@
# ```
# - create a static glad library with the vulkan=1.1
-cmake_minimum_required(VERSION 3.2)
-project(glad C)
-
find_package(PythonInterp REQUIRED)
-set(GLAD_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE STRING "Directory containing glad generator CMakeLists.txt")
-set(GLAD_SOURCES_DIR "${GLAD_CMAKE_DIR}/../" CACHE STRING "Directory containing glad sources (python modules), used as working directory")
-mark_as_advanced(GLAD_CMAKE_DIR)
-
# Extract specification, profile and version from a string
# examples:
# gl:core=3.3 => SPEC=gl PROFILE=core VERSION=3.3
@@ -242,7 +231,6 @@ function(glad_add_library TARGET)
COMMAND ${PYTHON_EXECUTABLE} -m glad ${GLAD_ARGS}
COMMAND echo Writing ${GLAD_ARGS_PATH}
COMMAND echo ${GLAD_ARGS} > ${GLAD_ARGS_PATH}
- WORKING_DIRECTORY ${GLAD_SOURCES_DIR}
COMMENT "${TARGET}-generate"
USES_TERMINAL
)