diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-24 02:28:15 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-24 02:37:20 +0200 |
commit | 91df2beee394afc17f379511007a7b26b911278f (patch) | |
tree | 2e6889d84dc52af54f81ebafaf089620c25503eb /src/video_core/host_shaders/CMakeLists.txt | |
parent | gl_shader_util: Use std::string_view instead of star pointer (diff) | |
download | yuzu-91df2beee394afc17f379511007a7b26b911278f.tar yuzu-91df2beee394afc17f379511007a7b26b911278f.tar.gz yuzu-91df2beee394afc17f379511007a7b26b911278f.tar.bz2 yuzu-91df2beee394afc17f379511007a7b26b911278f.tar.lz yuzu-91df2beee394afc17f379511007a7b26b911278f.tar.xz yuzu-91df2beee394afc17f379511007a7b26b911278f.tar.zst yuzu-91df2beee394afc17f379511007a7b26b911278f.zip |
Diffstat (limited to 'src/video_core/host_shaders/CMakeLists.txt')
-rw-r--r-- | src/video_core/host_shaders/CMakeLists.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt new file mode 100644 index 000000000..aa62363a7 --- /dev/null +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -0,0 +1,43 @@ +set(SHADER_FILES + opengl_present.frag + opengl_present.vert +) + +set(SHADER_INCLUDE ${CMAKE_CURRENT_BINARY_DIR}/include) +set(HOST_SHADERS_INCLUDE ${SHADER_INCLUDE} PARENT_SCOPE) + +set(SHADER_DIR ${SHADER_INCLUDE}/video_core/host_shaders) +add_custom_command( + OUTPUT + ${SHADER_DIR} + COMMAND + ${CMAKE_COMMAND} -E make_directory ${SHADER_DIR} +) + +set(INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/source_shader.h.in) +set(HEADER_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/StringShaderHeader.cmake) + +foreach(FILENAME IN ITEMS ${SHADER_FILES}) + string(REPLACE "." "_" SHADER_NAME ${FILENAME}) + set(SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}) + set(HEADER_FILE ${SHADER_DIR}/${SHADER_NAME}.h) + add_custom_command( + OUTPUT + ${HEADER_FILE} + COMMAND + ${CMAKE_COMMAND} -P ${HEADER_GENERATOR} ${SOURCE_FILE} ${HEADER_FILE} ${INPUT_FILE} + MAIN_DEPENDENCY + ${SOURCE_FILE} + DEPENDS + ${HEADER_GENERATOR} + ${INPUT_FILE} + ) + set(SHADER_HEADERS ${SHADER_HEADERS} ${HEADER_FILE}) +endforeach() + +add_custom_target(host_shaders + DEPENDS + ${SHADER_HEADERS} + SOURCES + ${SHADER_FILES} +) |