41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/ritsu/ext/glsl/src_files/vert_file.rb', line 41
def add_vert_file(path, options={})
src_path = compute_src_path(path, options)
vert_file = VertFile.new(src_path, self)
cpp_src_path = compute_src_path(vert_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 #{vert_file.code_var_name} < ${CMAKE_SOURCE_DIR}/#{vert_file.src_path} > ${CMAKE_SOURCE_DIR}/#{cpp_file.src_path}\n" +
" DEPENDS ${CMAKE_SOURCE_DIR}/#{vert_file.src_path})"
end
|