diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d438d77 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "src/External/glslang-WallpaperEngine"] + path = src/External/glslang-WallpaperEngine + url = https://github.com/Almamu/glslang-WallpaperEngine.git +[submodule "src/External/SPIRV-Cross-WallpaperEngine"] + path = src/External/SPIRV-Cross-WallpaperEngine + url = https://github.com/Almamu/SPIRV-Cross-WallpaperEngine.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f96d4c..e57723f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,10 +31,9 @@ find_package(MPV REQUIRED) find_package(LZ4 REQUIRED) find_package(FFMPEG REQUIRED) find_package(PulseAudio REQUIRED) -find_package(glslang REQUIRED) -find_package(spirv_cross_core CONFIG REQUIRED) -find_package(spirv_cross_glsl CONFIG REQUIRED) +set(ALLOW_EXTERNAL_SPIRV_TOOLS 1) +set(SPIRV_CROSS_FORCE_PIC ON) # Download CEF of specified version for current platform # Specify the CEF distribution version. @@ -108,8 +107,12 @@ set( ) add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) +add_subdirectory(src/External/glslang-WallpaperEngine glslang) +add_subdirectory(src/External/SPIRV-Cross-WallpaperEngine spirv-cross) include_directories( + src/External/glslang-WallpaperEngine + src/External/SPIRV-Cross-WallpaperEngine ${MPV_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${LZ4_INCLUDE_DIR} @@ -119,9 +122,6 @@ include_directories( src ${CEF_INCLUDE_PATH} ${CMAKE_SOURCE_DIR} - ${glslang_INCLUDE_DIRS} - ${spirv_cross_core_INCLUDE_DIRS} - ${spirv_cross_glsl_INCLUDE_DIRS} include) @@ -451,7 +451,7 @@ COPY_FILES(linux-wallpaperengine "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${TA COPY_FILES(linux-wallpaperengine "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${TARGET_OUTPUT_DIRECTORY}") SET_EXECUTABLE_TARGET_PROPERTIES(linux-wallpaperengine) -add_dependencies(linux-wallpaperengine libcef_dll_wrapper) +add_dependencies(linux-wallpaperengine libcef_dll_wrapper glslang spirv-cross-core spirv-cross-glsl) # Need to remove libvulkan, otherwise will get error on linking: # /usr/bin/ld: /usr/lib/libmpv.so: undefined reference to `vkCreateXlibSurfaceKHR' diff --git a/src/External/SPIRV-Cross-WallpaperEngine b/src/External/SPIRV-Cross-WallpaperEngine new file mode 160000 index 0000000..9daa7fe --- /dev/null +++ b/src/External/SPIRV-Cross-WallpaperEngine @@ -0,0 +1 @@ +Subproject commit 9daa7fe0a36dbe5c5b810d74d2cc43b202407d57 diff --git a/src/External/glslang-WallpaperEngine b/src/External/glslang-WallpaperEngine new file mode 160000 index 0000000..1956e16 --- /dev/null +++ b/src/External/glslang-WallpaperEngine @@ -0,0 +1 @@ +Subproject commit 1956e16ffa8d107f09d65be7deaa53eb2af95ed5 diff --git a/src/WallpaperEngine/Render/Shaders/CGLSLContext.cpp b/src/WallpaperEngine/Render/Shaders/CGLSLContext.cpp index 7d6cce0..1864191 100644 --- a/src/WallpaperEngine/Render/Shaders/CGLSLContext.cpp +++ b/src/WallpaperEngine/Render/Shaders/CGLSLContext.cpp @@ -4,10 +4,10 @@ #include #include -#include -#include -#include -#include +#include "glslang/Include/ResourceLimits.h" +#include "glslang/Public/ShaderLang.h" +#include "glslang/SPIRV/GlslangToSpv.h" +#include "spirv_glsl.hpp" using namespace WallpaperEngine::Render::Shaders;