vcpkg/ports/shaderc/portfile.cmake
Luke 071f53715b
[glslang] Update to 11.1.0 (#15719)
* [shaderc] remove port since it does not build

* [glslang] updated to version 11.1.0

* [glslang] Add python path

* [glslang] baseline.json and glslang.json updated

* Update portfile.cmake

* Update CONTROL

* Update port_versions

* Update port_versions

* Update port_versions

* Update port_versions

* Update port_versions

* [glslang] port update to version 11.4.0

* [glslang] port version removed from json

* [glslang] remove shaderc

* [glslang] baseline update

* [glslang] versions hash update

* [glslang] portfile format fix + use of ${PORT}

* [glslang] new hash

* [glslang] revert portfile back

* [glslang] portfile apply changes

* [glslang] update hash for x86 windows

* [glslang] update to 1.5.0

* [glslang] git-tree hash update

* [glslang] remove old version 1.4.0

* [glslang] git-tree hash update

* [glslang][shaderc] Update and fix targets to match upstream

* Update versions

Co-authored-by: Lukas Lipp <llipp@cg.tuwien.ac.at>
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: JonLiu1993 <13720414433@163.com>
Co-authored-by: Robert Schumacher <ras0219@outlook.com>
2021-07-15 07:00:19 -07:00

47 lines
1.5 KiB
CMake

#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/shaderc
REF adca18dcadd460eb517fe44f6cd2460fa0650ebe
SHA512 3a27d4c51be9e9396b9a854cb96d88e78ff2ca6dcb8400bd3288f6984d25876af0eae649aa1c72ad613edbbcfa4324a12809f13ceb7a0134eef41cb1a698dfdf
HEAD_REF master
PATCHES
disable-update-version.patch
fix-build-type.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src)
set(OPTIONS)
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
list(APPEND OPTIONS -DSHADERC_ENABLE_SHARED_CRT=ON)
endif()
# shaderc uses python to manipulate copyright information
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${OPTIONS}
-DSHADERC_SKIP_TESTS=true
-DSHADERC_GLSLANG_DIR=${CMAKE_CURRENT_LIST_DIR}/glslang
-DSHADERC_SPIRV_TOOLS_DIR=${CMAKE_CURRENT_LIST_DIR}/spirv-tools
-DSHADERC_ENABLE_EXAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_pkgconfig()
vcpkg_copy_tools(TOOL_NAMES glslc AUTO_CLEAN)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)