-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added SPIRV-Tools and SPIRV-Tools-opt libraries to the CMake build system #11
Conversation
For easier diff https://github.com/vsg-dev/osg2vsg/pull/11/files?w=1 |
Hi @olegded I’ve not had any issues, i’ll make sure the cmake is fully regerated incase sonething has changed but was working for me when i wrote the instructions. Not able to test at the moment but i’ll do that and try your changes to. Tom |
Hi Tom, I think I have figure it out :-) If somebody is using a SPIR-V-enabled version of the By simple checkout of the glslang repository, SPIR-V tools will be not included and therefore I guess there are following options:
Oleg |
Ideally glslang would have CMake config support so we can automatically pick up the required dependencies. Potentially we could look at adding this ourselves, though we have plenty of work just working on the VSG. The alternative is to put a CMake option into the VSG to specify whether SIRV-Tools is required, or have a cmake test to do a trial build to figure out if it works without the lib. |
I have had a bash at refactoring the GLSlang set up CMake scripts to make it easier to add extra dependencies:
I have only tested under Linux with my own build of GLSLang. @olegded If there are errors could you base your fixes off this new commit as I think it should be easier to ensure the different built combinations work with this approach. I'll close this PR as now effectively it's a dead branch. |
Hi Robert, Your changes worked for me in general. list(APPEND GLSLANG glslang::SPIRV-Tools) and list(APPEND GLSLANG glslang::SPIRV-Tools-opt) It worked. The second issue is this PR Added NOMINMAX macro definition And one more PR for README update in this repository Oleg |
Thanks. I've merged the PR's and applied the suggested change to
Findglsang.cmake.
…On Wed, 13 Feb 2019 at 22:19, olegded ***@***.***> wrote:
@vsg-dev <https://github.com/vsg-dev>
Hi Robert,
Your changes worked for me in general. vsg, osg2vsg and vsgExamples
compile and work. However, using CMake v 3.13.3 on Windows I got the error
message that append(GLSLANG glslang::SPIRV-Tools)
<https://github.com/vsg-dev/osg2vsg/blob/master/CMakeModules/Findglslang.cmake#L158> append(GLSLANG
glslang::SPIRV-Tools)
<https://github.com/vsg-dev/osg2vsg/blob/master/CMakeModules/Findglslang.cmake#L162>
are unknown commands. I replaced it locally by
list(APPEND GLSLANG glslang::SPIRV-Tools)
It worked.
The second issue is this PR Added NOMINMAX macro definition
<vsg-dev/VulkanSceneGraph#40>
Oleg
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABRDUAUCjMEGiNXHaXv7HOX-pZjOsB3mks5vNI9zgaJpZM4ayqpy>
.
|
@tomhog On Windows, using "VS 15 2017 Community Edition" I got several linker errors for all methods defined in
SPIRV-Tools
andSPIRV-Tools-opt
libraries. Does it compile on your system without these two libraries? If yes, I'm wondering what I'm missing then. I have tried both glslang versions - one from github and one from LunarSDK repository (which needs to be compiled as well), same results in terms of linker errors.By applying changes in this PR, it compiles fine on my side.