WinMain is cmake specific

This commit is contained in:
Nicolas Werner 2021-12-16 06:49:12 +01:00
parent c856840284
commit 6b49fe257f
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 5 additions and 4 deletions

View file

@ -12,7 +12,7 @@ compiler = meson.get_compiler('cpp')
qt5 = import('qt5')
qt5_modules = ['Core', 'Qml', 'Quick', 'QuickWidgets', 'Widgets', 'Multimedia', 'Svg']
if target_machine.system() == 'windows'
qt5_modules += 'WinMain'
#qt5_modules += 'WinMain'
elif target_machine.system() == 'darwin'
qt5_modules += 'MacExtras'
else
@ -320,8 +320,8 @@ if host_machine.system() == 'darwin'
deps += dependency('UserNotifications', method: 'extraframework')
elif host_machine.system() == 'windows'
sources += ['src/notifications/ManagerWin.cpp']
add_project_arguments('-D_WIN32_WINNT=0x0601', '-DNOMINMAX WIN32_LEAN_AND_MEAN', '-DSTRICT', '/Zc:__cplusplus', language: 'cpp')
deps += dependency('wintoastlib')
add_project_arguments('-DNOMINMAX WIN32_LEAN_AND_MEAN', '-DSTRICT', '/Zc:__cplusplus', language: 'cpp')
deps += dependency('wintoast')
else
sources += ['src/notifications/ManagerLinux.cpp']
endif
@ -334,6 +334,7 @@ executable('nheko',
cpp_args: '-DQAPPLICATION_CLASS=QApplication',
include_directories: inc,
dependencies : deps,
win_subsystem: 'windows,6.1',
install: true)
if target_machine.system() != 'windows' and target_machine.system() != 'darwin'

View file

@ -14,7 +14,7 @@ install_headers(
inc = include_directories('src')
wintoastlib = library(
'wintoast',
'wintoastlib.cpp',
'src/wintoastlib.cpp',
include_directories: inc,
)