2023-12-26 15:30:10 +00:00
|
|
|
project(
|
|
|
|
'pixtool',
|
|
|
|
'cpp',
|
|
|
|
version: '0.0.0',
|
|
|
|
default_options: [
|
|
|
|
'cpp_std=c++17',
|
|
|
|
'warning_level=3'
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set('version', meson.project_version())
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: 'src/conf.in.hpp',
|
|
|
|
output: 'conf.hpp',
|
|
|
|
configuration: conf
|
|
|
|
)
|
|
|
|
|
|
|
|
qt6 = import('qt6')
|
|
|
|
qt6_dep = dependency('qt6', modules: ['Core', 'Widgets'])
|
|
|
|
|
|
|
|
qt_src = qt6.compile_moc(
|
|
|
|
headers: [
|
|
|
|
'src/gui/Window.hpp'
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2023-12-26 19:22:51 +00:00
|
|
|
pixtool = static_library(
|
|
|
|
'pixtool-core',
|
2023-12-26 15:30:10 +00:00
|
|
|
sources: [
|
|
|
|
'src/Presenter.cpp',
|
|
|
|
|
|
|
|
# model
|
2023-12-26 19:22:51 +00:00
|
|
|
'src/model/PixTool.cpp',
|
|
|
|
'src/model/Command.cpp',
|
|
|
|
'src/model/Shortcut.cpp',
|
|
|
|
'src/model/CommandRunner.cpp',
|
|
|
|
'src/model/Observer.cpp',
|
|
|
|
'src/model/Observable.cpp',
|
2023-12-26 15:30:10 +00:00
|
|
|
|
|
|
|
# gui
|
|
|
|
'src/gui/Window.cpp',
|
|
|
|
] + qt_src,
|
|
|
|
dependencies: [
|
2023-12-26 19:22:51 +00:00
|
|
|
qt6_dep,
|
|
|
|
dependency('spdlog')
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
pixtool_dep = declare_dependency(
|
|
|
|
link_with: [pixtool],
|
|
|
|
include_directories: ['src']
|
|
|
|
)
|
|
|
|
|
|
|
|
executable(
|
|
|
|
'pixtool',
|
|
|
|
sources: [
|
|
|
|
'src/main.cpp'
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
pixtool_dep,
|
2023-12-26 15:30:10 +00:00
|
|
|
qt6_dep
|
|
|
|
],
|
|
|
|
install: true
|
|
|
|
)
|
2023-12-26 19:22:51 +00:00
|
|
|
|
|
|
|
executable(
|
|
|
|
'pixtool-tests',
|
|
|
|
sources: [
|
|
|
|
'tests/main.cpp',
|
|
|
|
'tests/CommandRunner.cpp',
|
|
|
|
],
|
|
|
|
dependencies: [
|
|
|
|
dependency('catch2'),
|
|
|
|
pixtool_dep
|
|
|
|
],
|
|
|
|
install: true
|
|
|
|
)
|