File: QtAxMacros.cmake

package info (click to toggle)
jtdx 2.2.159%2Bimproved-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 75,336 kB
  • sloc: cpp: 38,503; f90: 31,141; python: 27,061; ansic: 11,772; sh: 409; fortran: 353; makefile: 232
file content (36 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
#
# Macros for processing ActiveX and COM controls with ActiveQt
#

if (WIN32)
  include (CMakeParseArguments)

  find_program (DUMPCPP_Executable dumpcpp.exe)

  # wrap_ax_server (outfiles inputfile ...)

  function (WRAP_AX_SERVER outfiles)
    set (options)
    set (oneValueArgs)
    set (multiValueArgs OPTIONS)
    
    cmake_parse_arguments (_WRAP_AX_SERVER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
    
    set (ax_server_files ${_WRAP_AX_SERVER_UNPARSED_ARGUMENTS})
    set (ax_server_options ${_WRAP_AX_SERVER_OPTIONS})

    foreach (it ${ax_server_files})
      get_filename_component (outfile ${it} NAME_WE)
      get_filename_component (infile ${it} ABSOLUTE)
      set (outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile})
      add_custom_command (
	OUTPUT ${outfile}.h ${outfile}.cpp
	COMMAND ${DUMPCPP_Executable}
	ARGS ${AX_SERVER_options} -o "${outfile}" "${infile}"
	MAIN_DEPENDENCY ${infile} VERBATIM)
      list (APPEND ${outfiles} ${outfile}.cpp)
    endforeach()
    set(${outfiles} ${${outfiles}} PARENT_SCOPE)
  endfunction ()

endif (WIN32)