-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pkg-config files #2083
Add pkg-config files #2083
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ set(HEADERS | |
MachineIndependent/preprocessor/PpContext.h | ||
MachineIndependent/preprocessor/PpTokens.h) | ||
|
||
set(VERSION 8.13.3559) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This number is already out of date... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as avobe. with a own cmake function can do this automagic greetings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here. |
||
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) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? We seem to be increasing the number of random places that will need to be changed when SPIR-V is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the better way for this is create a cmake function which read from where Spirv set the version and set automagically by cmake
a example:
with this, only need set the version in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed to set a version in the
spirv.pc
file. What could be done is to pass SPIRV version from cmake tospirv.hpp
.