mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 01:39:07 +08:00
e46521db00
* Update GLSLANG to 11.12.0 * [glslang] Update baseline and version file * update port version * Fix shaderc * Update version database * Update ports/glslang/vcpkg.json Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> * [glslang] update version Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com>
52 lines
1.9 KiB
CMake
52 lines
1.9 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
|
|
fix-install-shaderc_util.patch
|
|
fix-export-cmakefiles.patch
|
|
# NOTE: This should be removed when shaderc gets updated to use glslang 11.12.0
|
|
fix-tbuiltinresource-for-glslang-11-12.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_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
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_cmake_install()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-shaderc CONFIG_PATH share/unofficial-shaderc)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-shaderc_util CONFIG_PATH share/unofficial-shaderc_util)
|
|
|
|
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)
|