-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDANG.cmake
26 lines (17 loc) · 905 Bytes
/
DANG.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if (NOT DEFINED DANG_ONCE)
set(DANG_ONCE TRUE)
function (dang_asset_magic ASSET_FILE PATH_TO_SEARCH)
dang_generate_assetlist(${ASSET_FILE} ${PATH_TO_SEARCH})
# file(TOUCH_NOCREATE ${CMAKE_CURRENT_SOURCE_DIR}/${ASSET_FILE})
blit_assets_yaml (${PROJECT_NAME} ${ASSET_FILE})
endfunction()
function (dang_generate_assetlist ASSET_FILE PATH_TO_SEARCH)
# make sure that xmllint is installed and available or the bash script to generate the asset.yml will fail
find_program(XMLLINT NAMES xmllint DOC "make sure to have xmllint installed")
if (DEFINED XMLLINT-NOTFOUND)
message(FATAL_ERROR "xmllint not found!\nInstall with: apt get install libxml2-utils\n")
endif()
# get the inputs/outputs for the asset tool (at configure time)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/libs/DANG/tools/asset_yml_generator.sh ${ASSET_FILE} ${PATH_TO_SEARCH})
endfunction()
endif ()