2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:44:56 +00:00

addon distribution changes

This commit is contained in:
Jack Andersen
2015-09-01 16:31:33 -10:00
parent 112368c903
commit 4bf4834b86
5 changed files with 32 additions and 36 deletions

View File

@@ -1,6 +1,16 @@
add_executable(bintoc bintoc.c)
macro(bintoc out in sym)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${out}
COMMAND $<TARGET_FILE:bintoc> ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${in} ${CMAKE_CURRENT_BINARY_DIR}/${out} ${sym}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${in})
if(IS_ABSOLUTE ${out})
set(theOut ${out})
else()
set(theOut ${CMAKE_CURRENT_BINARY_DIR}/${out})
endif()
if(IS_ABSOLUTE ${in})
set(theIn ${in})
else()
set(theIn ${CMAKE_CURRENT_SOURCE_DIR}/${in})
endif()
add_custom_command(OUTPUT ${theOut}
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
DEPENDS ${theIn})
endmacro()