diff options
author | Cristian Adam <cristian.adam@qt.io> | 2019-06-05 15:20:21 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-05 14:06:09 +0000 |
commit | 9298033ed6e6e67cce89243f44b7ce77018d0e62 (patch) | |
tree | 87981660610c5541a11f6435ceaf05f4da6c75c5 /src | |
parent | 016351d267d60d737cc472dad51e96797a10f692 (diff) |
CMake: Add WinMain support
Change-Id: I85c56555bc47dcf348daeb3435c621529aa2d381
Fixes: QTBUG-75195
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/winmain/.prev_CMakeLists.txt | 48 | ||||
-rw-r--r-- | src/winmain/CMakeLists.txt | 28 |
3 files changed, 78 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1bc66bee9d..3a3e358c73 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,3 +54,5 @@ if(QT_FEATURE_gui AND QT_FEATURE_widgets) add_subdirectory(printsupport) endif() add_subdirectory(plugins) + +add_subdirectory(winmain) diff --git a/src/winmain/.prev_CMakeLists.txt b/src/winmain/.prev_CMakeLists.txt new file mode 100644 index 0000000000..a6077dd467 --- /dev/null +++ b/src/winmain/.prev_CMakeLists.txt @@ -0,0 +1,48 @@ +# Generated from winmain.pro. + +##################################################################### +## qtLibraryTarget$$TARGET$$QT_LIBINFIX Module: +##################################################################### + +add_qt_module(qtLibraryTarget$$TARGET$$QT_LIBINFIX + STATIC + DEFINES + QT_NO_FOREACH + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:winmain.pro:<TRUE>: +# CONFIG = "static" +# DESTDIR = "$$QT.core.libs" +# TEMPLATE = "lib" +# _LOADED = "qt_installs" "qt_targets" "qt_build_paths" "qt_common" + +## Scopes: +##################################################################### + +#### Keys ignored in scope 3:.:.:winmain.pro:QT_FEATURE_debug_and_release: +# CONFIG = "build_all" + +#### Keys ignored in scope 4:.:.:winmain.pro:MSVC: +# QMAKE_CFLAGS_DEBUG = "--Zi" "-Z7" + +extend_target(qtLibraryTarget$$TARGET$$QT_LIBINFIX CONDITION mingw + DEFINES + QT_NEEDS_QMAIN +) + +extend_target(qtLibraryTarget$$TARGET$$QT_LIBINFIX CONDITION WINRT + SOURCES + qtmain_winrt.cpp +) + +extend_target(qtLibraryTarget$$TARGET$$QT_LIBINFIX CONDITION NOT WINRT + SOURCES + qtmain_win.cpp + LIBRARIES + shell32 +) + +#### Keys ignored in scope 10:.:.:winmain.pro:else: +# CONFIG = "-qt" diff --git a/src/winmain/CMakeLists.txt b/src/winmain/CMakeLists.txt new file mode 100644 index 0000000000..10c3252f43 --- /dev/null +++ b/src/winmain/CMakeLists.txt @@ -0,0 +1,28 @@ +# special case begin +if (NOT WIN32) + return() +endif() + +add_qt_module(WinMain + STATIC + NO_MODULE_HEADERS + DEFINES + QT_NO_FOREACH + INCLUDE_DIRECTORIES + $<TARGET_PROPERTY:Qt::Core,INTERFACE_INCLUDE_DIRECTORIES> +) + +extend_target(WinMain CONDITION WINRT + SOURCES qtmain_winrt.cpp +) + +extend_target(WinMain CONDITION NOT WINRT + SOURCES qtmain_win.cpp +) + +extend_target(WinMain CONDITION MINGW + DEFINES QT_NEEDS_QMAIN +) + +extend_target(Core LIBRARIES WinMain) +# special case end |