diff options
author | Robert Griebl <robert.griebl@qt.io> | 2021-06-29 01:41:34 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2021-06-30 15:56:23 +0200 |
commit | e38f7b9239383b55617acc101c212a83fe63cd54 (patch) | |
tree | 1ea7c40e6a20eefb69de435da71926738bf928c9 /qmake-features | |
parent | 28db22bc8a55dc57126c575b9d5381fa6548a8ba (diff) |
cmake: remove qmake build system (except in examples/)
Change-Id: I8d00047f8e03bb77863041eaa99f1bba13a15a32
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'qmake-features')
-rw-r--r-- | qmake-features/CMakeLists.txt | 2 | ||||
-rw-r--r-- | qmake-features/add-static-library.prf | 32 | ||||
-rw-r--r-- | qmake-features/am-config.prf | 71 | ||||
-rw-r--r-- | qmake-features/am-coverage.prf | 18 | ||||
-rw-r--r-- | qmake-features/am-qml-testcase.prf | 103 | ||||
-rw-r--r-- | qmake-features/build-config.prf | 26 | ||||
-rw-r--r-- | qmake-features/config-output.prf | 57 | ||||
-rw-r--r-- | qmake-features/dbus-adaptors-xml.prf | 26 | ||||
-rw-r--r-- | qmake-features/fix-library-path.prf | 11 | ||||
-rw-r--r-- | qmake-features/install-prefix.prf | 8 | ||||
-rw-r--r-- | qmake-features/qmake-features.pro | 26 |
11 files changed, 0 insertions, 380 deletions
diff --git a/qmake-features/CMakeLists.txt b/qmake-features/CMakeLists.txt deleted file mode 100644 index c58ce690..00000000 --- a/qmake-features/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Generated from qmake-features.pro. - diff --git a/qmake-features/add-static-library.prf b/qmake-features/add-static-library.prf deleted file mode 100644 index 1597cf1a..00000000 --- a/qmake-features/add-static-library.prf +++ /dev/null @@ -1,32 +0,0 @@ -load(fix-library-path) - -defineTest(addStaticLibrary) { - libpath = $$1 - libext = ".a" - libprefix = "lib" - srcdir = $$join(libpath,,$$join(PWD,,,'/'),) - libname = $$basename(libpath) - libdir = $$join(libpath,,$$join(OUT_PWD,,,'/'),) - - libdir = $$fixLibraryPath($$libdir) - win32 { - libext = ".lib" - libprefix = "" - } - libdir=$$clean_path($$libdir) - - INCLUDEPATH *= $$srcdir - CONFIG *= link_prl - - *-gcc*:LIBS += -Wl,--whole-archive - LIBS += $$join(libdir,,-L,) - LIBS += $$join(libname,,-l,) - *-gcc*:LIBS += -Wl,--no-whole-archive - - PRE_TARGETDEPS *= $$join(libdir,,,$$join(libname,,"/$$libprefix",$$libext)) - - export(INCLUDEPATH) - export(LIBS) - export(PRE_TARGETDEPS) - export(CONFIG) -} diff --git a/qmake-features/am-config.prf b/qmake-features/am-config.prf deleted file mode 100644 index 82ebd7c6..00000000 --- a/qmake-features/am-config.prf +++ /dev/null @@ -1,71 +0,0 @@ - -CONFIG *= c++11 -CONFIG *= link_pkgconfig -CONFIG *= no_private_qt_headers_warning hide_symbols -CONFIG -= app_bundle qml_debug -CONFIG += exceptions - -DEFINES += QT_MESSAGELOGCONTEXT QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII - -# CONFIG += sanitizer sanitize_address sanitize_undefined - -win32-msvc*:QMAKE_CXXFLAGS += /FS /wd4290 /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS - -disable-installer:DEFINES *= AM_DISABLE_INSTALLER -disable-external-dbus-interfaces:DEFINES *= AM_DISABLE_EXTERNAL_DBUS_INTERFACES -systemd-workaround:DEFINES *= AM_SYSTEMD_WORKAROUND -enable-widgets:DEFINES *= AM_ENABLE_WIDGETS -config_touchemulation:DEFINES += AM_ENABLE_TOUCH_EMULATION -!disable-libbacktrace:if(linux:!android:if(enable-libbacktrace|CONFIG(debug, debug|release))|macos): DEFINES *= AM_USE_LIBBACKTRACE -windows:msvc:!disable-stackwalker: DEFINES *= AM_USE_STACKWALKER - -!force-single-process { - linux|macos { - if(qtHaveModule(waylandcompositor)) { - CONFIG *= auto-multi-process - } - } - if(force-multi-process|auto-multi-process) { - CONFIG *= multi-process - DEFINES *= AM_MULTI_PROCESS - } -} - -DEFINES *= AM_VERSION=\\\"$$MODULE_VERSION\\\" - -defineTest(CONFIG_VALUE) { - !contains(CONFIG, "^$$1=.*"):return(false) - value = $$find(CONFIG, "^$$1=.*") - !isEmpty(value):value=$$section(value, =, 1, 1) - $$2 = $$value - export($$2) - return(true) -} - -CONFIG_VALUE(install-prefix, INSTALL_PREFIX) - -CONFIG_VALUE(hardware-id, AM_HARDWARE_ID):DEFINES *= AM_HARDWARE_ID=\\\"$$AM_HARDWARE_ID\\\" -else:CONFIG_VALUE(hardware-id-from-file, AM_HARDWARE_ID_FF):DEFINES *= AM_HARDWARE_ID_FROM_FILE=\\\"$$AM_HARDWARE_ID_FF\\\" - -linux|force-libcrypto:DEFINES *= AM_USE_LIBCRYPTO - -!win32:load(am-coverage.prf) - - -# Unlike MSVC, MinGW does not add a dummy manifest, leading to UAC prompts on executable -# filenames containing "bad" words like setup, install, update, patch, ... -# RC files cannot be compiled into static libs, so we just generate one for each app. -win32-g++*:equals(TEMPLATE, "app") { - MINGW_MF = "1 24 { \"<?xml version=\"\"1.0\"\" encoding=\"\"UTF-8\"\" standalone=\"\"yes\"\"?>\ - <assembly xmlns=\"\"urn:schemas-microsoft-com:asm.v1\"\" manifestVersion=\"\"1.0\"\">\ - <trustInfo xmlns=\"\"urn:schemas-microsoft-com:asm.v2\"\">\ - <security>\ - <requestedPrivileges xmlns=\"\"urn:schemas-microsoft-com:asm.v3\"\">\ - <requestedExecutionLevel level=\"\"asInvoker\"\" uiAccess=\"\"false\"\" />\ - </requestedPrivileges>\ - </security>\ - </trustInfo>\ - </assembly>\" }" - write_file($$OUT_PWD/mingw-resource-win.rc, MINGW_MF) - RC_FILE = $$OUT_PWD/mingw-resource-win.rc -} diff --git a/qmake-features/am-coverage.prf b/qmake-features/am-coverage.prf deleted file mode 100644 index f08f190c..00000000 --- a/qmake-features/am-coverage.prf +++ /dev/null @@ -1,18 +0,0 @@ -# generate code coverage information using gcov/lcov/genhtml -CONFIG(debug,debug|release) { - equals(TEMPLATE, "subdirs") { - coverage.target = coverage - coverage.CONFIG = recursive - QMAKE_EXTRA_TARGETS += coverage - } else { - coverage_pre.commands += @echo && echo "Building with coverage support..." && echo $(eval CXXFLAGS += -O0 -fprofile-arcs -ftest-coverage)$(eval LFLAGS += -O0 -fprofile-arcs -ftest-coverage) - - coverage.CONFIG += recursive - coverage.commands = @echo && echo "Finished building with coverage support." && echo - build_pass|!debug_and_release:coverage.depends = coverage_pre all - - QMAKE_EXTRA_TARGETS *= coverage_pre coverage - } -} - -QMAKE_CLEAN += $(OBJECTS_DIR)/*.gcda $(OBJECTS_DIR)/*.gcno $(TARGET).gcov-info diff --git a/qmake-features/am-qml-testcase.prf b/qmake-features/am-qml-testcase.prf deleted file mode 100644 index adf91f1e..00000000 --- a/qmake-features/am-qml-testcase.prf +++ /dev/null @@ -1,103 +0,0 @@ -TEMPLATE = aux - -load(am-config) - -# Add environment for non-installed builds. Do this first, so the -# 'make' variable expansions don't end up in a batch file/script. -QT_TOOL_NAME = appman-qmltestrunner -!isEmpty(TEST_FILES): qtAddTargetEnv(COMMAND, QT) - -# If the test ends up in a different directory, we should cd to that directory. -TESTRUN_CWD = $$DESTDIR - -debug_and_release:debug_and_release_target { - # But in debug-and-release-target mode we don't want to cd into the debug/release - # directory (e.g. if the test goes to foo/release/tst_thing.exe, we want to do - # 'cd foo && release/tst_thing.exe', not 'cd foo/release && tst_thing.exe'). - - TESTRUN_CWD ~= s/(release|debug)$// - TEST_TARGET_DIR = $$relative_path($$absolute_path($$DESTDIR, $$OUT_PWD), $$absolute_path($$TESTRUN_CWD, $$OUT_PWD)) -} - -# Allow for a custom test runner script -COMMAND += $(TESTRUNNER) - -# Define how the appman should be run, single-process, multi-process, both -isEmpty(MODE) { - MODE = both - CONFIG *= qmltest-mode-auto -} - -# Determine the location of the testrunner -prefix_build { - AM_TESTRUNNER_DIR = $$BUILD_DIR/bin -} else { - !isEmpty(INSTALL_PREFIX) { - AM_TESTRUNNER_DIR = $${INSTALL_PREFIX}/bin - } else { - AM_TESTRUNNER_DIR = $$[QT_INSTALL_BINS] - } -} - -# The check command -COMMAND += $$AM_TESTRUNNER_DIR/appman-qmltestrunner --no-cache --no-dlt-logging -mac: COMMAND += --dbus=none -!multi-process: { - !build_pass:!qmltest-mode-auto:message("am-qml-testcase: forcing MODE to single-process, because the application manager is built in single-process mode") - MODE = single-process -} - -# Add import dirs -for(import, IMPORTS_DIR) { - COMMAND += -I $$absolute_path($$import, $$_PRO_FILE_PWD_) -} -OTHER_FILES += $$IMPORTS_DIR - -# Read a config file -for(config, AM_CONFIG) { - isEmpty(TESTRUN_CWD): COMMAND += -c $$absolute_path($$config, $$_PRO_FILE_PWD_) - else: COMMAND += -c $$config -} -OTHER_FILES += $$AM_CONFIG - -# Make AM_TESTDATA_DIR known -!isEmpty(AM_TESTDATA_DIR) { - COMMAND += -o \'systemProperties: { public: { AM_TESTDATA_DIR: $$AM_TESTDATA_DIR } }\' -} - -!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ - COMMAND = cd $$shell_path($$TESTRUN_CWD) && $$eval(COMMAND) - -QMAKE_EXTRA_TARGETS *= check - -# Set default test configuration (each config is run separately) -isEmpty(TEST_CONFIGURATIONS) { - !equals(MODE, "single-process"): TEST_CONFIGURATIONS = "--force-multi-process" - !equals(MODE, "multi-process"): TEST_CONFIGURATIONS += "--force-single-process" -} - -# Execute a testrunner for every file -for(file, TEST_FILES) { - for(config, TEST_CONFIGURATIONS) { - check.commands += $$COMMAND $$absolute_path($$file, $$_PRO_FILE_PWD_) $${config} -- $(TESTARGS) && - } -} -msvc:check.commands += VER>NUL -else:check.commands += true; -OTHER_FILES += $$TEST_FILES - -# Copy assets to build folder -for (d , DIRECTORIES) { - do_copydata.commands += $(COPY_DIR) $$shell_path($$_PRO_FILE_PWD_/$${d}) $$shell_path($$OUT_PWD/$${d}) $$escape_expand(\n\t) -} -for (f , FILES) { - do_copydata.commands += $(COPY) $$shell_path($$_PRO_FILE_PWD_/$${f}) $$shell_path($$OUT_PWD/$${f}) $$escape_expand(\n\t) -} - -!equals(_PRO_FILE_PWD_, $$OUT_PWD) { - check.depends = do_copydata - QMAKE_EXTRA_TARGETS += do_copydata -} - -# Make sure that possible apps are in OTHER_FILES -for (app, TEST_APPS): OTHER_FILES += apps/$${app}/*.yaml apps/$${app}/*.qml apps/$${app}/*.png diff --git a/qmake-features/build-config.prf b/qmake-features/build-config.prf deleted file mode 100644 index d8be43a6..00000000 --- a/qmake-features/build-config.prf +++ /dev/null @@ -1,26 +0,0 @@ -# This functions creates a resource file named build-config.yaml. All variables that are given as -# arguments are dumped into this file in YAML format as a map. -# Given a variable named foo: -# - if it is empty, it gets dumped as the null value: FOO: ~ -# - if it has a single values, it gets dumped as a string: FOO: "value" -# - if it has multiple values, it gets dumped as list of strings: -# FOO: -# - "value1" -# - "value2" - -defineTest(createBuildConfig) { - write_file($$OUT_PWD/build-config.yaml, $$list("---")) - for(var, ARGS) { - isEmpty($$var):out = "$$var: ~" - else:count($$var, 1):out = "$$var: \"$$first($$var)\"" - else { - out = "$$var:" - for(val, $$var):out += " - \"$$val\"" - out=$$join(out, "$$escape_expand(\\n)") - } - write_file($$OUT_PWD/build-config.yaml, out, append) - } - write_file($$OUT_PWD/config.qrc, $$list("<RCC version=\"1.0\"><qresource prefix=\"/\"><file>build-config.yaml</file></qresource></RCC>")) - RESOURCES += $$OUT_PWD/config.qrc - export(RESOURCES) -} diff --git a/qmake-features/config-output.prf b/qmake-features/config-output.prf deleted file mode 100644 index 9527fe34..00000000 --- a/qmake-features/config-output.prf +++ /dev/null @@ -1,57 +0,0 @@ -defineReplace(yesNo) { - if ($$1):return("yes") - else:return("no") -} - -defineTest(printConfigLine) { - !build_pass:return - - msg="$$1" - val=$$2 - color=$$3 - width=$$4 - - isEmpty(width):width = 30 - - unix:system("test -t 2") { # check if we are on unix and stderr is a tty - macos:echo="echo" - else:echo="/bin/echo -e" - - equals(color, "auto") { - yesmatch = $$find(val, "^yes") - nomatch = $$find(val, "^no") - automatch = $$find(val, "^auto") - - !isEmpty(yesmatch):color = "green" - else:!isEmpty(nomatch):color = "red" - else:!isEmpty(automatch):color = "yellow" - } - equals(color, "red"): prolog=$$system($$echo "\\\\033")[31;1m - else:equals(color, "green"): prolog=$$system($$echo "\\\\033")[32;1m - else:equals(color, "yellow"): prolog=$$system($$echo "\\\\033")[33;1m - else:equals(color, "orange"): prolog=$$system($$echo "\\\\033")[33m - else:equals(color, "white"): prolog=$$system($$echo "\\\\033")[37;1m - epilog = $$system($$echo "\\\\033")[0m - } - - isEmpty(msg)|contains(msg, "^-- .*") { - log($$prolog$$section(msg, "-- ", 1, -1)$$epilog$$escape_expand(\\n)) - return() - } - - # The tricky part: there are no arithmetic functions in qmake! - # Start by createing an array of strings, where the string at [i] consists of i dots - # We need it the other way around though, hence the reverse at the end (sadly you - # cannot run a $$width..1 loop, although 30..1 does work). - for(i, 1..$$width) { - spacingEntry="" - for (j, 1..$$i) { spacingEntry += "." } - spacing += $$join(spacingEntry) - } - spacing = $$reverse(spacing) - - # convert a string into an array of characters, so we can get the length via size() - msgArray = $$split(msg,) - - log(" $$msg $$member(spacing, $$size(msgArray)) $$prolog$$val$$epilog$$escape_expand(\\n)") -} diff --git a/qmake-features/dbus-adaptors-xml.prf b/qmake-features/dbus-adaptors-xml.prf deleted file mode 100644 index 66828c87..00000000 --- a/qmake-features/dbus-adaptors-xml.prf +++ /dev/null @@ -1,26 +0,0 @@ - -load(moc) -qtPrepareTool(QDBUSXML2CPP, qdbusxml2cpp) - -defineReplace(am_qdbusOutputBasename) { - return($$lower($$section($$list($$basename(1)),.,-2,-2))) -} - -adaptors_header.commands = $$QDBUSXML2CPP -i dbus-utilities.h -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN} -adaptors_header.depends += $$QDBUSXML2CPP_EXE -adaptors_header.output = ${QMAKE_FUNC_FILE_IN_am_qdbusOutputBasename}_adaptor$${first(QMAKE_EXT_H)} -adaptors_header.name = DBUS adaptor header for ${QMAKE_FILE_IN} -adaptors_header.variable_out = dbus_adaptor_headers -adaptors_header.input = ADAPTORS_XML -adaptors_header.CONFIG += target_predep - -QMAKE_EXTRA_COMPILERS += adaptors_header - -adaptors_moc.commands = $$moc_header.commands -adaptors_moc.depends += $$QMAKE_MOC_EXE -adaptors_moc.output = $$moc_header.output -adaptors_moc.input = dbus_adaptor_headers -adaptors_moc.variable_out = GENERATED_SOURCES -adaptors_moc.name = DBUS adaptor MOC headers - -QMAKE_EXTRA_COMPILERS += adaptors_moc diff --git a/qmake-features/fix-library-path.prf b/qmake-features/fix-library-path.prf deleted file mode 100644 index ca7a0132..00000000 --- a/qmake-features/fix-library-path.prf +++ /dev/null @@ -1,11 +0,0 @@ -defineReplace(fixLibraryPath) { - libpath = $$1 - win32 { - CONFIG(debug, debug|release) { - libpath = $$join(libpath,,,/debug) - } else { - libpath = $$join(libpath,,,/release) - } - } - return($$libpath) -} diff --git a/qmake-features/install-prefix.prf b/qmake-features/install-prefix.prf deleted file mode 100644 index 4c7a6252..00000000 --- a/qmake-features/install-prefix.prf +++ /dev/null @@ -1,8 +0,0 @@ -!isEmpty(INSTALL_PREFIX) { - prefix_build { - target.path = $${INSTALL_PREFIX}/bin - CONFIG -= relative_qt_rpath - } else { - DESTDIR = $${INSTALL_PREFIX}/bin - } -} diff --git a/qmake-features/qmake-features.pro b/qmake-features/qmake-features.pro deleted file mode 100644 index b03e740d..00000000 --- a/qmake-features/qmake-features.pro +++ /dev/null @@ -1,26 +0,0 @@ -TEMPLATE = aux - -OTHER_FILES += \ - *.prf \ - -#All the feature files we want to install and provide to other modules or to the examples -features.files += \ - am-systemui.prf \ - am-app.prf \ - am-package.prf -features.path = $$[QT_HOST_DATA]/mkspecs/features - -INSTALLS += features - -# Ensure files are copied to qtbase mkspecs for non-prefixed builds -!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) { - defineReplace(stripSrcDir) { - return($$relative_path($$1, $$_PRO_FILE_PWD_)) - } - prffiles2build.input = features.files - prffiles2build.output = $$[QT_HOST_DATA]/mkspecs/features/${QMAKE_FUNC_FILE_IN_stripSrcDir} - prffiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - prffiles2build.name = COPY ${QMAKE_FILE_IN} - prffiles2build.CONFIG = no_link target_predeps - QMAKE_EXTRA_COMPILERS += prffiles2build -} |