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(
|
2023-03-25 13:58:22 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/glslang
|
|
|
|
REF "${VERSION}"
|
2023-10-03 10:50:58 +08:00
|
|
|
SHA512 678df76a6f23b9da93f111fc7e6db57b7f6bf34661b077f9259a0a77d6c023b4d2e3c1cd60b3f9fc15fe69f25cdcb19877e88a50771d3d5275e32574eaefc056
|
2023-03-25 13:58:22 +08:00
|
|
|
HEAD_REF master
|
2017-07-28 10:25:07 +08:00
|
|
|
)
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2023-03-25 13:58:22 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools ENABLE_GLSLANG_BINARIES
|
2023-08-08 00:59:24 +08:00
|
|
|
rtti ENABLE_RTTI
|
2023-03-25 13:58:22 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if (ENABLE_GLSLANG_BINARIES)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON_PATH}")
|
|
|
|
endif ()
|
2021-07-15 22:00:19 +08:00
|
|
|
|
2023-03-25 13:58:22 +08:00
|
|
|
if (WIN32)
|
|
|
|
set(PLATFORM_OPTIONS "-DOVERRIDE_MSVCCRT=OFF")
|
|
|
|
endif ()
|
2021-02-09 08:04:50 +08:00
|
|
|
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_cmake_configure(
|
2023-03-25 13:58:22 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_EXTERNAL=OFF
|
|
|
|
-DENABLE_CTEST=OFF
|
|
|
|
-DSKIP_GLSLANG_INSTALL=OFF
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
${PLATFORM_OPTIONS}
|
2016-11-26 01:08:06 +08:00
|
|
|
)
|
|
|
|
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-03-25 13:58:22 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glslang DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
2021-09-08 12:06:30 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
2023-03-25 13:58:22 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/glslang-config.cmake"
|
|
|
|
"${PACKAGE_PREFIX_DIR}/lib/cmake/glslang/glslang-targets.cmake"
|
|
|
|
"${PACKAGE_PREFIX_DIR}/share/${PORT}/glslang-targets.cmake"
|
|
|
|
)
|
2019-09-12 03:54:29 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-25 13:58:22 +08:00
|
|
|
if (ENABLE_GLSLANG_BINARIES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES glslangValidator spirv-remap AUTO_CLEAN)
|
|
|
|
endif ()
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2023-03-25 13:58:22 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-07-15 22:00:19 +08:00
|
|
|
|
2023-03-25 13:58:22 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|