Skip to content

Commit

Permalink
Only create output directory if it was set
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Oct 31, 2024
1 parent 64ea2da commit 6544b80
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/base/CreatePBP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ macro(create_pbp_file)
# set output directory to where the target is build if not set
if (NOT DEFINED ARG_OUTPUT_DIR)
set(ARG_OUTPUT_DIR $<TARGET_FILE_DIR:${ARG_TARGET}>)
endif()

# Make sure the output directory exists
if(NOT IS_DIRECTORY ${ARG_OUTPUT_DIR})
add_custom_command(
TARGET ${APP} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
${ARG_OUTPUT_DIR}
)
else()
# Make sure the output directory exists
if(NOT IS_DIRECTORY ${ARG_OUTPUT_DIR})
add_custom_command(
TARGET ${APP} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
${ARG_OUTPUT_DIR}
)
endif()
endif()

# As pack-pbp takes undefined arguments in form of "NULL" string,
Expand Down

0 comments on commit 6544b80

Please sign in to comment.