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
|
2021-07-15 22:00:19 +08:00
|
|
|
REF ae2a562936cc8504c9ef2757cceaff163147834f
|
|
|
|
SHA512 1c5a91e60c1809c6c26f11649659090a75501b0570f3147e5b27ac65c539b591967f258d14c399d33019317864ede823353ea44e0015bc3f7afc5a787f046cc7
|
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
|
|
|
|
always-install-resource-limits.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}")
|
|
|
|
|
2021-02-09 08:04:50 +08:00
|
|
|
if(VCPKG_TARGET_IS_IOS)
|
|
|
|
# this case will report error since all executable will require BUNDLE DESTINATION
|
|
|
|
set(BUILD_BINARIES OFF)
|
|
|
|
else()
|
|
|
|
set(BUILD_BINARIES ON)
|
|
|
|
endif()
|
|
|
|
|
2016-11-26 01:08:06 +08:00
|
|
|
vcpkg_configure_cmake(
|
2017-07-28 10:25:07 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
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
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2021-07-15 22:00:19 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/glslang)
|
2019-09-12 03:54:29 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-02-09 08:04:50 +08:00
|
|
|
if(NOT BUILD_BINARIES)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
else()
|
2021-07-15 22:00:19 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/glslang)
|
2021-02-09 08:04:50 +08:00
|
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin)
|
2016-11-26 01:08:06 +08:00
|
|
|
|
2021-07-15 22:00:19 +08:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/glslang/glslang-config.cmake OR EXISTS ${CURRENT_PACKAGES_DIR}/share/glslang/glslangConfig.cmake)
|
|
|
|
message(FATAL_ERROR "glslang has been updated to provide a -config file -- please remove the vcpkg provided version from the portfile")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(COPY
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/copyright
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/glslang-config.cmake
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
|
|
|
)
|
|
|
|
|