41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/ritsu/ext/glsl/src_files/frag_file.rb', line 41
def add_frag_file(path, options={})
src_path = compute_src_path(path, options)
frag_file = FragFile.new(src_path, self)
cpp_src_path = compute_src_path(frag_file.cpp_file_base_name, options)
cpp_file = CppFile.new(cpp_src_path, self)
self.custom_commands << "ADD_CUSTOM_COMMAND(\n" +
" OUTPUT ${CMAKE_SOURCE_DIR}/#{cpp_src_path}\n" +
" COMMAND define_cpp_string #{frag_file.code_var_name} < ${CMAKE_SOURCE_DIR}/#{frag_file.src_path} > ${CMAKE_SOURCE_DIR}/#{cpp_file.src_path}\n" +
" DEPENDS ${CMAKE_SOURCE_DIR}/#{frag_file.src_path})"
end
|