From 78f2a4bb4d8369b7a60efbd58f4aef2f0b2f97fa Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 18:38:39 -0300 Subject: [PATCH 1/6] bump vk-bootstrap to v1.3.296 --- recipes/vk-bootstrap/all/conandata.yml | 29 +++----------------------- recipes/vk-bootstrap/all/conanfile.py | 21 ++++++++----------- recipes/vk-bootstrap/config.yml | 14 +++---------- 3 files changed, 15 insertions(+), 49 deletions(-) diff --git a/recipes/vk-bootstrap/all/conandata.yml b/recipes/vk-bootstrap/all/conandata.yml index d3c923855081d..c1e40af3ac0e6 100644 --- a/recipes/vk-bootstrap/all/conandata.yml +++ b/recipes/vk-bootstrap/all/conandata.yml @@ -1,30 +1,7 @@ sources: + "1.3.296": + url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v1.3.296.tar.gz" + sha256: "fbff2746134459648a488588a71609d11e6e00f591ac4a3cc6683a131bf31a53" "0.7": url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v0.7.tar.gz" sha256: "7b2c30a4c46514cc5b20d2bebab25c495df39574b9e117c760d1cfe19f71d9aa" - "0.6": - url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v0.6.tar.gz" - sha256: "95dedaa5cedf7a271f051d91b24b3b6c78aa3c5b2bc3cf058554c92748a421b2" - "0.5": - url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v0.5.tar.gz" - sha256: "7ec1017d71d48595c078a4488140b230fd9cad1059986a18a507f356bf00e89b" - "0.4": - url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v0.4.tar.gz" - sha256: "ba03449bb964d6cabbae3b6d6c8fce6e4276e4190885f9b5efc56153ef4b3c39" - "0.3.1": - url: "https://github.com/charles-lunarg/vk-bootstrap/archive/refs/tags/v0.3.1.tar.gz" - sha256: "bed3333c17acef9249a0095c070b80644d7f275d2479e7c07032fb9532704d70" - "0.2": - url: "https://github.com/charles-lunarg/vk-bootstrap/archive/v0.2.tar.gz" - sha256: "45afc9c2c90309f768786c8014913627e6f1cb4db20449a65b98283b58918483" -patches: - "0.6": - - patch_file: "patches/0001-fix-cmake-0.6.patch" - "0.5": - - patch_file: "patches/0001-fix-cmake-0.5.patch" - "0.4": - - patch_file: "patches/0001-fix-cmake-0.4.patch" - "0.3.1": - - patch_file: "patches/0001-fix-cmake-0.3.1.patch" - "0.2": - - patch_file: "patches/0001-fix-cmake-0.2.patch" diff --git a/recipes/vk-bootstrap/all/conanfile.py b/recipes/vk-bootstrap/all/conanfile.py index 2d7b6c5514a0c..985bd597d8cd1 100644 --- a/recipes/vk-bootstrap/all/conanfile.py +++ b/recipes/vk-bootstrap/all/conanfile.py @@ -58,8 +58,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.7": - self.requires("vulkan-headers/1.3.236.0", transitive_headers=True) + if Version(self.version) > Version("1.0"): + self.requires(f"vulkan-headers/{self.version}.0", transitive_headers=True) else: self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) @@ -88,17 +88,14 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["VK_BOOTSTRAP_TEST"] = False - vulkan_headers = self.dependencies["vulkan-headers"] - includedirs = ";".join( - [os.path.join(vulkan_headers.package_folder, includedir).replace("\\", "/") - for includedir in vulkan_headers.cpp_info.includedirs], - ) - if Version(self.version) < "0.3.0": - tc.variables["Vulkan_INCLUDE_DIR"] = includedirs - else: + tc.variables["VK_BOOTSTRAP_WERROR"] = False + if Version(self.version) < Version("1.0"): + vulkan_headers = self.dependencies["vulkan-headers"] + includedirs = ";".join( + [os.path.join(vulkan_headers.package_folder, includedir).replace("\\", "/") + for includedir in vulkan_headers.cpp_info.includedirs], + ) tc.variables["VK_BOOTSTRAP_VULKAN_HEADER_DIR"] = includedirs - if Version(self.version) >= "0.4.0": - tc.variables["VK_BOOTSTRAP_WERROR"] = False tc.generate() def build(self): diff --git a/recipes/vk-bootstrap/config.yml b/recipes/vk-bootstrap/config.yml index eaed33f60995e..c87206ed9a6c9 100644 --- a/recipes/vk-bootstrap/config.yml +++ b/recipes/vk-bootstrap/config.yml @@ -1,13 +1,5 @@ versions: - "0.7": - folder: all - "0.6": - folder: all - "0.5": - folder: all - "0.4": - folder: all - "0.3.1": - folder: all - "0.2": + "1.3.296": folder: all + "0.7": + folder: all \ No newline at end of file From 0803a56ffd9b927ecfcf7e3e4d0228f22305b9a2 Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 19:45:33 -0300 Subject: [PATCH 2/6] remove files not needed --- .../all/patches/0001-fix-cmake-0.2.patch | 43 ------------------- .../all/patches/0001-fix-cmake-0.3.1.patch | 23 ---------- .../all/patches/0001-fix-cmake-0.4.patch | 11 ----- .../all/patches/0001-fix-cmake-0.5.patch | 20 --------- .../all/patches/0001-fix-cmake-0.6.patch | 13 ------ .../all/test_v1_package/CMakeLists.txt | 8 ---- .../all/test_v1_package/conanfile.py | 17 -------- 7 files changed, 135 deletions(-) delete mode 100644 recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.2.patch delete mode 100644 recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.3.1.patch delete mode 100644 recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.4.patch delete mode 100644 recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.5.patch delete mode 100644 recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.6.patch delete mode 100644 recipes/vk-bootstrap/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/vk-bootstrap/all/test_v1_package/conanfile.py diff --git a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.2.patch b/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.2.patch deleted file mode 100644 index 2f8cf8a9dc4fe..0000000000000 --- a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.2.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,7 +1,6 @@ - cmake_minimum_required(VERSION 3.10 FATAL_ERROR) - project(VulkanBootstrap) - --find_package(Vulkan REQUIRED) - - add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp) - add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap) -@@ -21,11 +20,9 @@ target_compile_options(vk-bootstrap-compiler-warnings - $<$,$,${VK_BOOTSTRAP_COMPILER_CLANGPP}>: - -Wall - -Wextra -- -pedantic-errors - -Wconversion - -Wsign-conversion> - $<$: -- /WX - /W4> - ) - -@@ -33,11 +30,19 @@ target_include_directories(vk-bootstrap PUBLIC src) - target_include_directories(vk-bootstrap PUBLIC ${Vulkan_INCLUDE_DIR}) - target_link_libraries(vk-bootstrap - PRIVATE -+ ${CMAKE_DL_LIBS} - vk-bootstrap-compiler-warnings) -+target_compile_features(vk-bootstrap PUBLIC cxx_std_14) -+include(GNUInstallDirs) -+install(FILES src/VkBootstrap.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+install(TARGETS vk-bootstrap -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) - --if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) -+if (VK_BOOTSTRAP_TEST) - - add_subdirectory(ext) - add_subdirectory(tests) diff --git a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.3.1.patch b/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.3.1.patch deleted file mode 100644 index fec9e86ac4740..0000000000000 --- a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.3.1.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,11 +43,9 @@ target_compile_options(vk-bootstrap-compiler-warnings - $<$,$,${VK_BOOTSTRAP_COMPILER_CLANGPP}>: - -Wall - -Wextra -- -pedantic-errors - -Wconversion - -Wsign-conversion> - $<$: -- /WX - /W4> - ) - -@@ -71,7 +69,7 @@ install(TARGETS vk-bootstrap - - option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) - --if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) -+if (VK_BOOTSTRAP_TEST) - - add_subdirectory(ext) - add_subdirectory(tests) diff --git a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.4.patch b/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.4.patch deleted file mode 100644 index 0305fb75872ef..0000000000000 --- a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -81,7 +81,7 @@ install(TARGETS vk-bootstrap - - option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) - --if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) -+if (VK_BOOTSTRAP_TEST) - - add_subdirectory(ext) - add_subdirectory(tests) diff --git a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.5.patch b/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.5.patch deleted file mode 100644 index 1a523c52ff350..0000000000000 --- a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.5.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -72,7 +72,7 @@ target_link_libraries(vk-bootstrap - target_compile_features(vk-bootstrap PUBLIC cxx_std_14) - - include(GNUInstallDirs) --install(FILES src/VkBootstrap.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+install(FILES src/VkBootstrap.h src/VkBootstrapDispatch.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(TARGETS vk-bootstrap - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -80,7 +80,7 @@ install(TARGETS vk-bootstrap - - option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) - --if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) -+if (VK_BOOTSTRAP_TEST) - - add_subdirectory(ext) - add_subdirectory(tests) diff --git a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.6.patch b/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.6.patch deleted file mode 100644 index a24ee1446f9e5..0000000000000 --- a/recipes/vk-bootstrap/all/patches/0001-fix-cmake-0.6.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f1e0181..4d154e0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -83,7 +83,7 @@ install(TARGETS vk-bootstrap vk-bootstrap-compiler-warnings vk-bootstrap-vulkan- - - option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) - --if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) -+if (VK_BOOTSTRAP_TEST) - - add_subdirectory(ext) - add_subdirectory(tests) diff --git a/recipes/vk-bootstrap/all/test_v1_package/CMakeLists.txt b/recipes/vk-bootstrap/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/vk-bootstrap/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/vk-bootstrap/all/test_v1_package/conanfile.py b/recipes/vk-bootstrap/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/vk-bootstrap/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) From 8e0602b8666836a4ba0f3c72eadef27a1fd5ac55 Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 19:46:40 -0300 Subject: [PATCH 3/6] allow shared build --- recipes/vk-bootstrap/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/vk-bootstrap/all/conanfile.py b/recipes/vk-bootstrap/all/conanfile.py index 985bd597d8cd1..cbd582bc27318 100644 --- a/recipes/vk-bootstrap/all/conanfile.py +++ b/recipes/vk-bootstrap/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -100,6 +100,7 @@ def generate(self): def build(self): apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_library(vk-bootstrap STATIC", "add_library(vk-bootstrap") cmake = CMake(self) cmake.configure() cmake.build() @@ -108,6 +109,7 @@ def package(self): copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + rm(self, "*", os.path.join(self.package_folder, "lib", "cmake"), recursive=True) def package_info(self): self.cpp_info.libs = ["vk-bootstrap"] From 276d255d52436bfde2dc0f6c6acddd067c192cfe Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 20:02:03 -0300 Subject: [PATCH 4/6] generate cmake deps --- recipes/vk-bootstrap/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/vk-bootstrap/all/conanfile.py b/recipes/vk-bootstrap/all/conanfile.py index cbd582bc27318..6a08b97b30e34 100644 --- a/recipes/vk-bootstrap/all/conanfile.py +++ b/recipes/vk-bootstrap/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -97,6 +97,8 @@ def generate(self): ) tc.variables["VK_BOOTSTRAP_VULKAN_HEADER_DIR"] = includedirs tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) From 7c994939ac6df73ef8c2d3bd6d61d5de2734a393 Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 20:06:52 -0300 Subject: [PATCH 5/6] require C++17 on test_package --- recipes/vk-bootstrap/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/vk-bootstrap/all/test_package/CMakeLists.txt b/recipes/vk-bootstrap/all/test_package/CMakeLists.txt index d1c50daad2758..43ec76154d5f4 100644 --- a/recipes/vk-bootstrap/all/test_package/CMakeLists.txt +++ b/recipes/vk-bootstrap/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(vk-bootstrap REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE vk-bootstrap::vk-bootstrap) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) From 70bfe97a17587eb866929a910a24b8cbbe546748 Mon Sep 17 00:00:00 2001 From: Stella Smith Date: Sun, 15 Dec 2024 20:11:03 -0300 Subject: [PATCH 6/6] no strict replace --- recipes/vk-bootstrap/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/vk-bootstrap/all/conanfile.py b/recipes/vk-bootstrap/all/conanfile.py index 6a08b97b30e34..38f0b297ce2ac 100644 --- a/recipes/vk-bootstrap/all/conanfile.py +++ b/recipes/vk-bootstrap/all/conanfile.py @@ -102,7 +102,7 @@ def generate(self): def build(self): apply_conandata_patches(self) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_library(vk-bootstrap STATIC", "add_library(vk-bootstrap") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_library(vk-bootstrap STATIC", "add_library(vk-bootstrap", strict=False) cmake = CMake(self) cmake.configure() cmake.build()