From 7bddc2a191b2a7d8a3f817f92c8512aeb237eded Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Tue, 9 Feb 2021 09:07:06 +0900 Subject: [spirv-cross,spirv-tools] support iOS triplets (#16038) * [spirv-tools] support iOS triplets * [spirv-cross] support iOS triplets * [spirv-cross,spirv-tools] update baseline * [spirv-tools] fix mistyped variable name * [spirv-tools] fix wrong git-tree SHA --- ports/spirv-cross/CONTROL | 4 ---- ports/spirv-cross/portfile.cmake | 11 ++++++++++- ports/spirv-cross/vcpkg.json | 10 ++++++++++ ports/spirv-tools/CONTROL | 5 ----- ports/spirv-tools/portfile.cmake | 18 +++++++++++++++--- ports/spirv-tools/vcpkg.json | 10 ++++++++++ 6 files changed, 45 insertions(+), 13 deletions(-) delete mode 100644 ports/spirv-cross/CONTROL create mode 100644 ports/spirv-cross/vcpkg.json delete mode 100644 ports/spirv-tools/CONTROL create mode 100644 ports/spirv-tools/vcpkg.json (limited to 'ports') diff --git a/ports/spirv-cross/CONTROL b/ports/spirv-cross/CONTROL deleted file mode 100644 index e7c397b5f..000000000 --- a/ports/spirv-cross/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: spirv-cross -Version: 2020-02-26 -Homepage: https://github.com/KhronosGroup/SPIRV-Cross -Description: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. diff --git a/ports/spirv-cross/portfile.cmake b/ports/spirv-cross/portfile.cmake index eb0652a2a..42fa3b234 100644 --- a/ports/spirv-cross/portfile.cmake +++ b/ports/spirv-cross/portfile.cmake @@ -9,10 +9,19 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_TARGET_IS_IOS) + message(STATUS "Using iOS trplet. Executables won't be created...") + set(BUILD_CLI OFF) +else() + set(BUILD_CLI ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF + OPTIONS + -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF + -DSPIRV_CROSS_CLI=${BUILD_CLI} ) vcpkg_install_cmake() diff --git a/ports/spirv-cross/vcpkg.json b/ports/spirv-cross/vcpkg.json new file mode 100644 index 000000000..61fe79d13 --- /dev/null +++ b/ports/spirv-cross/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "spirv-cross", + "version-string": "2020-02-26", + "port-version": 1, + "description": "SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.", + "homepage": "https://github.com/KhronosGroup/SPIRV-Cross", + "dependencies": [ + "spirv-headers" + ] +} diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL deleted file mode 100644 index 3acb8e4f8..000000000 --- a/ports/spirv-tools/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: spirv-tools -Version: 2020.1-1 -Homepage: https://github.com/KhronosGroup/SPIRV-Tools -Description: API and commands for processing SPIR-V modules -Build-Depends: spirv-headers \ No newline at end of file diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 305a3fde5..e72d179f9 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -16,13 +16,23 @@ vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) vcpkg_add_to_path("${PYTHON3_DIR}") +if(VCPKG_TARGET_IS_IOS) + message(STATUS "Using iOS trplet. Executables won't be created...") + set(TOOLS_INSTALL OFF) + set(SKIP_EXECUTABLES ON) +else() + set(TOOLS_INSTALL ON) + set(SKIP_EXECUTABLES OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSPIRV-Headers_SOURCE_DIR=${CURRENT_INSTALLED_DIR} -DSPIRV_WERROR=OFF - -DENABLE_SPIRV_TOOLS_INSTALL=ON + -DSPIRV_SKIP_EXECUTABLES=${SKIP_EXECUTABLES} # option SPIRV_SKIP_TESTS follows this value + -DENABLE_SPIRV_TOOLS_INSTALL=${TOOLS_INSTALL} ) vcpkg_install_cmake() @@ -34,7 +44,9 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-reduce TARGET_PATH share file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") # only static linkage, i.e. no need to preserve .dll/.so files file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") -file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +if(TOOLS_INSTALL) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endif() file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/spirv-tools/vcpkg.json b/ports/spirv-tools/vcpkg.json new file mode 100644 index 000000000..44af534b5 --- /dev/null +++ b/ports/spirv-tools/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "spirv-tools", + "version-string": "2020.1", + "port-version": 2, + "description": "API and commands for processing SPIR-V modules", + "homepage": "https://github.com/KhronosGroup/SPIRV-Tools", + "dependencies": [ + "spirv-headers" + ] +} -- cgit v1.2.3