1f30bcf336
[ChangeLog][Build System] Tools that are called by the build system and are unlikely to be called by the user are now installed to the libexec directory. This is a step towards easier co-installability of different Qt versions. Pick-to: 6.1 Task-number: QTBUG-88791 Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
55 lines
1.7 KiB
Plaintext
55 lines
1.7 KiB
Plaintext
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
qtPrepareLibExecTool(QMAKE_TRACEGEN, tracegen)
|
|
|
|
isEmpty(TRACEGEN_DIR): TRACEGEN_DIR = .
|
|
|
|
PROVIDER_NAME = qt$$lower($$MODULE)
|
|
INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
|
|
HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}
|
|
|
|
if(qtConfig(lttng)|qtConfig(etw)) {
|
|
SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}
|
|
|
|
isEmpty(BUILDS)|build_pass {
|
|
impl_file_contents = \
|
|
"$${LITERAL_HASH}define TRACEPOINT_CREATE_PROBES" \
|
|
"$${LITERAL_HASH}define TRACEPOINT_DEFINE" \
|
|
"$${LITERAL_HASH}include \"$${HEADER_PATH}\""
|
|
|
|
write_file($$SOURCE_PATH, impl_file_contents)|error()
|
|
}
|
|
|
|
GENERATED_SOURCES += $$SOURCE_PATH
|
|
|
|
tracegen.input = TRACEPOINT_PROVIDER
|
|
tracegen.output = $$HEADER_PATH
|
|
tracegen.variable_out = HEADERS
|
|
tracegen.depends += $$QMAKE_TRACEGEN_EXE
|
|
tracegen.CONFIG = target_predeps
|
|
|
|
qtConfig(lttng) {
|
|
tracegen.commands = $$QMAKE_TRACEGEN lttng ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
|
QMAKE_USE_PRIVATE += lttng-ust
|
|
} else {
|
|
tracegen.commands = $$QMAKE_TRACEGEN etw ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
|
}
|
|
|
|
QMAKE_EXTRA_COMPILERS += tracegen
|
|
|
|
DEFINES += Q_TRACEPOINT
|
|
} else {
|
|
isEmpty(BUILDS)|build_pass {
|
|
header_file_contents = "$${LITERAL_HASH}include <private/qtrace_p.h>"
|
|
write_file($$HEADER_PATH, header_file_contents)|error()
|
|
}
|
|
}
|