diff --git a/ports/vsg/devendor-glslang.patch b/ports/vsg/devendor-glslang.patch new file mode 100644 index 00000000000000..356d4c4041a4d8 --- /dev/null +++ b/ports/vsg/devendor-glslang.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61da709f..472bc6af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,9 +37,11 @@ find_package(Vulkan ${Vulkan_MIN_VERSION} REQUIRED) + + find_package(Threads REQUIRED) + ++find_package(glslang CONFIG 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 (FALSE) + if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/build_vars.cmake) + + if (Git_FOUND) +diff --git a/src/vsg/CMakeLists.txt b/src/vsg/CMakeLists.txt +index 4154312f..49d63b97 100644 +--- a/src/vsg/CMakeLists.txt ++++ b/src/vsg/CMakeLists.txt +@@ -226,7 +226,7 @@ set(SOURCES + utils/LoadPagedLOD.cpp + ) + +-if (${VSG_SUPPORTS_ShaderCompiler}) ++if (FALSE) + + # include glslang source code directly into the VulkanScenegraph library build. + include(../glslang/build_vars.cmake) +@@ -236,6 +236,14 @@ endif() + set(LIBRARIES PUBLIC + Vulkan::Vulkan + Threads::Threads ++ glslang::glslang ++ glslang::OSDependent ++ glslang::MachineIndependent ++ glslang::GenericCodeGen ++ glslang::glslang-default-resource-limits ++ glslang::OGLCompiler ++ glslang::SPVRemapper ++ glslang::SPIRV + ) + + # Check for std::atomic +@@ -364,9 +372,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 diff --git a/ports/vsg/portfile.cmake b/ports/vsg/portfile.cmake new file mode 100644 index 00000000000000..5efaaff6af1958 --- /dev/null +++ b/ports/vsg/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vsg-dev/VulkanSceneGraph + REF "v${VERSION}" + SHA512 da5c9448da6bd2bd6edcb82ed1ac67aded9c3fd957fb7d3c78bb741d8993a5e90b134433237a63bf1a6eb23b30a1e6b4ea2115416f8d32464bd04925d8dbcd34 + HEAD_REF master + PATCHES devendor-glslang.patch +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME "vsg" CONFIG_PATH "lib/cmake/vsg") +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/ports/vsg/vcpkg.json b/ports/vsg/vcpkg.json new file mode 100644 index 00000000000000..dd3b617dc1b1e7 --- /dev/null +++ b/ports/vsg/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "vsg", + "version": "1.0.5", + "description": "A modern, cross platform, high performance scene graph library built upon Vulkan.", + "homepage": "http://www.vulkanscenegraph.org/", + "license": "MIT", + "dependencies": [ + "glslang", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "vulkan" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index c6b5c5427a6700..1147c3584ebcdd 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8388,6 +8388,10 @@ "baseline": "0.5.0", "port-version": 2 }, + "vsg": { + "baseline": "1.0.5", + "port-version": 0 + }, "vtk": { "baseline": "9.2.0-pv5.11.0", "port-version": 6 diff --git a/versions/v-/vsg.json b/versions/v-/vsg.json new file mode 100644 index 00000000000000..440b6c40114975 --- /dev/null +++ b/versions/v-/vsg.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "0542d7bb873d65fa6ecbf2c3a02d7a2c7221d34a", + "version": "1.0.5", + "port-version": 0 + } + ] +}