qt5base-lts/qmake/CMakeLists.txt

276 lines
13 KiB
CMake
Raw Normal View History

# Generated from qmake.pro.
#####################################################################
## qmake Tool:
#####################################################################
qt_get_tool_target_name(target_name qmake)
qt_add_tool(${target_name}
NO_QT # special case
Export tool config and target files for each relevant module CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-10 17:21:22 +00:00
TOOLS_TARGET Core # special case
# GUI # special case: remove this
SOURCES
../src/3rdparty/pcre2/src/config.h
../src/3rdparty/pcre2/src/pcre2.h
../src/3rdparty/pcre2/src/pcre2_auto_possess.c
../src/3rdparty/pcre2/src/pcre2_chartables.c
../src/3rdparty/pcre2/src/pcre2_compile.c
../src/3rdparty/pcre2/src/pcre2_config.c
../src/3rdparty/pcre2/src/pcre2_context.c
../src/3rdparty/pcre2/src/pcre2_dfa_match.c
../src/3rdparty/pcre2/src/pcre2_error.c
../src/3rdparty/pcre2/src/pcre2_extuni.c
../src/3rdparty/pcre2/src/pcre2_find_bracket.c
../src/3rdparty/pcre2/src/pcre2_internal.h
../src/3rdparty/pcre2/src/pcre2_intmodedep.h
../src/3rdparty/pcre2/src/pcre2_jit_compile.c
../src/3rdparty/pcre2/src/pcre2_maketables.c
../src/3rdparty/pcre2/src/pcre2_match.c
../src/3rdparty/pcre2/src/pcre2_match_data.c
../src/3rdparty/pcre2/src/pcre2_newline.c
../src/3rdparty/pcre2/src/pcre2_ord2utf.c
../src/3rdparty/pcre2/src/pcre2_pattern_info.c
../src/3rdparty/pcre2/src/pcre2_script_run.c
../src/3rdparty/pcre2/src/pcre2_serialize.c
../src/3rdparty/pcre2/src/pcre2_string_utils.c
../src/3rdparty/pcre2/src/pcre2_study.c
../src/3rdparty/pcre2/src/pcre2_substitute.c
../src/3rdparty/pcre2/src/pcre2_substring.c
../src/3rdparty/pcre2/src/pcre2_tables.c
../src/3rdparty/pcre2/src/pcre2_ucd.c
../src/3rdparty/pcre2/src/pcre2_ucp.h
../src/3rdparty/pcre2/src/pcre2_valid_utf.c
../src/3rdparty/pcre2/src/pcre2_xclass.c
../src/corelib/global/qendian.cpp # special case
../src/corelib/global/qglobal.cpp ../src/corelib/global/qglobal.h
../src/corelib/global/qlibraryinfo.cpp
../src/corelib/global/qlogging.cpp
../src/corelib/global/qmalloc.cpp
../src/corelib/global/qnumeric.cpp ../src/corelib/global/qnumeric.h
../src/corelib/global/qoperatingsystemversion.cpp # special case
../src/corelib/global/qrandom.cpp # special case
../src/corelib/io/qabstractfileengine.cpp ../src/corelib/io/qabstractfileengine_p.h
../src/corelib/io/qbuffer.cpp ../src/corelib/io/qbuffer.h
../src/corelib/io/qdebug.cpp # special case
../src/corelib/io/qdir.cpp ../src/corelib/io/qdir.h ../src/corelib/io/qdir_p.h
../src/corelib/io/qdiriterator.cpp ../src/corelib/io/qdiriterator.h
../src/corelib/io/qfile.cpp ../src/corelib/io/qfile.h
../src/corelib/io/qfiledevice.cpp
../src/corelib/io/qfileinfo.cpp ../src/corelib/io/qfileinfo.h
../src/corelib/io/qfilesystemengine.cpp
../src/corelib/io/qfilesystementry.cpp
../src/corelib/io/qfsfileengine.cpp
../src/corelib/io/qfsfileengine_iterator.cpp
../src/corelib/io/qiodevice.cpp ../src/corelib/io/qiodevice.h
../src/corelib/io/qsettings.cpp
../src/corelib/io/qtemporaryfile.cpp ../src/corelib/io/qtemporaryfile.h
../src/corelib/kernel/qmetatype.cpp ../src/corelib/kernel/qmetatype.h
../src/corelib/kernel/qsystemerror.cpp ../src/corelib/kernel/qsystemerror_p.h
../src/corelib/kernel/qvariant.cpp
../src/corelib/plugin/quuid.cpp ../src/corelib/plugin/quuid.h
../src/corelib/serialization/qcborstreamwriter.cpp ../src/corelib/serialization/qcborstreamwriter.h
../src/corelib/serialization/qcborvalue.cpp ../src/corelib/serialization/qcborvalue.h ../src/corelib/serialization/qcborvalue_p.h
../src/corelib/serialization/qjson_p.h
../src/corelib/serialization/qjsonarray.cpp ../src/corelib/serialization/qjsonarray.h
../src/corelib/serialization/qjsoncbor.cpp
../src/corelib/serialization/qjsondocument.cpp ../src/corelib/serialization/qjsondocument.h
../src/corelib/serialization/qjsonobject.cpp ../src/corelib/serialization/qjsonobject.h
../src/corelib/serialization/qjsonparser.cpp ../src/corelib/serialization/qjsonparser_p.h
../src/corelib/serialization/qjsonvalue.cpp ../src/corelib/serialization/qjsonvalue.h
../src/corelib/serialization/qjsonwriter_p.h
../src/corelib/serialization/qtextstream.cpp ../src/corelib/serialization/qtextstream.h
../src/corelib/text/qbytearray.cpp ../src/corelib/text/qbytearray.h
../src/corelib/text/qbytearraylist.cpp ../src/corelib/text/qbytearraylist.h # special case
../src/corelib/text/qbytearraymatcher.cpp ../src/corelib/text/qbytearraymatcher.h
../src/corelib/text/qchar.h
../src/corelib/text/qlocale.cpp ../src/corelib/text/qlocale.h
../src/corelib/text/qlocale_tools.cpp ../src/corelib/text/qlocale_tools_p.h
../src/corelib/text/qregularexpression.cpp ../src/corelib/text/qregularexpression.h
../src/corelib/text/qstring.cpp ../src/corelib/text/qstring.h
../src/corelib/text/qstringbuilder.cpp ../src/corelib/text/qstringbuilder.h
../src/corelib/text/qstringconverter.cpp ../src/corelib/text/qstringconverter.h ../src/corelib/text/qstringconverter_p.h
../src/corelib/text/qstringlist.cpp ../src/corelib/text/qstringlist.h
../src/corelib/text/qstringmatcher.h
../src/corelib/text/qvsnprintf.cpp
../src/corelib/time/qcalendar.cpp ../src/corelib/time/qcalendar.h
../src/corelib/time/qcalendarbackend_p.h
../src/corelib/time/qcalendarmath_p.h
../src/corelib/time/qdatetime.cpp ../src/corelib/time/qdatetime.h ../src/corelib/time/qdatetime_p.h
../src/corelib/time/qgregoriancalendar.cpp ../src/corelib/time/qgregoriancalendar_p.h
../src/corelib/time/qromancalendar.cpp ../src/corelib/time/qromancalendar_p.h
../src/corelib/tools/qarraydata.cpp ../src/corelib/tools/qarraydata.h
../src/corelib/tools/qarraydataops.h
../src/corelib/tools/qarraydatapointer.h
../src/corelib/tools/qbitarray.cpp ../src/corelib/tools/qbitarray.h
../src/corelib/tools/qcryptographichash.cpp ../src/corelib/tools/qcryptographichash.h
../src/corelib/time/qcalendar.cpp ../src/corelib/time/qcalendar.h # special case
../src/corelib/time/qcalendarbackend_p.h ../src/corelib/time/qcalendarmath_p.h # special case
../src/corelib/time/qgregoriancalendar.cpp ../src/corelib/time/qgregoriancalendar_p.h # special case
../src/corelib/time/qromancalendar.cpp ../src/corelib/time/qromancalendar_p.h # special case
../src/corelib/time/qdatetime.cpp ../src/corelib/time/qdatetime.h ../src/corelib/time/qdatetime_p.h # special case
../src/corelib/tools/qhash.cpp ../src/corelib/tools/qhash.h
../src/corelib/tools/qlist.cpp ../src/corelib/tools/qlist.h
../src/corelib/text/qlocale.cpp ../src/corelib/text/qlocale.h
../src/corelib/text/qlocale_tools.cpp ../src/corelib/text/qlocale_tools_p.h
../src/corelib/tools/qmap.cpp ../src/corelib/tools/qmap.h
../src/corelib/text/qregularexpression.cpp ../src/corelib/text/qregularexpression.h
../src/corelib/tools/qringbuffer.cpp # special case
../src/corelib/text/qstring.cpp ../src/corelib/text/qstring.h
../src/corelib/text/qstringbuilder.cpp ../src/corelib/text/qstringbuilder.h
../src/corelib/text/qstringconverter.cpp ../src/corelib/text/qstringconverter.h ../src/corelib/text/qstringconverter_p.h
../src/corelib/text/qstringlist.cpp ../src/corelib/text/qstringlist.h
../src/corelib/text/qstringmatcher.h
../src/corelib/tools/qvector.h
../src/corelib/tools/qversionnumber.cpp ../src/corelib/tools/qversionnumber.h
../src/corelib/text/qvsnprintf.cpp
cachekeys.h
generators/mac/pbuilder_pbx.cpp generators/mac/pbuilder_pbx.h
generators/makefile.cpp generators/makefile.h
generators/makefiledeps.cpp generators/makefiledeps.h
generators/metamakefile.cpp generators/metamakefile.h
generators/projectgenerator.cpp generators/projectgenerator.h
generators/unix/unixmake.cpp generators/unix/unixmake.h
generators/unix/unixmake2.cpp
generators/win32/mingw_make.cpp generators/win32/mingw_make.h
generators/win32/msbuild_objectmodel.cpp generators/win32/msbuild_objectmodel.h
generators/win32/msvc_nmake.cpp generators/win32/msvc_nmake.h
generators/win32/msvc_objectmodel.cpp generators/win32/msvc_objectmodel.h
generators/win32/msvc_vcproj.cpp generators/win32/msvc_vcproj.h
generators/win32/msvc_vcxproj.cpp generators/win32/msvc_vcxproj.h
generators/win32/winmakefile.cpp generators/win32/winmakefile.h
generators/xmloutput.cpp generators/xmloutput.h
library/ioutils.cpp library/ioutils.h
library/proitems.cpp library/proitems.h
library/qmake_global.h
library/qmakebuiltins.cpp
library/qmakeevaluator.cpp library/qmakeevaluator.h library/qmakeevaluator_p.h
library/qmakeglobals.cpp library/qmakeglobals.h
library/qmakeparser.cpp library/qmakeparser.h
library/qmakevfs.cpp library/qmakevfs.h
main.cpp
meta.cpp meta.h
option.cpp option.h
project.cpp project.h
property.cpp property.h
DEFINES
HAVE_CONFIG_H
PCRE2_DISABLE_JIT
PROEVALUATOR_FULL
QT_BOOTSTRAPPED
QT_BUILD_QMAKE
QT_USE_QSTRINGBUILDER
QT_NO_FOREACH
QT_VERSION_STR="${PROJECT_VERSION}" # special case
QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
QT_VERSION_PATCH=${PROJECT_VERSION_PATCH} # special case
PCRE2_CODE_UNIT_WIDTH=16
PCRE2_DISABLE_JIT
HAVE_CONFIG_H
INCLUDE_DIRECTORIES
# . # special case remove
generators
generators/mac
generators/unix
generators/win32
library
$<TARGET_PROPERTY:Qt::Core,INCLUDE_DIRECTORIES> # special case
"${PROJECT_BINARY_DIR}/src/corelib/global" # special case: for qconfig.cpp
PRECOMPILED_HEADER
"qmake_pch.h"
)
#### Keys ignored in scope 1:.:.:qmake.pro:<TRUE>:
# _OPTION = "host_build"
## Scopes:
#####################################################################
qt_extend_target(${target_name} CONDITION WIN32
SOURCES
../src/corelib/global/qoperatingsystemversion_win.cpp
../src/corelib/io/qfilesystemengine_win.cpp
../src/corelib/io/qfilesystemiterator_win.cpp
../src/corelib/io/qfsfileengine_win.cpp
../src/corelib/io/qsettings_win.cpp
../src/corelib/plugin/qsystemlibrary.cpp
../src/corelib/text/qlocale_win.cpp
library/registry.cpp
DEFINES
UNICODE
_CRT_SECURE_NO_WARNINGS
_ENABLE_EXTENDED_ALIGNED_STORAGE
_SCL_SECURE_NO_WARNINGS
PUBLIC_DEFINES
PCRE2_STATIC
PUBLIC_LIBRARIES
advapi32
kernel32
netapi32
ole32
)
qt_extend_target(${target_name} CONDITION UNIX
SOURCES
../src/corelib/io/qfilesystemengine_unix.cpp
../src/corelib/io/qfilesystemiterator_unix.cpp
../src/corelib/io/qfsfileengine_unix.cpp
../src/corelib/kernel/qcore_unix.cpp
../src/corelib/text/qlocale_unix.cpp
)
qt_extend_target(${target_name} CONDITION MACOS
SOURCES
../src/corelib/kernel/qcore_foundation.mm # special case
../src/corelib/kernel/qcore_mac.mm # special case
../src/corelib/global/qoperatingsystemversion_darwin.mm # special case
../src/corelib/io/qsettings_mac.cpp # special case
PUBLIC_LIBRARIES
${FWApplicationServices}
${FWCoreServices}
${FWFoundation}
COMPILE_OPTIONS
"-fconstant-cfstrings"
)
# special case big
extend_target(qmake CONDITION WIN32
SOURCES
../src/corelib/io/qfilesystemengine_win.cpp
../src/corelib/io/qfilesystemiterator_win.cpp
../src/corelib/io/qfsfileengine_win.cpp
../src/corelib/text/qlocale_win.cpp
../src/corelib/io/qsettings_win.cpp
# ../src/corelib/global/qoperatingsystemversion.cpp special case: remove this
../src/corelib/plugin/qsystemlibrary.cpp
library/registry.cpp
DEFINES
UNICODE _ENABLE_EXTENDED_ALIGNED_STORAGE _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS
LIBRARIES
ole32 advapi32 kernel32 netapi32
)
qt_extend_target(${target_name} CONDITION MINGW AND WIN32
PUBLIC_LIBRARIES
uuid
)
qt_extend_target(${target_name} CONDITION CLANG AND WIN32
COMPILE_OPTIONS
"-fms-compatibility-version=19.00.23506"
"-Wno-microsoft-enum-value"
)
# special case:
set_target_properties(${target_name} PROPERTIES
AUTOMOC OFF
AUTORCC OFF
AUTOUIC OFF
)
qt_internal_apply_gc_binaries(${target_name} PRIVATE) # special case
qt_enable_msvc_cplusplus_define(${target_name} PUBLIC) # special case
qt_skip_warnings_are_errors(${target_name}) # special case
qt_internal_apply_intel_cet(Bootstrap PUBLIC) # special case