-
Notifications
You must be signed in to change notification settings - Fork 91
/
kdwsdl2cpp.pri
63 lines (56 loc) · 2.78 KB
/
kdwsdl2cpp.pri
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This file is part of the KD Soap project.
#
# SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: MIT
#
# User-configurable variables
isEmpty(WSDL_DIR):WSDL_DIR = .
isEmpty(WSDL_SOURCES_DIR):WSDL_SOURCES_DIR = $$WSDL_DIR
isEmpty(WSDL_HEADERS_DIR):WSDL_HEADERS_DIR = $$WSDL_DIR
isEmpty(KD_MOD_WSDL):KD_MOD_WSDL = wsdl_
isEmpty(KD_MOD_SWSDL):KD_MOD_SWSDL = swsdl_
win32* {
isEmpty(KDSOAPDIR): KDWSDL2CPP = $$replace(KDSOAP_PATH, /, \\)\\bin\\kdwsdl2cpp.exe
!isEmpty(KDSOAPDIR): KDWSDL2CPP = $$replace(KDSOAPDIR, /, \\)\\bin\\kdwsdl2cpp.exe
!isEmpty(TOP_BUILD_DIR): KDWSDL2CPP = $$replace(TOP_BUILD_DIR, /, \\)\\bin\\kdwsdl2cpp.exe
} else {
isEmpty(KDSOAPDIR): KDWSDL2CPP = $$KDSOAP_PATH/bin/kdwsdl2cpp
!isEmpty(KDSOAPDIR): KDWSDL2CPP = $$KDSOAPDIR/bin/kdwsdl2cpp
!isEmpty(TOP_BUILD_DIR): KDWSDL2CPP = $${TOP_BUILD_DIR}/bin/kdwsdl2cpp
}
kdwsdl_h.commands = $$KDWSDL2CPP $$KDWSDL_OPTIONS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
#kdwsdl_h.depend_command = "$$KDWSDL2CPP" -d "${QMAKE_FILE_IN}"
kdwsdl_h.depends = $$KDWSDL2CPP
kdwsdl_h.output = $$WSDL_HEADERS_DIR/$${KD_MOD_WSDL}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
kdwsdl_h.input = KDWSDL
kdwsdl_h.variable_out = KDWSDL_HEADERS
kdwsdl_h.CONFIG += no_link target_predeps
kdwsdl_h.name = KDWsdl2Cpp HEADER ${QMAKE_FILE_IN}
silent:kdwsdl_h.commands = @echo kdwsdl2cpp ${QMAKE_FILE_IN} && $$kdwsdl_h.commands
QMAKE_EXTRA_COMPILERS += kdwsdl_h
kdwsdl_impl.commands = $$KDWSDL2CPP $$KDWSDL_OPTIONS -impl $${KD_MOD_WSDL}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
#kdwsdl_impl.depend_command = "$$KDWSDL2CPP" -d "${QMAKE_FILE_IN}"
kdwsdl_impl.output = $$WSDL_SOURCES_DIR/$${KD_MOD_WSDL}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
kdwsdl_impl.depends = $$WSDL_HEADERS_DIR/$${KD_MOD_WSDL}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} $$KDWSDL2CPP
kdwsdl_impl.input = KDWSDL
kdwsdl_impl.variable_out = SOURCES
kdwsdl_impl.dependency_type = TYPE_C
kdwsdl_impl.CONFIG += target_predeps
kdwsdl_impl.name = KDWsdl2Cpp SOURCE ${QMAKE_FILE_IN}
silent:kdwsdl_impl.commands = @echo kdwsdl2cpp -impl ${QMAKE_FILE_IN} && $$kdwsdl_impl.commands
QMAKE_EXTRA_COMPILERS += kdwsdl_impl
# Moc files
load(moc)
kdwsdl_moc.commands = $$moc_header.commands
kdwsdl_moc.output = $$moc_header.output
kdwsdl_moc.depends = $$WSDL_SOURCES_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
kdwsdl_moc.input = KDWSDL_HEADERS
kdwsdl_moc.variable_out = GENERATED_SOURCES
kdwsdl_moc.name = $$moc_header.name
QMAKE_EXTRA_COMPILERS += kdwsdl_moc
# make sure we can include the generated header (taken from moc.prf)
wsdl_dir_short = $$WSDL_DIR
contains(QMAKE_HOST.os,Windows):wsdl_dir_short ~= s,^.:,/,
contains(wsdl_dir_short, ^[/\\\\].*):INCLUDEPATH += $$WSDL_DIR
else:INCLUDEPATH += $$OUT_PWD/$$WSDL_DIR