mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:13:07 +08:00
Expose some glslang internal includes and enforce static build.
This commit is contained in:
parent
a710f67e52
commit
49e760390e
@ -30,14 +30,10 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
||||
LOGNAME worktree
|
||||
)
|
||||
message(STATUS "Patching")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-export-symbol-for-Windows.patch --ignore-whitespace --whitespace=fix
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME patch
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
set(VCPKG_LIBRARY_LINKAGE "static")
|
||||
set(VCPKG_CRT_LINKAGE "static")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
|
||||
@ -45,7 +41,12 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public/ShaderLang.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe")
|
||||
@ -56,12 +57,12 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe")
|
||||
file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*")
|
||||
list(LENGTH BIN_DIR BIN_DIR_SIZE)
|
||||
if(${BIN_DIR_SIZE} EQUAL 0)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
endif()
|
||||
file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*")
|
||||
list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE)
|
||||
if(${DEBUG_BIN_DIR_SIZE} EQUAL 0)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
|
Loading…
Reference in New Issue
Block a user