From d25dff35e134645fd248aa5318109d48a4cac8b0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Tue, 11 Jul 2023 02:15:28 +0200 Subject: [PATCH] [asmtk] Fix downstream usage (#32451) * [asmtk] fix static downstream usage * v db --- ports/asmtk/portfile.cmake | 7 +++++++ ports/asmtk/vcpkg.json | 1 + versions/a-/asmtk.json | 5 +++++ versions/baseline.json | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ports/asmtk/portfile.cmake b/ports/asmtk/portfile.cmake index be25e0bcb7..4c0f6c9594 100644 --- a/ports/asmtk/portfile.cmake +++ b/ports/asmtk/portfile.cmake @@ -25,6 +25,13 @@ vcpkg_copy_pdbs() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/asmtk) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/asmtk/globals.h" "!defined(ASMTK_STATIC)" "0") +endif() + +set(cmakefile "${CURRENT_PACKAGES_DIR}/share/asmtk/asmtk-config.cmake") +file(READ "${cmakefile}" contents) +file(WRITE "${cmakefile}" "include(CMakeFindDependencyMacro)\nfind_dependency(asmjit)\n${contents}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/ports/asmtk/vcpkg.json b/ports/asmtk/vcpkg.json index 981d9b9021..ab7714643e 100644 --- a/ports/asmtk/vcpkg.json +++ b/ports/asmtk/vcpkg.json @@ -1,6 +1,7 @@ { "name": "asmtk", "version-date": "2022-11-06", + "port-version": 1, "description": "Assembler toolkit based on AsmJit ", "homepage": "https://github.com/asmjit/asmtk", "supports": "!arm", diff --git a/versions/a-/asmtk.json b/versions/a-/asmtk.json index 79f8b0b77c..c96f70a0a2 100644 --- a/versions/a-/asmtk.json +++ b/versions/a-/asmtk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "29f1e796d085204c9552c62adbe7279acfd8f3d9", + "version-date": "2022-11-06", + "port-version": 1 + }, { "git-tree": "9805dcacbdaa6f23d28fac07d973d22c2d00aec5", "version-date": "2022-11-06", diff --git a/versions/baseline.json b/versions/baseline.json index ed0652a4c8..cb76971e1c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -250,7 +250,7 @@ }, "asmtk": { "baseline": "2022-11-06", - "port-version": 0 + "port-version": 1 }, "assimp": { "baseline": "5.2.5",