From 6a681b99ef9d9d9445ded1a44ef39cc3035b60dd Mon Sep 17 00:00:00 2001 From: psy_inf Date: Mon, 31 Jul 2023 21:39:00 +0200 Subject: [PATCH 01/14] Add shader-compiler option and versions 1.0.6, 1.0.7 and 1.0.8 --- recipes/vsg/all/conandata.yml | 10 ++++++++++ recipes/vsg/all/conanfile.py | 6 +++++- recipes/vsg/config.yml | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index f79242254e9e4..54dd35f31f14f 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -8,3 +8,13 @@ sources: "1.0.5": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.5.tar.gz" sha256: "ff58260fcb88d19d92c40a70bc40ff06abb1a8805568eb76862a036d13ada75b" + "1.0.6": + url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.6.tar.gz" + sha256: "01c33a3699f7027590d4c7f5d44a6a472a7048d8ed0387d67e2a4a06b518b90f" + "1.0.7": + url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.7.tar.gz" + sha256: "c6a92495c5c267550927a0a980bb56fe6d3b584aa21a76f72461b1c003d4de08" + "1.0.8": + url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" + sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" + diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index 104e5dc3d7219..c9cceccb4fbe7 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -20,11 +20,13 @@ class VsgConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], + "shader_compiler": [True, False], "max_devices": [1,2,3,4], "fPIC": [True, False], } default_options = { "shared": False, + "shader_compiler": True, "max_devices" : 1, "fPIC": True, } @@ -43,6 +45,8 @@ def _compilers_minimum_version(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.version < "1.0.5": + self.options.shader_compiler = False def configure(self): if self.options.shared: @@ -74,7 +78,7 @@ def generate(self): if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = False tc.variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["VSG_SUPPORTS_ShaderCompiler"] = 0 + tc.variables["VSG_SUPPORTS_ShaderCompiler"] = 1 if self.options.shader_compiler else 0; tc.variables["VSG_MAX_DEVICES"] = self.options.max_devices tc.generate() diff --git a/recipes/vsg/config.yml b/recipes/vsg/config.yml index 058c041064a22..54bfe1969c1b3 100644 --- a/recipes/vsg/config.yml +++ b/recipes/vsg/config.yml @@ -1,4 +1,10 @@ versions: + "1.0.8": + folder: all + "1.0.7": + folder: all + "1.0.6": + folder: all "1.0.5": folder: all "1.0.3": From 20e953aa95db81edf3d08f41449de997371dcd36 Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Sat, 5 Aug 2023 21:54:14 +0200 Subject: [PATCH 02/14] Update conandata.yml --- recipes/vsg/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 54dd35f31f14f..6006daf56d78a 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -17,4 +17,4 @@ sources: "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" - + From 51e7d4a8c8cef342c411a72990716dbebc68ccad Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Sat, 5 Aug 2023 21:54:44 +0200 Subject: [PATCH 03/14] Update conanfile.py --- recipes/vsg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index c9cceccb4fbe7..cb385a2aa92a1 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -78,7 +78,7 @@ def generate(self): if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = False tc.variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["VSG_SUPPORTS_ShaderCompiler"] = 1 if self.options.shader_compiler else 0; + tc.variables["VSG_SUPPORTS_ShaderCompiler"] = 1 if self.options.shader_compiler else 0 tc.variables["VSG_MAX_DEVICES"] = self.options.max_devices tc.generate() From c125aefae40ff3de8929ed4ecabcc8a75d04b698 Mon Sep 17 00:00:00 2001 From: psy_inf Date: Fri, 11 Aug 2023 21:54:06 +0200 Subject: [PATCH 04/14] addressed review comments --- recipes/vsg/all/conanfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index cb385a2aa92a1..4eafcaecff271 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -11,7 +11,11 @@ class VsgConan(ConanFile): name = "vsg" - description = "VulkanSceneGraph" + description = "VulkanSceneGraph (VSG), is a modern, cross platform, \ + high performance scene graph library \ + built upon Vulkan graphics/compute API.\ + The software is written in C++17,\ + and follows the CppCoreGuidelines and FOSS Best Practices." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.vulkanscenegraph.org" @@ -100,7 +104,6 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) rm(self, "Find*.cmake", os.path.join(self.package_folder, "lib/cmake/vsg")) From cb4b07fb950ff05b2418b50aa47be2788fa1ee81 Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Fri, 11 Aug 2023 21:58:42 +0200 Subject: [PATCH 05/14] Update conandata.yml From 59651fc436ddf95d9a797a943ea201d625c40390 Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Fri, 11 Aug 2023 22:00:01 +0200 Subject: [PATCH 06/14] Update conanfile.py --- recipes/vsg/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index 4eafcaecff271..bc25367ab9150 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -13,8 +13,8 @@ class VsgConan(ConanFile): name = "vsg" description = "VulkanSceneGraph (VSG), is a modern, cross platform, \ high performance scene graph library \ - built upon Vulkan graphics/compute API.\ - The software is written in C++17,\ + built upon Vulkan graphics/compute API. \ + The software is written in C++17, \ and follows the CppCoreGuidelines and FOSS Best Practices." license = "MIT" url = "https://github.com/conan-io/conan-center-index" From b70371c36ec61768a3be70d1ad6725aae98b29c0 Mon Sep 17 00:00:00 2001 From: psy_inf Date: Tue, 15 Aug 2023 19:00:34 +0200 Subject: [PATCH 07/14] style fixes --- recipes/vsg/all/conandata.yml | 2 +- recipes/vsg/all/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 6006daf56d78a..54dd35f31f14f 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -17,4 +17,4 @@ sources: "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" - + diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index bc25367ab9150..74ebe72996b4e 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -12,7 +12,7 @@ class VsgConan(ConanFile): name = "vsg" description = "VulkanSceneGraph (VSG), is a modern, cross platform, \ - high performance scene graph library \ + high performance scene graph library \ built upon Vulkan graphics/compute API. \ The software is written in C++17, \ and follows the CppCoreGuidelines and FOSS Best Practices." From e81621a0e2c6478cefebebc7b3b14f24fce60e45 Mon Sep 17 00:00:00 2001 From: psy_inf Date: Tue, 15 Aug 2023 19:18:51 +0200 Subject: [PATCH 08/14] style fixes --- recipes/vsg/all/conandata.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 54dd35f31f14f..6baaedb834e4c 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -17,4 +17,3 @@ sources: "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" - From e0a799274d9824703b860456a622b79356bf622e Mon Sep 17 00:00:00 2001 From: psy_inf Date: Tue, 15 Aug 2023 23:41:59 +0200 Subject: [PATCH 09/14] added 'trade' name to tags --- recipes/vsg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index 74ebe72996b4e..76d5a71ab981f 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -19,7 +19,7 @@ class VsgConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.vulkanscenegraph.org" - topics = ("vulkan", "scenegraph", "graphics", "3d") + topics = ("vulkan", "scenegraph", "graphics", "3d", "VulkanSceneGraph") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { From e7889695fae63cd07d56884763005ad263f1ecb3 Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Wed, 16 Aug 2023 21:34:42 +0200 Subject: [PATCH 10/14] Update conandata.yml removed 1.0.6/1.0.7 version --- recipes/vsg/all/conandata.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 6baaedb834e4c..18cce3dc821f0 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -8,12 +8,6 @@ sources: "1.0.5": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.5.tar.gz" sha256: "ff58260fcb88d19d92c40a70bc40ff06abb1a8805568eb76862a036d13ada75b" - "1.0.6": - url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.6.tar.gz" - sha256: "01c33a3699f7027590d4c7f5d44a6a472a7048d8ed0387d67e2a4a06b518b90f" - "1.0.7": - url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.7.tar.gz" - sha256: "c6a92495c5c267550927a0a980bb56fe6d3b584aa21a76f72461b1c003d4de08" "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" From 1cb80fb64acd5b8bbb363518731c7f4fc1a3d13c Mon Sep 17 00:00:00 2001 From: "S. Messerschmidt" Date: Wed, 16 Aug 2023 22:45:45 +0200 Subject: [PATCH 11/14] Update config.yml removed versions --- recipes/vsg/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/vsg/config.yml b/recipes/vsg/config.yml index 54bfe1969c1b3..17f7ede2ab10a 100644 --- a/recipes/vsg/config.yml +++ b/recipes/vsg/config.yml @@ -1,10 +1,6 @@ versions: "1.0.8": folder: all - "1.0.7": - folder: all - "1.0.6": - folder: all "1.0.5": folder: all "1.0.3": From a6666b624c419586bf326d4a77b34dfe27f2175e Mon Sep 17 00:00:00 2001 From: psy_inf Date: Fri, 18 Aug 2023 21:23:38 +0200 Subject: [PATCH 12/14] using glslang as conan-dependency and corrected minor issues --- recipes/vsg/all/conandata.yml | 3 + recipes/vsg/all/conanfile.py | 12 ++- .../all/patches/0001-glslang-dependency.patch | 86 +++++++++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 recipes/vsg/all/patches/0001-glslang-dependency.patch diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 18cce3dc821f0..0b4f989147f6e 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -11,3 +11,6 @@ sources: "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" +patches: + "1.0.8": + - patch_file: "patches/0001-glslang-dependency.patch" diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index 76d5a71ab981f..b880c26784fca 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import get, copy, rm, rmdir, collect_libs +from conan.tools.files import apply_conandata_patches, get, copy, export_conandata_patches, rm, rmdir, collect_libs from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake @@ -19,7 +19,7 @@ class VsgConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.vulkanscenegraph.org" - topics = ("vulkan", "scenegraph", "graphics", "3d", "VulkanSceneGraph") + topics = ("vulkan", "scenegraph", "graphics", "3d") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -46,6 +46,11 @@ def _compilers_minimum_version(self): "clang": "7", "apple-clang": "10", } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -58,6 +63,8 @@ def configure(self): def requirements(self): self.requires("vulkan-loader/1.3.239.0", transitive_headers=True) + if self.options.shader_compiler and self.version >= "1.0.5": + self.requires("glslang/12.3.1", transitive_headers=True) def validate(self): if self.info.settings.compiler.cppstd: @@ -91,6 +98,7 @@ def generate(self): deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/vsg/all/patches/0001-glslang-dependency.patch b/recipes/vsg/all/patches/0001-glslang-dependency.patch new file mode 100644 index 0000000000000..2b97c61e83a07 --- /dev/null +++ b/recipes/vsg/all/patches/0001-glslang-dependency.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2b162c1..cf0024a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,26 +40,7 @@ find_package(Threads REQUIRED) + # Enable/disable shader compilation support that pulls in glslang + set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." ) + if (VSG_SUPPORTS_ShaderCompiler) +- if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/build_vars.cmake) +- +- if (Git_FOUND) +- +- set(glslang_URL "https://github.com/vsg-dev/glslang.git" CACHE STRING "URL of the glslang git repository") +- set(glslang_branch "VSG-1.0.x" CACHE STRING "branch/tag of the glslang git repository") +- +- execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1 --branch ${glslang_branch} ${glslang_URL} +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src +- RESULT_VARIABLE GIT_SUBMOD_RESULT) +- +- if(NOT GIT_SUBMOD_RESULT EQUAL "0") +- message(WARNING "git clone of glslang failed. ShaderCompile support disabled.") +- set(VSG_SUPPORTS_ShaderCompiler 0) +- endif() +- else() +- message(WARNING "git clone of glslang failed. ShaderCompile support disabled.") +- set(VSG_SUPPORTS_ShaderCompiler 0) +- endif() +- endif() ++ find_package(glslang CONFIG REQUIRED) + endif() + + set(VSG_SUPPORTS_Windowing 1 CACHE STRING "Optional native windowing support providing a default implementation of vsg::Window::create(), 0 for off, 1 for enabled." ) +diff --git a/src/vsg/CMakeLists.txt b/src/vsg/CMakeLists.txt +index dbe8cf83..7bedfb74 100644 +--- a/src/vsg/CMakeLists.txt ++++ b/src/vsg/CMakeLists.txt +@@ -225,18 +225,17 @@ set(SOURCES + utils/LoadPagedLOD.cpp + ) + +-if (${VSG_SUPPORTS_ShaderCompiler}) +- +- # include glslang source code directly into the VulkanScenegraph library build. +- include(../glslang/build_vars.cmake) +-endif() +- + # set up library dependencies + set(LIBRARIES PUBLIC + Vulkan::Vulkan + Threads::Threads + ) +- ++if (${VSG_SUPPORTS_ShaderCompiler}) ++ set(LIBRARIES ${LIBRARIES} PRIVATE ++ glslang::SPIRV ++ glslang::glslang ++ ) ++endif() + # Check for std::atomic + if(NOT MSVC AND NOT ANDROID AND NOT APPLE) + include(CheckCXXSourceCompiles) +@@ -372,10 +371,7 @@ target_compile_definitions(vsg PRIVATE ${EXTRA_DEFINES}) + target_include_directories(vsg + PUBLIC + $ +- $ +- PRIVATE +- $ +- $ ++ $ + ) + + target_link_libraries(vsg ${LIBRARIES}) +diff --git a/src/vsg/utils/ShaderCompiler.cpp b/src/vsg/utils/ShaderCompiler.cpp +index 71a7f09f..803f26a1 100644 +--- a/src/vsg/utils/ShaderCompiler.cpp ++++ b/src/vsg/utils/ShaderCompiler.cpp +@@ -20,7 +20,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI + #include + + #if VSG_SUPPORTS_ShaderCompiler +-# include ++# include + # include + # include + #endif From 33af0232fffc659658f0ffd2bc5f3be5d445ccd0 Mon Sep 17 00:00:00 2001 From: psy_inf Date: Fri, 18 Aug 2023 21:40:00 +0200 Subject: [PATCH 13/14] glslang support for 1.0.5 --- recipes/vsg/all/conandata.yml | 2 + .../all/patches/0002-glslang-dependency.patch | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 recipes/vsg/all/patches/0002-glslang-dependency.patch diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index 0b4f989147f6e..2f99bf81991c6 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -12,5 +12,7 @@ sources: url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" patches: + "1.0.5": + - patch_file: "patches/0002-glslang-dependency.patch" "1.0.8": - patch_file: "patches/0001-glslang-dependency.patch" diff --git a/recipes/vsg/all/patches/0002-glslang-dependency.patch b/recipes/vsg/all/patches/0002-glslang-dependency.patch new file mode 100644 index 0000000000000..06524bc6832c3 --- /dev/null +++ b/recipes/vsg/all/patches/0002-glslang-dependency.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61da709f..046ddce8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,26 +40,7 @@ find_package(Threads REQUIRED) + # Enable/disable shader compilation support that pulls in glslang + set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." ) + if (VSG_SUPPORTS_ShaderCompiler) +- if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/build_vars.cmake) +- +- if (Git_FOUND) +- +- set(glslang_URL "https://github.com/vsg-dev/glslang.git" CACHE STRING "URL of the glslang git repositiory") +- set(glslang_branch "VSG-1.0.x" CACHE STRING "branch/tag of the glslang git repositiory") +- +- execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1 --branch ${glslang_branch} ${glslang_URL} +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src +- RESULT_VARIABLE GIT_SUBMOD_RESULT) +- +- if(NOT GIT_SUBMOD_RESULT EQUAL "0") +- message(WARNING "git clone of glslang failed. ShaderCompile support disabled.") +- set(VSG_SUPPORTS_ShaderCompiler 0) +- endif() +- else() +- message(WARNING "git clone of glslang failed. ShaderCompile support disabled.") +- set(VSG_SUPPORTS_ShaderCompiler 0) +- endif() +- endif() ++ find_package(glslang CONFIG REQUIRED) + endif() + + set(VSG_SUPPORTS_Windowing 1 CACHE STRING "Optional native windowing support providing a default implementation of vsg::Window::create(), 0 for off, 1 for enabled." ) +diff --git a/src/vsg/CMakeLists.txt b/src/vsg/CMakeLists.txt +index 4154312f..6c79f7b7 100644 +--- a/src/vsg/CMakeLists.txt ++++ b/src/vsg/CMakeLists.txt +@@ -226,18 +226,20 @@ set(SOURCES + utils/LoadPagedLOD.cpp + ) + +-if (${VSG_SUPPORTS_ShaderCompiler}) +- +- # include glslang source code directly into the VulkanScenegraph library build. +- include(../glslang/build_vars.cmake) +-endif() +- + # set up library dependencies + set(LIBRARIES PUBLIC + Vulkan::Vulkan + Threads::Threads + ) + ++ ++if (${VSG_SUPPORTS_ShaderCompiler}) ++ set(LIBRARIES ${LIBRARIES} PRIVATE ++ glslang::SPIRV ++ glslang::glslang ++ ) ++endif() ++ + # Check for std::atomic + if(NOT MSVC AND NOT ANDROID AND NOT APPLE) + check_cxx_source_compiles(" +@@ -364,9 +366,6 @@ target_include_directories(vsg + PUBLIC + $ + $ +- PRIVATE +- $ +- $ + ) + + target_link_libraries(vsg ${LIBRARIES}) +diff --git a/src/vsg/utils/ShaderCompiler.cpp b/src/vsg/utils/ShaderCompiler.cpp +index 71a7f09f..803f26a1 100644 +--- a/src/vsg/utils/ShaderCompiler.cpp ++++ b/src/vsg/utils/ShaderCompiler.cpp +@@ -20,7 +20,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI + #include + + #if VSG_SUPPORTS_ShaderCompiler +-# include ++# include + # include + # include + #endif From baf37ab22d82e0b71314d6cadb969bd48fa4686d Mon Sep 17 00:00:00 2001 From: psy_inf Date: Mon, 16 Oct 2023 20:55:42 +0200 Subject: [PATCH 14/14] exporting cmake_build_modules removing non-supported versions for now --- recipes/vsg/all/conandata.yml | 5 ----- recipes/vsg/all/conanfile.py | 4 +++- recipes/vsg/config.yml | 2 -- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/recipes/vsg/all/conandata.yml b/recipes/vsg/all/conandata.yml index f889cfb0feffd..2f99bf81991c6 100644 --- a/recipes/vsg/all/conandata.yml +++ b/recipes/vsg/all/conandata.yml @@ -11,13 +11,8 @@ sources: "1.0.8": url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/refs/tags/v1.0.8.tar.gz" sha256: "0017cbb1c06b6c62c3ca2a222f083aecbc4ef0b6fc9b9e173cb8d3f005d13e62" - "1.0.9": - url: "https://github.com/vsg-dev/VulkanSceneGraph/archive/v1.0.9.tar.gz" - sha256: "9a62be7facc13c391c33dc8356b147a3b86f531ea72a28f6b2c364777e761412" patches: "1.0.5": - patch_file: "patches/0002-glslang-dependency.patch" "1.0.8": - patch_file: "patches/0001-glslang-dependency.patch" - "1.0.8": - - patch_file: "patches/0001-glslang-dependency.patch" diff --git a/recipes/vsg/all/conanfile.py b/recipes/vsg/all/conanfile.py index b880c26784fca..b459edf3270e3 100644 --- a/recipes/vsg/all/conanfile.py +++ b/recipes/vsg/all/conanfile.py @@ -125,9 +125,11 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("pthread") - + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "vsg", "vsgMacros.cmake")]) + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "vsg" self.cpp_info.filenames["cmake_find_package_multi"] = "vsg" self.cpp_info.names["cmake_find_package"] = "VSG" self.cpp_info.names["cmake_find_package_multi"] = "vsg" + \ No newline at end of file diff --git a/recipes/vsg/config.yml b/recipes/vsg/config.yml index 960a3d6455339..17f7ede2ab10a 100644 --- a/recipes/vsg/config.yml +++ b/recipes/vsg/config.yml @@ -1,6 +1,4 @@ versions: - "1.0.9": - folder: all "1.0.8": folder: all "1.0.5":