Skip to content

Commit

Permalink
[glslang] install private headers
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Oct 5, 2024
1 parent 99938a1 commit 235a506
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
26 changes: 14 additions & 12 deletions ports/glslang/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ vcpkg_from_github(
REF ${VERSION}
SHA512 b246c6f280891b7c9b6cd0b5e85e03ccf1fe173cdfc40e566339a5698176cbcfe23eb7aeaba277f071222d76b9f2a00376d790d4d604aedad82e6196fab7fc70
HEAD_REF main
PATCHES
private-headers.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand All @@ -20,16 +22,16 @@ vcpkg_add_to_path("${PYTHON_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_EXTERNAL=OFF
-DENABLE_HLSL=${VCPKG_TARGET_IS_WINDOWS}
-DENABLE_SPIRV=ON
-DENABLE_RTTI=OFF
-DENABLE_EXCEPTIONS=OFF
-DENABLE_OPT=OFF # requires spirv-tools
-DENABLE_GLSLANG_JS=OFF
-DGLSLANG_TESTS=OFF
-DGLSLANG_ENABLE_INSTALL=ON
${FEATURE_OPTIONS}
-DBUILD_EXTERNAL=OFF
-DENABLE_HLSL=${VCPKG_TARGET_IS_WINDOWS}
-DENABLE_SPIRV=ON
-DENABLE_RTTI=OFF
-DENABLE_EXCEPTIONS=OFF
-DENABLE_OPT=OFF # requires spirv-tools
-DENABLE_GLSLANG_JS=OFF
-DGLSLANG_TESTS=OFF
-DGLSLANG_ENABLE_INSTALL=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glslang)
Expand All @@ -39,7 +41,7 @@ if("tools" IN_LIST FEATURES)
endif()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
17 changes: 17 additions & 0 deletions ports/glslang/private-headers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index 47925d8..50900b2 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -270,6 +270,12 @@ if(GLSLANG_ENABLE_INSTALL)
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
endforeach()
+ # <glslang/Inlcude/...>
+ install(DIRECTORY Include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/Include)
+ # <glslang/MachineIndependent/...>
+ file(GLOB MI_HEADERS MachineIndependent/*.h)
+ list(REMOVE_ITEM MI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/pch.h)
+ install(FILES ${MI_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/MachineIndependent)

install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang)

2 changes: 1 addition & 1 deletion versions/g-/glslang.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "177cfc0f9f6b3cfc1b2d564e2e085a6b80c3a4c4",
"git-tree": "a7a5a4933edb50c632c8fe72f5f9eef8642cbc98",
"version": "15.0.0",
"port-version": 0
}
Expand Down

0 comments on commit 235a506

Please sign in to comment.