diff options
| author | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
|---|---|---|
| committer | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
| commit | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (patch) | |
| tree | b9c1f6245147a310aac3762630bad389bbb57335 /CMake/Modules/QtAxMacros.cmake | |
| parent | c720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (diff) | |
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'CMake/Modules/QtAxMacros.cmake')
| -rw-r--r-- | CMake/Modules/QtAxMacros.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/CMake/Modules/QtAxMacros.cmake b/CMake/Modules/QtAxMacros.cmake new file mode 100644 index 00000000..6a4cd144 --- /dev/null +++ b/CMake/Modules/QtAxMacros.cmake @@ -0,0 +1,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)
\ No newline at end of file |
