@ -1,23 +1,16 @@
set ( SHADER_ FIL ES
set ( SHADER_ SOURC ES
o p e n g l _ p r e s e n t . f r a g
o p e n g l _ p r e s e n t . f r a g
o p e n g l _ p r e s e n t . v e r t
o p e n g l _ p r e s e n t . v e r t
)
)
set ( SHADER_INCLUDE ${ CMAKE_CURRENT_BINARY_DIR } /include )
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 )
set ( SHADER_DIR ${ SHADER_INCLUDE } /video_core/host_shaders )
add_custom_command (
set ( HOST_SHADERS_INCLUDE ${ SHADER_INCLUDE } PARENT_SCOPE )
O U T P U T
$ { S H A D E R _ D I R }
C O M M A N D
$ { C M A K E _ C O M M A N D } - E m a k e _ d i r e c t o r y $ { S H A D E R _ D I R }
)
set ( INPUT_FILE ${ CMAKE_CURRENT_SOURCE_DIR } /source_shader.h.in )
set ( INPUT_FILE ${ CMAKE_CURRENT_SOURCE_DIR } /source_shader.h.in )
set ( HEADER_GENERATOR ${ CMAKE_CURRENT_SOURCE_DIR } /StringShaderHeader.cmake )
set ( HEADER_GENERATOR ${ CMAKE_CURRENT_SOURCE_DIR } /StringShaderHeader.cmake )
foreach ( FILENAME IN ITEMS ${ SHADER_ FIL ES} )
foreach ( FILENAME IN ITEMS ${ SHADER_SOURCES } )
string ( REPLACE "." "_" SHADER_NAME ${ FILENAME } )
string ( REPLACE "." "_" SHADER_NAME ${ FILENAME } )
set ( SOURCE_FILE ${ CMAKE_CURRENT_SOURCE_DIR } / ${ FILENAME } )
set ( SOURCE_FILE ${ CMAKE_CURRENT_SOURCE_DIR } / ${ FILENAME } )
set ( HEADER_FILE ${ SHADER_DIR } / ${ SHADER_NAME } .h )
set ( HEADER_FILE ${ SHADER_DIR } / ${ SHADER_NAME } .h )
@ -29,8 +22,8 @@ foreach(FILENAME IN ITEMS ${SHADER_FILES})
M A I N _ D E P E N D E N C Y
M A I N _ D E P E N D E N C Y
$ { S O U R C E _ F I L E }
$ { S O U R C E _ F I L E }
D E P E N D S
D E P E N D S
$ { H E A D E R _ G E N E R A T O R }
$ { I N P U T _ F I L E }
$ { I N P U T _ F I L E }
# H E A D E R _ G E N E R A T O R s h o u l d b e i n c l u d e d h e r e b u t m s b u i l d s e e m s t o a s s u m e i t ' s a l w a y s m o d i f i e d
)
)
set ( SHADER_HEADERS ${ SHADER_HEADERS } ${ HEADER_FILE } )
set ( SHADER_HEADERS ${ SHADER_HEADERS } ${ HEADER_FILE } )
endforeach ( )
endforeach ( )
@ -39,5 +32,5 @@ add_custom_target(host_shaders
D E P E N D S
D E P E N D S
$ { S H A D E R _ H E A D E R S }
$ { S H A D E R _ H E A D E R S }
S O U R C E S
S O U R C E S
$ { S H A D E R _ FI L E S }
$ { S H A D E R _ SO U R C E S }
)
)