Closed feliwir closed 5 years ago
Is cmake a viable option right now? Because SHADERed currently only works on Windows and uses Direct3D 11 (I plan to port it to Linux this year though).
CMake has been a viable option for years. You'll be fine.
Okay! There will be a cmake file when I release OpenGL port (in couple of weeks).
Hey @feliwir . I just pushed a big commit which includes CMakeLists.txt . As I am fairly new to cmake I would be very happy if you could check if everything is how it is supposed to be/working properly.
I also want to mention that cmake currently also includes some modules that shouldn't be included (like glslangValidator or SPIR-V remap). Not sure if that can be prevented from within my CMakeLists.txt file or if I have to fork the KhronosGroup/glslang and modified their cmake file.
Also, with the new update SHADERed works on Linux too (I need to fix some bugs though + implement some features).
Hey @dfranx i added some comments to your commit. To fix your glsllang problem you can probably set ENABLE_GLSLANG_BINARIES
to FALSE before inlcuding the subdirectory.
Just pushed a commit that applies all of the things you mentioned in the comments + ENABLE_GLSLANG_BINARIES option.
I am missing glm headers when building on Linux. Your CMake setup doesn't seem to look for it.
Thanks for reporting! Fix for this will be included in the next commit.
Could you try compiling the program again? I have added GLM to the cmake file.
@dfranx it still doesn't work. You can't use find_package(glm REQUIRED), since there is no findscript and glm doesn't provide a config script either. I recommend adding glm as a submodule and just do target_include_directories
on the submodule dir.
Alternatively you could put a FindGLM.cmake script into your module directory (e.g. FindGLM.cmake). This would require you to set CMAKE_MODULE_PATH
See here for an example: https://github.com/feliwir/arda/blob/master/src/CMakeLists.txt#L67
@feliwir thanks for reporting that. I have just added FindGLM.cmake script in one of the commits. Can't test it really because GLM library installed through vcpkg has the config file and for some reason it works normally on Linux too (I assume it also has the config file?).. Please reply back if you have now managed to compile SHADERed! :D
Remove the Visual Studio projects and add a CMake build. This allows cross platform compilation. I'd be willing to contribute that if accepted