2018-10-12 12:27:22 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2017-07-28 10:25:07 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/glslang
|
2022-12-17 03:30:40 +08:00
|
|
|
REF 11.13.0
|
|
|
|
SHA512 20c2a6543b002648f459f26bd36b5c445afd6d8eae175e400dbe45632f11ca8de1f9e6f6e98fd6f910aa75d90063e174c095e7df26d9d4982192b84d08b0dc8b
|
2017-07-28 10:25:07 +08:00
|
|
|
HEAD_REF master
|
2019-03-06 02:57:56 +08:00
|
|
|
PATCHES
|
2021-07-15 22:00:19 +08:00
|
|
|
ignore-crt.patch
|
2022-12-02 05:52:06 +08:00
|
|
|
install-to-datadir.patch
|
2017-07-28 10:25:07 +08:00
|
|
|
)
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2021-07-15 22:00:19 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON_PATH}")
|
|
|
|
|
2022-10-21 10:06:49 +08:00
|
|
|
if("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_IOS)
|
|
|
|
set(BUILD_BINARIES ON)
|
|
|
|
else()
|
2021-02-09 08:04:50 +08:00
|
|
|
# this case will report error since all executable will require BUNDLE DESTINATION
|
|
|
|
set(BUILD_BINARIES OFF)
|
|
|
|
endif()
|
|
|
|
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-12 03:54:29 +08:00
|
|
|
OPTIONS
|
|
|
|
-DSKIP_GLSLANG_INSTALL=OFF
|
2021-07-15 22:00:19 +08:00
|
|
|
-DBUILD_EXTERNAL=OFF
|
2021-02-09 08:04:50 +08:00
|
|
|
-DENABLE_GLSLANG_BINARIES=${BUILD_BINARIES}
|
2016-11-26 01:08:06 +08:00
|
|
|
)
|
|
|
|
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
2019-09-12 03:54:29 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-02-09 08:04:50 +08:00
|
|
|
if(NOT BUILD_BINARIES)
|
2021-09-08 12:06:30 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
2021-02-09 08:04:50 +08:00
|
|
|
else()
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES glslangValidator spirv-remap AUTO_CLEAN)
|
2021-02-09 08:04:50 +08:00
|
|
|
endif()
|
2021-09-08 12:06:30 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/bin")
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2022-09-13 04:43:31 +08:00
|
|
|
# Install custom usage
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
2021-07-15 22:00:19 +08:00
|
|
|
|
2022-04-07 03:37:21 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|