diff --git a/make.bat b/make.bat index 61919a7a..4751dea5 100644 --- a/make.bat +++ b/make.bat @@ -3,7 +3,7 @@ SET "BUILDDIR=build_%PLATFORM%" ECHO Preparing directory CD src -meson --buildtype=release ..\%BUILDDIR% +meson --buildtype=release %* ..\%BUILDDIR% CD ..\%BUILDDIR% ninja -j4 if %ERRORLEVEL% NEQ 0 ( diff --git a/scripts/meson_parse_qmake.py b/scripts/meson_parse_qmake.py old mode 100644 new mode 100755 diff --git a/src/meson.build b/src/meson.build index 1ea062ea..63223603 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,7 +8,12 @@ project('iaito', 'cpp', # 'optimization=3', # 'buildtype=debugoptimized']) -qt5_mod = import('qt5') +if get_option('with_qt6') + qt_mod = import('qt6') +else + qt_mod = import('qt5') +endif + py3_exe = import('python').find_installation('python3') qt_modules = [] @@ -106,9 +111,14 @@ else default_options : ['enable_tests=false']) endif -qt5dep = dependency('qt5', modules: qt_modules, main: true) +if get_option('with_qt6') + qt_modules += 'SvgWidgets' + qtdep = dependency('qt6', modules: qt_modules, main: true) +else + qtdep = dependency('qt5', modules: qt_modules, main: true) +endif -deps = [r_core, qt5dep] +deps = [r_core, qtdep] # if get_option('enable_python') # py3_dep = dependency('python3') # deps += [py3_dep] @@ -139,7 +149,7 @@ deps = [r_core, qt5dep] # endif # endif -moc_files = qt5_mod.preprocess( +moc_files = qt_mod.preprocess( moc_headers: headers, ui_files: ui_files, qresources: qresources, diff --git a/src/meson_options.txt b/src/meson_options.txt index 1426e629..77afcbf2 100644 --- a/src/meson_options.txt +++ b/src/meson_options.txt @@ -1,3 +1,4 @@ # both options are deprecated # option('enable_python', type: 'boolean', value: false) # option('enable_python_bindings', type: 'boolean', value: false) +option('with_qt6', type: 'boolean', value: false) \ No newline at end of file