From 002d99da697b5f435ef403653dca1a7e55a3150c Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Fri, 14 Feb 2020 12:05:43 +0100 Subject: [PATCH 1/2] Add and install glslang.pc config file --- glslang/CMakeLists.txt | 4 ++++ glslang/glslang.pc.in | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 glslang/glslang.pc.in diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index a0259a3def..e4d0269cdd 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -80,6 +80,7 @@ set(HEADERS MachineIndependent/preprocessor/PpContext.h MachineIndependent/preprocessor/PpTokens.h) +set(VERSION 8.13.3559) glslang_pch(SOURCES MachineIndependent/pch.cpp) add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) @@ -117,6 +118,9 @@ if(ENABLE_GLSLANG_INSTALL) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.in ${CMAKE_CURRENT_BINARY_DIR}/glslang.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL) diff --git a/glslang/glslang.pc.in b/glslang/glslang.pc.in new file mode 100644 index 0000000000..822cf00b90 --- /dev/null +++ b/glslang/glslang.pc.in @@ -0,0 +1,13 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +Name: @PROJECT_NAME@ +Description: OpenGL and OpenGL ES shader front end and validator +Requires: +Version: @VERSION@ +URL: https://github.com/KhronosGroup/glslang + +Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper +Cflags: -I${includedir} From 018283c29f983fa0a83c2845160f8acce1caf86b Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Fri, 14 Feb 2020 12:14:06 +0100 Subject: [PATCH 2/2] Add and install spirv.pc config file --- SPIRV/CMakeLists.txt | 5 +++++ SPIRV/spirv.pc.in | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 SPIRV/spirv.pc.in diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index 439b9918a4..291eaf79eb 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -40,6 +40,9 @@ target_include_directories(SPIRV PUBLIC $ $) +set(SPIRV_NAME spirv) +set(SPIRV_VERSION 1.5) + if (ENABLE_SPVREMAPPER) add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) @@ -96,6 +99,8 @@ if(ENABLE_GLSLANG_INSTALL) endif() install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/spirv.pc.in ${CMAKE_CURRENT_BINARY_DIR}/spirv.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/spirv.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) diff --git a/SPIRV/spirv.pc.in b/SPIRV/spirv.pc.in new file mode 100644 index 0000000000..e727ea8d62 --- /dev/null +++ b/SPIRV/spirv.pc.in @@ -0,0 +1,13 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +Name: @SPIRV_NAME@ +Description: SPIR-V is a binary intermediate language for representing graphical-shader stages and compute kernels for multiple Khronos APIs, including OpenCL, OpenGL, and Vulkan +Requires: +Version: @SPIRV_VERSION@ +URL: https://github.com/KhronosGroup/glslang + +Libs: -L${libdir} -lSPIRV +Cflags: -I${includedir}