First pass for rewriting the build system

* Refactored all CMake files
* Started working on compiling shaders to header files in CMake

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
Fabian Sauter 2022-05-18 21:10:21 +02:00
parent c6a2b022f9
commit b95df8d0a0
33 changed files with 559 additions and 2712 deletions

View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: Apache-2.0
#######################
cmake_minimum_required(VERSION 3.15)
vulkan_compile_shader(INFILE test_logistic_regression.comp
OUTFILE test_logistic_regression.hpp
NAMESPACE "kp")
vulkan_compile_shader(INFILE test_op_custom_shader.comp
OUTFILE test_op_custom_shader.hpp
NAMESPACE "kp")
vulkan_compile_shader(INFILE test_workgroup.comp
OUTFILE test_workgroup.hpp
NAMESPACE "kp")
add_library(test_shaders_glsl "${CMAKE_CURRENT_BINARY_DIR}/test_logistic_regression.hpp"
"${CMAKE_CURRENT_BINARY_DIR}/test_op_custom_shader.hpp"
"${CMAKE_CURRENT_BINARY_DIR}/test_workgroup.hpp")
set_target_properties(test_shaders_glsl PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(test_shaders_glsl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)