diff --git a/Engine/Source/Common/CMakeLists.txt b/Engine/Source/Common/CMakeLists.txt index 944ceb38..044ee744 100644 --- a/Engine/Source/Common/CMakeLists.txt +++ b/Engine/Source/Common/CMakeLists.txt @@ -4,7 +4,7 @@ exp_add_library( TYPE STATIC SRC ${sources} PUBLIC_INC Include - PUBLIC_LIB rapidjson::rapidjson debugbreak::debugbreak cityhash::cityhash Taskflow::Taskflow + PUBLIC_LIB rapidjson debugbreak::debugbreak cityhash::cityhash Taskflow::Taskflow ) file(GLOB test_sources Test/*.cpp) diff --git a/Engine/Source/Launch/CMakeLists.txt b/Engine/Source/Launch/CMakeLists.txt index 113ae20f..03a8e62d 100644 --- a/Engine/Source/Launch/CMakeLists.txt +++ b/Engine/Source/Launch/CMakeLists.txt @@ -4,5 +4,5 @@ exp_add_library( TYPE STATIC SRC ${sources} PUBLIC_INC Include - PUBLIC_LIB Runtime glfw::glfw + PUBLIC_LIB Runtime glfw ) \ No newline at end of file diff --git a/Sample/CMakeLists.txt b/Sample/CMakeLists.txt index 601d90f8..2b512a8b 100644 --- a/Sample/CMakeLists.txt +++ b/Sample/CMakeLists.txt @@ -55,7 +55,7 @@ exp_add_library( NAME Sample-Base SRC ${sources} PUBLIC_INC Base - PUBLIC_LIB RHI ${platform_ext_libs} Render.Static glfw::glfw clipp::clipp stb::stb assimp::assimp + PUBLIC_LIB RHI ${platform_ext_libs} Render.Static glfw clipp::clipp stb::stb assimp::assimp NOT_INSTALL ) diff --git a/ThirdParty/ConanRecipes/glfw/conandata.yml b/ThirdParty/ConanRecipes/glfw/conandata.yml deleted file mode 100644 index 1161fb89..00000000 --- a/ThirdParty/ConanRecipes/glfw/conandata.yml +++ /dev/null @@ -1,6 +0,0 @@ -platforms: - - Windows-x86_64 - - Macos-armv8 -sources: - "3.4-exp": - commit: "7b6aead9fb88b3623e3b3725ebb42670cbe4c579" diff --git a/ThirdParty/ConanRecipes/glfw/conanfile.py b/ThirdParty/ConanRecipes/glfw/conanfile.py deleted file mode 100644 index 88374883..00000000 --- a/ThirdParty/ConanRecipes/glfw/conanfile.py +++ /dev/null @@ -1,63 +0,0 @@ -from conan import ConanFile -from conan.tools.build import check_min_cppstd, can_run -from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake -from conan.tools.files import apply_conandata_patches -from conan.tools.scm import Git -import os - -required_conan_version = ">=2.0.9" - -class GlfwConan(ConanFile): - name = "glfw" - description = "glfw window library" - license = "https://github.com/glfw/glfw?tab=Zlib-1-ov-file" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/glfw/glfw" - topics = ("opengl", "vulkan", "window-management") - package_type = "static-library" - settings = "os", "arch", "compiler", "build_type" - options = {} - default_options = {} - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - check_min_cppstd(self, 17) - - def build_requirements(self): - self.tool_requires("ninja/[>=1.12]") - self.tool_requires("cmake/[>=3.16]") - - def source(self): - git = Git(self) - git.clone("https://github.com/glfw/glfw", target=".") - git.checkout(self.conan_data["sources"][self.version]["commit"]) - apply_conandata_patches(self) - - def generate(self): - cmake_toolchain = CMakeToolchain(self, generator="Ninja") - cmake_toolchain.generate() - - deps = CMakeDeps(self) - deps.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "glfw") - self.cpp_info.includedirs = ["include"] - self.cpp_info.libs = ["glfw3"] - self.cpp_info.libdirs = ["lib"] - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/glfw/test_package/CMakeLists.txt b/ThirdParty/ConanRecipes/glfw/test_package/CMakeLists.txt deleted file mode 100644 index 11150a2e..00000000 --- a/ThirdParty/ConanRecipes/glfw/test_package/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES CXX) - -find_package(glfw REQUIRED) - -if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - set(platform_ext_libs - "-framework Cocoa" - "-framework IOKit" - "-framework CoreFoundation") -endif() - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE glfw::glfw ${platform_ext_libs}) diff --git a/ThirdParty/ConanRecipes/glfw/test_package/conanfile.py b/ThirdParty/ConanRecipes/glfw/test_package/conanfile.py deleted file mode 100644 index 2e77b424..00000000 --- a/ThirdParty/ConanRecipes/glfw/test_package/conanfile.py +++ /dev/null @@ -1,25 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/glfw/test_package/test_package.cpp b/ThirdParty/ConanRecipes/glfw/test_package/test_package.cpp deleted file mode 100644 index 56f66423..00000000 --- a/ThirdParty/ConanRecipes/glfw/test_package/test_package.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(void) { - glfwInit(); - glfwTerminate(); - return 0; -} diff --git a/ThirdParty/ConanRecipes/rapidjson/conandata.yml b/ThirdParty/ConanRecipes/rapidjson/conandata.yml deleted file mode 100644 index 886539e8..00000000 --- a/ThirdParty/ConanRecipes/rapidjson/conandata.yml +++ /dev/null @@ -1,6 +0,0 @@ -platforms: - - Windows-x86_64 - - Macos-armv8 -sources: - "cci.20250205-exp": - commit: "24b5e7a8b27f42fa16b96fc70aade9106cf7102f" diff --git a/ThirdParty/ConanRecipes/rapidjson/conanfile.py b/ThirdParty/ConanRecipes/rapidjson/conanfile.py deleted file mode 100644 index 28fc23df..00000000 --- a/ThirdParty/ConanRecipes/rapidjson/conanfile.py +++ /dev/null @@ -1,38 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.scm import Git -from conan.tools.files import apply_conandata_patches, get, copy -import os - -required_conan_version = ">=2.0.9" - -class RapidJsonConan(ConanFile): - name = "rapidjson" - description = "rapidjson" - license = "https://github.com/Tencent/rapidjson?tab=License-1-ov-file" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/Tencent/rapidjson" - topics = ("utils", "json") - package_type = "header-library" - - def layout(self): - self.folders.source = "src" - self.folders.build = "build" - self.folders.generators = "build/generators" - - def source(self): - git = Git(self) - git.clone("https://github.com/Tencent/rapidjson.git", target=".") - git.checkout(self.conan_data["sources"][self.version]["commit"]) - apply_conandata_patches(self) - - def package(self): - copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) - - def package_info(self): - self.cpp_info.includedirs = ["include"] - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/rapidjson/test_package/CMakeLists.txt b/ThirdParty/ConanRecipes/rapidjson/test_package/CMakeLists.txt deleted file mode 100644 index 3c9040e6..00000000 --- a/ThirdParty/ConanRecipes/rapidjson/test_package/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES CXX) - -find_package(rapidjson REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE rapidjson::rapidjson) diff --git a/ThirdParty/ConanRecipes/rapidjson/test_package/conanfile.py b/ThirdParty/ConanRecipes/rapidjson/test_package/conanfile.py deleted file mode 100644 index 2e77b424..00000000 --- a/ThirdParty/ConanRecipes/rapidjson/test_package/conanfile.py +++ /dev/null @@ -1,25 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/rapidjson/test_package/test_package.cpp b/ThirdParty/ConanRecipes/rapidjson/test_package/test_package.cpp deleted file mode 100644 index 0db25650..00000000 --- a/ThirdParty/ConanRecipes/rapidjson/test_package/test_package.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int main(void) { - const char* json = "{\"a\": true, \"b\": 1, \"c\": \"2\"}"; - rapidjson::Document document; - document.Parse(json); - assert(document.IsObject()); - return 0; -} diff --git a/ThirdParty/ConanRecipes/vulkan-utility-libraries/conandata.yml b/ThirdParty/ConanRecipes/vulkan-utility-libraries/conandata.yml deleted file mode 100644 index b69752d1..00000000 --- a/ThirdParty/ConanRecipes/vulkan-utility-libraries/conandata.yml +++ /dev/null @@ -1,6 +0,0 @@ -platforms: - - Windows-x86_64 - - Macos-armv8 -sources: - "1.4.313.0-exp": - branch: "vulkan-sdk-1.4.313" diff --git a/ThirdParty/ConanRecipes/vulkan-utility-libraries/conanfile.py b/ThirdParty/ConanRecipes/vulkan-utility-libraries/conanfile.py deleted file mode 100644 index 17817d35..00000000 --- a/ThirdParty/ConanRecipes/vulkan-utility-libraries/conanfile.py +++ /dev/null @@ -1,84 +0,0 @@ -from conan import ConanFile -from conan.tools.build import check_min_cppstd, can_run -from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake -from conan.tools.files import apply_conandata_patches -from conan.tools.scm import Git -import os - -required_conan_version = ">=2.0.9" - -class VulkanUtilityLibrariesConan(ConanFile): - name = "vulkan-utility-libraries" - description = "vulkan utility libraries" - license = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries?tab=License-1-ov-file" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries" - topics = ("vulkan", "utils") - package_type = "static-library" - settings = "os", "arch", "compiler", "build_type" - options = {} - default_options = {} - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - check_min_cppstd(self, 17) - - def requirements(self): - base_version = self.version.replace("-exp", "") - self.requires(f"vulkan-headers/{base_version}", transitive_headers=True) - - def build_requirements(self): - self.tool_requires("ninja/[>=1.12]") - self.tool_requires("cmake/[>=3.16]") - - def source(self): - git = Git(self) - git.clone("https://github.com/KhronosGroup/Vulkan-Utility-Libraries", target=".", args=["-b", self.conan_data["sources"][self.version]["branch"]]) - apply_conandata_patches(self) - - def generate(self): - cmake_toolchain = CMakeToolchain(self, generator="Ninja") - cmake_toolchain.generate() - - deps = CMakeDeps(self) - deps.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "VulkanUtilityLibraries") - - self.cpp_info.components["vulkanlayersettings"].set_property("cmake_target_name", "Vulkan::LayerSettings") - self.cpp_info.components["vulkanlayersettings"].bindirs = [] - self.cpp_info.components["vulkanlayersettings"].libdirs = ["lib"] - self.cpp_info.components["vulkanlayersettings"].includedirs = ["include"] - self.cpp_info.components["vulkanlayersettings"].requires = ["vulkan-headers::vulkanheaders"] - self.cpp_info.components["vulkanlayersettings"].libs = ["VulkanLayerSettings"] - - self.cpp_info.components["vulkanutilityheaders"].set_property("cmake_target_name", "Vulkan::UtilityHeaders") - self.cpp_info.components["vulkanutilityheaders"].bindirs = [] - self.cpp_info.components["vulkanutilityheaders"].libdirs = [] - self.cpp_info.components["vulkanutilityheaders"].includedirs = ["include"] - self.cpp_info.components["vulkanutilityheaders"].requires = ["vulkan-headers::vulkanheaders"] - self.cpp_info.components["vulkanutilityheaders"].libs = [] - - self.cpp_info.components["vulkansafestruct"].set_property("cmake_target_name", "Vulkan::SafeStruct") - self.cpp_info.components["vulkansafestruct"].bindirs = [] - self.cpp_info.components["vulkansafestruct"].libdirs = ["lib"] - self.cpp_info.components["vulkansafestruct"].includedirs = ["include"] - self.cpp_info.components["vulkansafestruct"].requires = ["vulkan-headers::vulkanheaders", "vulkanutilityheaders"] - self.cpp_info.components["vulkansafestruct"].libs = ["VulkanSafeStruct"] - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/CMakeLists.txt b/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/CMakeLists.txt deleted file mode 100644 index 7c3013bc..00000000 --- a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES CXX) - -find_package(VulkanUtilityLibraries REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE Vulkan::LayerSettings Vulkan::UtilityHeaders Vulkan::SafeStruct) diff --git a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/conanfile.py b/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/conanfile.py deleted file mode 100644 index 2e77b424..00000000 --- a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/conanfile.py +++ /dev/null @@ -1,25 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/test_package.cpp b/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/test_package.cpp deleted file mode 100644 index 4f74a926..00000000 --- a/ThirdParty/ConanRecipes/vulkan-utility-libraries/test_package/test_package.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - vku::safe_VkInstanceCreateInfo safe_info; - return 0; -} diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/conandata.yml b/ThirdParty/ConanRecipes/vulkan-validationlayers/conandata.yml deleted file mode 100644 index 6e4921e7..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/conandata.yml +++ /dev/null @@ -1,13 +0,0 @@ -platforms: - - Windows-x86_64 - - Macos-armv8 -requires: - - vulkan-utility-libraries -sources: - "1.4.313.0-exp": - branch: "vulkan-sdk-1.4.313" -patches: - "1.4.313.0-exp": - - patch_file: patches/0000-fix-spirv-tools-includes.patch - patch_description: fix spir-v tools includes - patch_type: portability diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/conanfile.py b/ThirdParty/ConanRecipes/vulkan-validationlayers/conanfile.py deleted file mode 100644 index 6740f211..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/conanfile.py +++ /dev/null @@ -1,79 +0,0 @@ -from os import mkdir - -from conan import ConanFile -from conan.tools.build import check_min_cppstd, can_run -from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake -from conan.tools.files import apply_conandata_patches, export_conandata_patches -from conan.tools.scm import Git -import os - -required_conan_version = ">=2.0.9" - -class VulkanValidationLayersConan(ConanFile): - name = "vulkan-validationlayers" - description = "vulkan validation layers" - license = "https://github.com/KhronosGroup/Vulkan-ValidationLayers?tab=License-1-ov-file" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" - topics = ("vulkan", "debug") - package_type = "shared-library" - settings = "os", "arch", "compiler", "build_type" - options = {} - default_options = {} - - def export_sources(self): - export_conandata_patches(self) - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - check_min_cppstd(self, 17) - - def requirements(self): - base_version = self.version.replace("-exp", "") - self.requires(f"vulkan-headers/{base_version}") - self.requires(f"spirv-headers/{base_version}") - self.requires(f"spirv-tools/{base_version}") - self.requires(f"vulkan-utility-libraries/{self.version}") - - def build_requirements(self): - self.tool_requires("ninja/[>=1.12]") - self.tool_requires("cmake/[>=3.16]") - - def source(self): - git = Git(self) - git.clone("https://github.com/KhronosGroup/Vulkan-ValidationLayers", target=".", args=["-b", self.conan_data["sources"][self.version]["branch"]]) - apply_conandata_patches(self) - - def generate(self): - cmake_toolchain = CMakeToolchain(self, generator="Ninja") - cmake_toolchain.cache_variables["UPDATE_DEPS"] = "OFF" - cmake_toolchain.cache_variables["BUILD_WERROR"] = "OFF" - cmake_toolchain.cache_variables["BUILD_TESTS"] = "OFF" - cmake_toolchain.generate() - - deps = CMakeDeps(self) - deps.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - os.mkdir(os.path.join(self.package_folder, "include")) - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "VulkanValidationLayers") - self.cpp_info.bindirs = ["bin"] - self.cpp_info.includedirs = ["include"] - self.cpp_info.libs = [] - self.cpp_info.libdirs = [] - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/patches/0000-fix-spirv-tools-includes.patch b/ThirdParty/ConanRecipes/vulkan-validationlayers/patches/0000-fix-spirv-tools-includes.patch deleted file mode 100644 index 10985357..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/patches/0000-fix-spirv-tools-includes.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2e18b94238535157d98b0ccfa9df9e6d8a96fe7b Mon Sep 17 00:00:00 2001 -From: kindem -Date: Sat, 20 Dec 2025 17:16:43 +0800 -Subject: [PATCH] fix: spirv tools includes - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f2c844b7a..9af78879d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -115,7 +115,7 @@ find_package(VulkanUtilityLibraries CONFIG QUIET) - - find_package(SPIRV-Headers CONFIG QUIET) - --find_package(SPIRV-Tools-opt CONFIG QUIET) -+find_package(SPIRV-Tools CONFIG QUIET) - - # NOTE: Our custom code generation target isn't desirable for system package managers or add_subdirectory users. - # So this target needs to be off by default to avoid obtuse build errors or patches. --- -2.50.1.windows.1 - diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/CMakeLists.txt b/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/CMakeLists.txt deleted file mode 100644 index b52a2443..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES CXX) - -find_package(VulkanValidationLayers REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) - -if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - add_custom_command( - TARGET ${PROJECT_NAME} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VulkanValidationLayers_INCLUDE_DIR}/../bin/VkLayer_khronos_validation.dll $/VkLayer_khronos_validation.dll - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VulkanValidationLayers_INCLUDE_DIR}/../bin/VkLayer_khronos_validation.json $/VkLayer_khronos_validation.json - ) -elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - add_custom_command( - TARGET ${PROJECT_NAME} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VulkanValidationLayers_INCLUDE_DIR}/../lib/libVkLayer_khronos_validation.dylib $/VkLayer_khronos_validation.dylib - COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${VulkanValidationLayers_INCLUDE_DIR}/../share/vulkan $/vulkan - ) -else () - message(FATAL_ERROR "os ${CMAKE_SYSTEM_NAME} not supported yet in test package") -endif () - diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/conanfile.py b/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/conanfile.py deleted file mode 100644 index 2e77b424..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/conanfile.py +++ /dev/null @@ -1,25 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") - self.run(bin_path, env="conanrun") diff --git a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/test_package.cpp b/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/test_package.cpp deleted file mode 100644 index e9cdae16..00000000 --- a/ThirdParty/ConanRecipes/vulkan-validationlayers/test_package/test_package.cpp +++ /dev/null @@ -1,3 +0,0 @@ -int main() { - return 0; -} \ No newline at end of file diff --git a/ThirdParty/Registry.cmake b/ThirdParty/Registry.cmake index c062eb43..1e50afeb 100644 --- a/ThirdParty/Registry.cmake +++ b/ThirdParty/Registry.cmake @@ -5,7 +5,7 @@ else () endif () find_package(httplib REQUIRED GLOBAL) -find_package(glfw REQUIRED GLOBAL) +find_package(glfw3 REQUIRED GLOBAL) find_package(stb REQUIRED GLOBAL) find_package(cityhash REQUIRED GLOBAL) find_package(GTest REQUIRED GLOBAL) @@ -14,22 +14,29 @@ find_package(libclang REQUIRED GLOBAL) find_package(assimp REQUIRED GLOBAL) find_package(VulkanMemoryAllocator REQUIRED GLOBAL) find_package(debugbreak REQUIRED GLOBAL) -find_package(rapidjson REQUIRED GLOBAL) +find_package(RapidJSON REQUIRED GLOBAL) find_package(clipp REQUIRED GLOBAL) find_package(dxc REQUIRED GLOBAL) find_package(VulkanHeaders REQUIRED GLOBAL) find_package(VulkanLoader REQUIRED GLOBAL) -find_package(VulkanValidationLayers REQUIRED GLOBAL) +find_package(vulkan-validationlayers REQUIRED GLOBAL) find_package(spirv-cross REQUIRED GLOBAL) +# The official vulkan-validationlayers package only ships a runtime layer with no headers or link libraries, so the +# generator declares no usable target. Recreate it as an imported target so it can carry the RUNTIME_DEP layer files +# and still be linked by RHI-Vulkan the same way as before. +if (NOT TARGET vulkan-validationlayers::vulkan-validationlayers) + add_library(vulkan-validationlayers::vulkan-validationlayers INTERFACE IMPORTED GLOBAL) +endif () + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_package(DirectX-Headers REQUIRED GLOBAL) set_target_properties(assimp::assimp PROPERTIES RUNTIME_DEP "${assimp_INCLUDE_DIR}/../bin/assimp-vc${MSVC_TOOLSET_VERSION}-mt.dll") set_target_properties(libclang::libclang PROPERTIES RUNTIME_DEP "${libclang_INCLUDE_DIR}/../bin/libclang.dll") set_target_properties(dxc::dxc PROPERTIES RUNTIME_DEP "${dxc_INCLUDE_DIR}/../bin/dxil.dll;${dxc_INCLUDE_DIR}/../bin/dxcompiler.dll") - set_target_properties(vulkan-validationlayers::vulkan-validationlayers PROPERTIES RUNTIME_DEP "${VulkanValidationLayers_INCLUDE_DIR}/../bin/VkLayer_khronos_validation.dll;${VulkanValidationLayers_INCLUDE_DIR}/../bin/VkLayer_khronos_validation.json") + set_target_properties(vulkan-validationlayers::vulkan-validationlayers PROPERTIES RUNTIME_DEP "${vulkan-validationlayers_PACKAGE_FOLDER_RELEASE}/bin/VkLayer_khronos_validation.dll;${vulkan-validationlayers_PACKAGE_FOLDER_RELEASE}/bin/VkLayer_khronos_validation.json") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") find_package(MoltenVK REQUIRED GLOBAL) - set_target_properties(vulkan-validationlayers::vulkan-validationlayers PROPERTIES RUNTIME_DEP "${VulkanValidationLayers_INCLUDE_DIR}/../lib/libVkLayer_khronos_validation.dylib;${VulkanValidationLayers_INCLUDE_DIR}/../share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json") + set_target_properties(vulkan-validationlayers::vulkan-validationlayers PROPERTIES RUNTIME_DEP "${vulkan-validationlayers_PACKAGE_FOLDER_RELEASE}/lib/libVkLayer_khronos_validation.dylib;${vulkan-validationlayers_PACKAGE_FOLDER_RELEASE}/res/vulkan/explicit_layer.d/VkLayer_khronos_validation.json") set_target_properties(molten-vk::molten-vk PROPERTIES RUNTIME_DEP "${MoltenVK_INCLUDE_DIR}/../lib/libMoltenVK.dylib;${MoltenVK_INCLUDE_DIR}/../lib/MoltenVK_icd.json") endif () diff --git a/conanfile.py b/conanfile.py index 2c96d2f6..0b3df166 100644 --- a/conanfile.py +++ b/conanfile.py @@ -10,22 +10,22 @@ def requirements(self): self.requires("cityhash/1.0.1") self.requires("gtest/1.17.0") self.requires("taskflow/3.10.0") - self.requires("vulkan-headers/1.4.313.0") - self.requires("vulkan-loader/1.4.313.0") + self.requires("vulkan-headers/1.4.350.0") + self.requires("vulkan-loader/1.4.350.0") self.requires("vulkan-memory-allocator/3.3.0") - self.requires("spirv-cross/1.4.313.0") + self.requires("spirv-cross/1.4.350.0") + self.requires("vulkan-validationlayers/1.4.350.0") + self.requires("glfw/3.4") + self.requires("rapidjson/cci.20250205") if self.settings.os == "Windows": self.requires("directx-headers/1.610.2") # private repo - self.requires("glfw/3.4-exp") self.requires("libclang/22.1.6-exp") self.requires("qt/6.10.3-exp") self.requires("debugbreak/1.0-exp") - self.requires("rapidjson/cci.20250205-exp") self.requires("assimp/6.0.2-exp") self.requires("clipp/1.2.3-exp") self.requires("dxc/1.8.2505.1-exp") - self.requires("vulkan-validationlayers/1.4.313.0-exp") if self.settings.os == "Macos": self.requires("molten-vk/1.4.1-exp")