mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
50 lines
2.0 KiB
Diff
50 lines
2.0 KiB
Diff
--- CMakeLists.txt.orig 2026-01-23 07:35:29
|
|
+++ CMakeLists.txt 2026-04-18 19:53:38
|
|
@@ -302,6 +302,10 @@
|
|
message(SEND_ERROR "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.")
|
|
endif()
|
|
set(ENABLE_OPT OFF)
|
|
+ else()
|
|
+ message(STATUS "XDEBUG Using external SPIRV-Tools")
|
|
+ message(STATUS "XDEBUG\n ENABLE_OPT=${ENABLE_OPT}\n ENABLE_HLSL=${ENABLE_HLSL}\n ENABLE_SPIRV=${ENABLE_SPIRV}
|
|
+ ENABLE_GLSLANG_BINARIES=${ENABLE_GLSLANG_BINARIES}\n GLSLANG_TESTS=${GLSLANG_TESTS}\n PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
|
|
endif()
|
|
else()
|
|
if(ENABLE_OPT)
|
|
@@ -406,5 +410,35 @@
|
|
"${CMAKE_CURRENT_BINARY_DIR}/glslang-config-version.cmake"
|
|
DESTINATION
|
|
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
|
+ )
|
|
+
|
|
+ # Generate a pkg-config file, so that software projects which use
|
|
+ # pkg-config to locate dependencies can find glslang
|
|
+
|
|
+ # This template is filled-in by CMake's `configure_file(... @ONLY)`.
|
|
+ # The `@...@` are substituted by CMake's configure_file(), either
|
|
+ # from variables set in CMakeLists.txt or by CMake itself.
|
|
+ # (Based on: https://www.scivision.dev/cmake-generate-pkg-config/)
|
|
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc.in" [=[
|
|
+prefix="@CMAKE_INSTALL_PREFIX@"
|
|
+exec_prefix="${prefix}"
|
|
+libdir="${prefix}/lib"
|
|
+includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"
|
|
+
|
|
+Name: @PROJECT_NAME@
|
|
+Description: official reference compiler front end for the OpenGL ES and OpenGL shading languages
|
|
+Version: @PROJECT_VERSION@
|
|
+Cflags: -I"${includedir}"
|
|
+Libs: -L"${libdir}" -l@PROJECT_NAME@
|
|
+ ]=])
|
|
+ configure_file(
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc.in"
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
|
|
+ @ONLY)
|
|
+ install(
|
|
+ FILES
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
|
|
+ DESTINATION
|
|
+ "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
|
)
|
|
endif()
|