suckel
This commit is contained in:
parent
2825007345
commit
996ca1122d
10 changed files with 562 additions and 253 deletions
84
meson.build
84
meson.build
|
@ -4,8 +4,8 @@
|
|||
project(
|
||||
'draconis++',
|
||||
'cpp',
|
||||
version : '0.1.0',
|
||||
default_options : [
|
||||
version: '0.1.0',
|
||||
default_options: [
|
||||
'default_library=static',
|
||||
'buildtype=debugoptimized',
|
||||
'b_vscrt=mt',
|
||||
|
@ -35,35 +35,34 @@ common_warning_flags = [
|
|||
]
|
||||
|
||||
common_cpp_flags = {
|
||||
'common' : [
|
||||
'common': [
|
||||
'-fno-strict-enums',
|
||||
'-fvisibility=hidden',
|
||||
'-fvisibility-inlines-hidden',
|
||||
'-std=c++26',
|
||||
],
|
||||
'msvc' : [
|
||||
'-DNOMINMAX',
|
||||
'/MT',
|
||||
'msvc': [
|
||||
'-DNOMINMAX', '/MT',
|
||||
'/Zc:__cplusplus',
|
||||
'/Zc:preprocessor',
|
||||
'/external:W0',
|
||||
'/external:anglebrackets',
|
||||
'/std:c++latest',
|
||||
],
|
||||
'unix_extra' : '-march=native',
|
||||
'windows_extra' : '-DCURL_STATICLIB',
|
||||
'unix_extra': '-march=native',
|
||||
'windows_extra': '-DCURL_STATICLIB',
|
||||
}
|
||||
|
||||
# Configure Objective-C++ for macOS
|
||||
if host_system == 'darwin'
|
||||
add_languages('objcpp', native : false)
|
||||
add_languages('objcpp', native: false)
|
||||
objcpp = meson.get_compiler('objcpp')
|
||||
objcpp_flags = common_warning_flags + [
|
||||
'-std=c++26',
|
||||
'-fvisibility=hidden',
|
||||
'-fvisibility-inlines-hidden',
|
||||
]
|
||||
add_project_arguments(objcpp.get_supported_arguments(objcpp_flags), language : 'objcpp')
|
||||
add_project_arguments(objcpp.get_supported_arguments(objcpp_flags), language: 'objcpp')
|
||||
endif
|
||||
|
||||
# Apply C++ compiler arguments
|
||||
|
@ -81,29 +80,29 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
add_project_arguments(common_cpp_args, language : 'cpp')
|
||||
add_project_arguments(common_cpp_args, language: 'cpp')
|
||||
|
||||
# ------- #
|
||||
# Files #
|
||||
# ------- #
|
||||
base_sources = files(
|
||||
'src/core/system_data.cpp',
|
||||
'src/core/package.cpp',
|
||||
'src/config/config.cpp',
|
||||
'src/config/weather.cpp',
|
||||
'src/ui/ui.cpp',
|
||||
'src/core/package.cpp',
|
||||
'src/core/system_data.cpp',
|
||||
'src/main.cpp',
|
||||
'src/ui/ui.cpp',
|
||||
)
|
||||
|
||||
platform_sources = {
|
||||
'darwin' : ['src/os/macos.cpp', 'src/os/macos/bridge.mm'],
|
||||
'dragonfly' : ['src/os/bsd.cpp'],
|
||||
'freebsd' : ['src/os/bsd.cpp'],
|
||||
'haiku' : ['src/os/haiku.cpp'],
|
||||
'linux' : ['src/os/linux.cpp'],
|
||||
'netbsd' : ['src/os/bsd.cpp'],
|
||||
'serenity' : ['src/os/serenity.cpp'],
|
||||
'windows' : ['src/os/windows.cpp'],
|
||||
'darwin': ['src/os/macos.cpp', 'src/os/macos/bridge.mm'],
|
||||
'dragonfly': ['src/os/bsd.cpp'],
|
||||
'freebsd': ['src/os/bsd.cpp'],
|
||||
'haiku': ['src/os/haiku.cpp'],
|
||||
'linux': ['src/os/linux.cpp'],
|
||||
'netbsd': ['src/os/bsd.cpp'],
|
||||
'serenity': ['src/os/serenity.cpp'],
|
||||
'windows': ['src/os/windows.cpp'],
|
||||
}
|
||||
|
||||
sources = base_sources + files(platform_sources.get(host_system, []))
|
||||
|
@ -112,9 +111,9 @@ sources = base_sources + files(platform_sources.get(host_system, []))
|
|||
# Dependencies Config #
|
||||
# --------------------- #
|
||||
common_deps = [
|
||||
dependency('libcurl', include_type : 'system', static : true),
|
||||
dependency('tomlplusplus', include_type : 'system', static : true),
|
||||
dependency('openssl', include_type : 'system', static : true, required : false),
|
||||
dependency('libcurl', include_type: 'system', static: true),
|
||||
dependency('tomlplusplus', include_type: 'system', static: true),
|
||||
dependency('openssl', include_type: 'system', static: true, required: false),
|
||||
]
|
||||
|
||||
# Platform-specific dependencies
|
||||
|
@ -125,8 +124,8 @@ if host_system == 'darwin'
|
|||
dependency('SQLiteCpp'),
|
||||
dependency(
|
||||
'appleframeworks',
|
||||
modules : ['foundation', 'mediaplayer', 'systemconfiguration'],
|
||||
static : true,
|
||||
modules: ['foundation', 'mediaplayer', 'systemconfiguration'],
|
||||
static: true,
|
||||
),
|
||||
dependency('iconv'),
|
||||
]
|
||||
|
@ -138,6 +137,7 @@ elif host_system == 'windows'
|
|||
elif host_system != 'serenity'
|
||||
platform_deps += [
|
||||
dependency('SQLiteCpp'),
|
||||
dependency('pugixml'),
|
||||
dependency('xcb'),
|
||||
dependency('xau'),
|
||||
dependency('xdmcp'),
|
||||
|
@ -150,28 +150,28 @@ endif
|
|||
ftxui_components = ['ftxui::screen', 'ftxui::dom', 'ftxui::component']
|
||||
ftxui_dep = dependency(
|
||||
'ftxui',
|
||||
modules : ftxui_components,
|
||||
include_type : 'system',
|
||||
static : true,
|
||||
required : false,
|
||||
modules: ftxui_components,
|
||||
include_type: 'system',
|
||||
static: true,
|
||||
required: false,
|
||||
)
|
||||
|
||||
if not ftxui_dep.found()
|
||||
ftxui_dep = declare_dependency(
|
||||
dependencies : [
|
||||
dependency('ftxui-dom', fallback : ['ftxui', 'dom_dep']),
|
||||
dependency('ftxui-screen', fallback : ['ftxui', 'screen_dep']),
|
||||
dependency('ftxui-component', fallback : ['ftxui', 'component_dep']),
|
||||
dependencies: [
|
||||
dependency('ftxui-dom', fallback: ['ftxui', 'dom_dep']),
|
||||
dependency('ftxui-screen', fallback: ['ftxui', 'screen_dep']),
|
||||
dependency('ftxui-component', fallback: ['ftxui', 'component_dep']),
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
glaze_dep = dependency('glaze', include_type : 'system', required : false)
|
||||
glaze_dep = dependency('glaze', include_type: 'system', required: false)
|
||||
|
||||
if not glaze_dep.found()
|
||||
cmake = import('cmake')
|
||||
glaze_proj = cmake.subproject('glaze')
|
||||
glaze_dep = glaze_proj.dependency('glaze_glaze', include_type : 'system')
|
||||
glaze_dep = glaze_proj.dependency('glaze_glaze', include_type: 'system')
|
||||
endif
|
||||
|
||||
# Combine all dependencies
|
||||
|
@ -197,8 +197,8 @@ endif
|
|||
executable(
|
||||
'draconis++',
|
||||
sources,
|
||||
objc_args : objc_args,
|
||||
link_args : link_args,
|
||||
dependencies : deps,
|
||||
install : true,
|
||||
)
|
||||
objc_args: objc_args,
|
||||
link_args: link_args,
|
||||
dependencies: deps,
|
||||
install: true,
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue