Skip to content

Commit

Permalink
Merge branch 'b-cmake' of github.com:gwaldron/osgearth into b-cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed May 6, 2024
2 parents c7b36ff + 9acf62b commit 32b8581
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions cmake/osgearth-macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,22 @@ macro(configure_shaders templateFile autoGenCppFile)
set(TEMPLATE_FILE ${templateFile} )
set(GLSL_FILES ${ARGN} )
set(OUTPUT_CPP_FILE ${autoGenCppFile})

# generate the build-time script that will create out cpp file with inline shaders:
configure_file(
"${CMAKE_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/ConfigureShaders.cmake"
@ONLY)

"${CMAKE_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/ConfigureShaders.cmake"
@ONLY)
# add the custom build-time command to run the script:
add_custom_command(
OUTPUT
"${autoGenCppFile}"
COMMAND
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/ConfigureShaders.cmake"
DEPENDS
${GLSL_FILES}
"${TEMPLATE_FILE}"
"${CMAKE_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in" )
OUTPUT
"${autoGenCppFile}"
COMMAND
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/ConfigureShaders.cmake"
DEPENDS
${GLSL_FILES}
"${TEMPLATE_FILE}"
"${CMAKE_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in" )

endmacro(configure_shaders)

0 comments on commit 32b8581

Please sign in to comment.