1
include(ParseArguments)
2
find_package(Valadoc REQUIRED)
4
macro(valadoc target outdir)
5
parse_arguments(ARGS "PACKAGES;OPTIONS;CUSTOM_VAPIS" "" ${ARGN})
7
foreach(pkg ${ARGS_PACKAGES})
8
list(APPEND vala_pkg_opts "--pkg=${pkg}")
9
endforeach(pkg ${ARGS_PACKAGES})
12
foreach(src ${ARGS_CUSTOM_VAPIS})
13
get_filename_component(pkg ${src} NAME_WE)
14
list(APPEND vala_pkg_opts "--pkg=${pkg}")
16
get_filename_component(path ${src} PATH)
17
list(APPEND vapi_dir_opts "--vapidir=${path}")
18
endforeach(src ${ARGS_DEFAULT_ARGS})
19
list(REMOVE_DUPLICATES vapi_dir_opts)
21
add_custom_command(TARGET ${target}
26
"-b" ${CMAKE_CURRENT_SOURCE_DIR}
28
"--package-name=${CMAKE_PROJECT_NAME}"
29
"--package-version=${PROJECT_VERSION}"