mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 23:28:59 +08:00
631de847c4
* [glslang] update port * fix path * Update ports/glslang/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * update version tree --------- Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
54 lines
1.6 KiB
CMake
54 lines
1.6 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO KhronosGroup/glslang
|
|
REF "${VERSION}"
|
|
SHA512 1d40518d09579eb925b1e4375c9a581736cdb79aaf60d1ca6117e394386a8d2dc1dafd9a4a30d9381f063c1ea1f65fc0d5d9fcbbefa87a85423f87fd925747b0
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
tools ENABLE_GLSLANG_BINARIES
|
|
)
|
|
|
|
if (ENABLE_GLSLANG_BINARIES)
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
|
|
vcpkg_add_to_path("${PYTHON_PATH}")
|
|
endif ()
|
|
|
|
if (WIN32)
|
|
set(PLATFORM_OPTIONS "-DOVERRIDE_MSVCCRT=OFF")
|
|
endif ()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_EXTERNAL=OFF
|
|
-DENABLE_CTEST=OFF
|
|
-DSKIP_GLSLANG_INSTALL=OFF
|
|
${FEATURE_OPTIONS}
|
|
${PLATFORM_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glslang DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
|
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"
|
|
)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
if (ENABLE_GLSLANG_BINARIES)
|
|
vcpkg_copy_tools(TOOL_NAMES glslangValidator spirv-remap AUTO_CLEAN)
|
|
endif ()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|