Using interface libs for shader only libs

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
Fabian Sauter 2022-06-24 12:43:01 +02:00
parent 49f494701d
commit b9ec269b11
5 changed files with 13 additions and 16 deletions

View file

@ -12,9 +12,8 @@ vulkan_compile_shader(INFILE my_shader.comp
# RELATIVE_PATH "${kompute_SOURCE_DIR}/cmake")
# Then add it to the library, so you can access it later in your code
add_library(shader "${CMAKE_CURRENT_BINARY_DIR}/my_shader.hpp"
# "${CMAKE_CURRENT_BINARY_DIR}/my_shader2.hpp"
add_library(shader INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/my_shader.hpp"
# "${CMAKE_CURRENT_BINARY_DIR}/my_shader2.hpp"
)
set_target_properties(shader PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(shader PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_include_directories(shader INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)