diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-15 17:04:27 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-17 12:13:00 +0200 |
commit | b5af1408099dedd132f36e04d19cb5771a23ec28 (patch) | |
tree | 85109c13469dcde91aea87e29ed52c116732fbf8 /src/entrypoint/entrypoint.pro | |
parent | 8ec4fd9cffe7977f6d7cb68ce38de4386a5795d6 (diff) |
Generalize the winmain/qtmain entry-point library
The use-case is relevant for other platforms as well.
Now that Qt has a module system we can also replace a lot of the
hand crafted logic for linking with simpler constructs.
Change-Id: Ib6853aaf81bfea79c31f2de741d65b4b56f23ef6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/entrypoint/entrypoint.pro')
-rw-r--r-- | src/entrypoint/entrypoint.pro | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/entrypoint/entrypoint.pro b/src/entrypoint/entrypoint.pro new file mode 100644 index 0000000000..dd0618cd56 --- /dev/null +++ b/src/entrypoint/entrypoint.pro @@ -0,0 +1,30 @@ +# Additional Qt project file for QtEntryPoint lib +!win32:error("$$_FILE_ is intended only for Windows!") + +TARGET = QtEntryPoint + +CONFIG += static no_module_headers +QT = core + +DEFINES += QT_NO_FOREACH + +win32 { + SOURCES = qtentrypoint_win.cpp + CONFIG -= qt + + QMAKE_USE_PRIVATE += shell32 + + msvc { + QMAKE_CFLAGS_DEBUG -= -Zi + QMAKE_CXXFLAGS_DEBUG -= -Zi + QMAKE_CFLAGS_DEBUG *= -Z7 + QMAKE_CXXFLAGS_DEBUG *= -Z7 + } + mingw { + DEFINES += QT_NEEDS_QMAIN + MODULE_DEFINES += QT_NEEDS_QMAIN + LIBS += -lmingw32 + } +} + +load(qt_module) |