diff --git a/.gitmodules b/.gitmodules index d5bdecc..3b50623 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vendor/llvm"] path = vendor/llvm url = https://github.com/llvm/llvm-project +[submodule "vendor/shaderc"] + path = vendor/shaderc + url = https://github.com/google/shaderc diff --git a/CMakeLists.txt b/CMakeLists.txt index ad70d5b..006f32a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) include(FindPkgConfig) -find_package(Boost 1.78 +find_package(Boost 1.74 COMPONENTS log) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/llvm/llvm/CMakeLists.txt") @@ -26,14 +26,19 @@ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/llvm/llvm/CMakeLists.txt") else() message(STATUS "Using system LLVM") -find_package(LLVM 13 REQUIRED CONFIG) +find_package(LLVM 14 REQUIRED CONFIG) endif() include(AddLLVM) include(HandleLLVMOptions) +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/shaderc/CMakeLists.txt") + set(SHADERC_SKIP_TESTS ON) + add_subdirectory(vendor/shaderc) -#pkg_check_modules(shaderc REQUIRED IMPORTED_TARGET shaderc) +else() + pkg_check_modules(shaderc REQUIRED IMPORTED_TARGET shaderc) +endif() message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") diff --git a/README.md b/README.md index 22d8a8b..77ae4ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ Installing on RPi (3 or 4): -``` +```shell curl https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - echo deb https://apt.llvm.org/bullseye llvm-toolchain-bullseye-14 main >/etc/apt/sources.list.d/llvm14.list -apt install llvm-14-tools llvm-14-dev clang build-essential cmake -``` \ No newline at end of file +apt install llvm-14-tools clang build-essential cmake git \ + llvm-14-dev libboost-log-dev spirv-headers spirv-tools +``` diff --git a/vendor/shaderc b/vendor/shaderc new file mode 160000 index 0000000..96b1dd7 --- /dev/null +++ b/vendor/shaderc @@ -0,0 +1 @@ +Subproject commit 96b1dd72a827304817470274a470c4d3b2293451