Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkFunctionConvertXPSchema.cmake
Go to the documentation of this file.
1 # mitkFunctionConvertXPSchema(INPUT plugin.xml ...
2 # OUTPUT_DIR output_dir
3 # TARGET_NAME target_name
4 # [DEPENDS depends]
5 # [WORKING_DIR working_dir]
6 # )
8 
9  set(_macro_options
10  )
11 
12  set(_macro_params
13  OUTPUT_DIR
14  TARGET_NAME
15  WORKING_DIR
16  )
17 
18  set(_macro_multiparams
19  INPUT
20  DEPENDS
21  )
22 
23  cmake_parse_arguments(_SCHEMA "${_macro_options}" "${_macro_params}" "${_macro_multiparams}" ${ARGN})
24 
25  set(XP_ANT_TASKS)
26  foreach(_file ${_SCHEMA_INPUT})
27  set(XP_ANT_TASKS "${XP_ANT_TASKS}
28  <pde.convertSchemaToHTML manifest=\"${_file}\" destination=\"\${dest}\" />"
29  )
30  endforeach()
31 
32  set(XP_DOC_DESTINATION "${_SCHEMA_OUTPUT_DIR}")
33 
34  if(NOT _SCHEMA_WORKING_DIR)
35  set(_SCHEMA_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR})
36  endif()
37 
38  configure_file("${CMAKE_CURRENT_LIST_DIR}/buildExtPointDoc.xml.in"
39  "${_SCHEMA_WORKING_DIR}/buildExtPointDoc.xml" @ONLY)
40 
41  add_custom_target(${_SCHEMA_TARGET_NAME}
42  ant -f ${_SCHEMA_WORKING_DIR}/buildExtPointDoc.xml
43  DEPENDS ${_SCHEMA_DEPENDS}
44  WORKING_DIRECTORY ${_SCHEMA_WORKING_DIR}
45  VERBATIM)
46 
47 endfunction()
mitkFunctionConvertXPSchema()