Skip to content

Commit

Permalink
build: Only stage shaders if ARES_BUNDLE_SHADERS is true
Browse files Browse the repository at this point in the history
  • Loading branch information
jcm93 committed Dec 27, 2024
1 parent 97f8f1e commit 15be99a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions desktop-ui/cmake/os-linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ mark_as_advanced(ARES_BUNDLE_SHADERS)
# Stage and install slang shaders
if(ARES_ENABLE_LIBRASHADER)
if(TARGET libretro::slang_shaders)
add_custom_command(
OUTPUT "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders/bilinear.slangp" POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E make_directory "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders"
COMMAND cp -R "${slang_shaders_LOCATION}/." "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders"
COMMENT "Copying slang shaders to staging directory"
)
add_custom_target(
bundled_shaders
DEPENDS "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders/bilinear.slangp"
)
add_dependencies(desktop-ui bundled_shaders)
if(ARES_BUNDLE_SHADERS)
add_custom_command(
OUTPUT "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders/bilinear.slangp" POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E make_directory "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders"
COMMAND cp -R "${slang_shaders_LOCATION}/." "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders"
COMMENT "Copying slang shaders to staging directory"
)
add_custom_target(
bundled_shaders
DEPENDS "${ARES_BUILD_OUTPUT_DIR}/${ARES_INSTALL_DATA_DESTINATION}/Shaders/bilinear.slangp"
)
add_dependencies(desktop-ui bundled_shaders)
install(
DIRECTORY "${slang_shaders_LOCATION}"
DESTINATION "${ARES_INSTALL_DATA_DESTINATION}/Shaders"
Expand Down

0 comments on commit 15be99a

Please sign in to comment.