Ensure bintoc creates output directory

This commit is contained in:
Jack Andersen 2018-09-08 11:34:37 -10:00
parent 31e3ee4d34
commit 170ff23843
2 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,8 @@ macro(bintoc out in sym)
else()
set(theIn ${CMAKE_CURRENT_SOURCE_DIR}/${in})
endif()
get_filename_component(outDir ${theOut} DIRECTORY)
file(MAKE_DIRECTORY ${outDir})
add_custom_command(OUTPUT ${theOut}
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
DEPENDS ${theIn} bintoc)

View File

@ -19,6 +19,8 @@ macro(bintoc out in sym)
else()
set(theIn ${CMAKE_CURRENT_SOURCE_DIR}/${in})
endif()
get_filename_component(outDir ${theOut} DIRECTORY)
file(MAKE_DIRECTORY ${outDir})
add_custom_command(OUTPUT ${theOut}
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
DEPENDS ${theIn})