Move memory card stuff to a separate lib.
This commit is contained in:
parent
3536487cc5
commit
d7d1ca4a24
15 changed files with 41 additions and 21 deletions
|
@ -1,3 +1,11 @@
|
|||
project('memoserv', 'cpp', default_options:['debug=true', 'cpp_std=c++17', 'b_ndebug=if-release'])
|
||||
|
||||
is_debug_build = 0
|
||||
if get_option('buildtype').startswith('debug')
|
||||
is_debug_build = 1
|
||||
endif
|
||||
|
||||
memcard_proj = subproject('memcard')
|
||||
memcard_dep = memcard_proj.get_variable('memcard_dep')
|
||||
|
||||
subdir('src/gui')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "memorycard.hpp"
|
||||
#include "memcard/memorycard.hpp"
|
||||
#include "widget/block_grid.hpp"
|
||||
#include "make_nana_animation.hpp"
|
||||
#include <nana/gui.hpp>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "make_nana_animation.hpp"
|
||||
#include "block.hpp"
|
||||
#include "icon_fetch.hpp"
|
||||
#include "memcard/block.hpp"
|
||||
#include "memcard/icon_fetch.hpp"
|
||||
|
||||
namespace duck {
|
||||
AnimationWithSize make_nana_animation (const ConstBlock& block, int width, int height, int fps) {
|
||||
|
|
|
@ -21,18 +21,9 @@ libxft_dep = dependency('xft')
|
|||
libfontconfig_dep = dependency('fontconfig')
|
||||
libthread_dep = dependency('threads')
|
||||
|
||||
is_debug_build = 0
|
||||
if get_option('buildtype').startswith('debug')
|
||||
is_debug_build = 1
|
||||
endif
|
||||
|
||||
executable('gui',
|
||||
'main.cpp',
|
||||
'memorycard.cpp',
|
||||
'block.cpp',
|
||||
'icon_fetch.cpp',
|
||||
'widget/block_grid.cpp',
|
||||
'resize_harris.cpp',
|
||||
'make_nana_animation.cpp',
|
||||
'animation_with_size.cpp',
|
||||
dependencies: [
|
||||
|
@ -43,6 +34,7 @@ executable('gui',
|
|||
libxft_dep,
|
||||
libfontconfig_dep,
|
||||
libthread_dep,
|
||||
memcard_dep,
|
||||
],
|
||||
install: true,
|
||||
include_directories: [private_incl] + nana_incl_search,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "widget/block_grid.hpp"
|
||||
#include "memorycard.hpp"
|
||||
#include "block.hpp"
|
||||
#include "icon_fetch.hpp"
|
||||
#include "memcard/memorycard.hpp"
|
||||
#include "memcard/block.hpp"
|
||||
#include "memcard/icon_fetch.hpp"
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <nana/gui/detail/widget_content_measurer_interface.hpp>
|
||||
|
|
1
src/meson.build
Normal file
1
src/meson.build
Normal file
|
@ -0,0 +1 @@
|
|||
subdir('gui')
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "block.hpp"
|
||||
#include "memcard/block.hpp"
|
||||
#include <vector>
|
||||
|
||||
std::vector<std::vector<char>> icon_fetch (const ConstBlock& block, int width, int height);
|
19
subprojects/memcard/meson.build
Normal file
19
subprojects/memcard/meson.build
Normal file
|
@ -0,0 +1,19 @@
|
|||
project('memcard', 'cpp', default_options:['debug=true', 'cpp_std=c++17', 'b_ndebug=if-release'])
|
||||
add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
|
||||
|
||||
private_incl = include_directories('src')
|
||||
library_incl = include_directories('include')
|
||||
|
||||
memcard = shared_library('memcard',
|
||||
'src/memorycard.cpp',
|
||||
'src/block.cpp',
|
||||
'src/icon_fetch.cpp',
|
||||
'src/resize_harris.cpp',
|
||||
install: true,
|
||||
include_directories: [private_incl, library_incl],
|
||||
)
|
||||
|
||||
memcard_dep = declare_dependency(
|
||||
include_directories: library_incl,
|
||||
link_with: memcard
|
||||
)
|
|
@ -1,5 +1,5 @@
|
|||
#include "block.hpp"
|
||||
#include "memorycard.hpp"
|
||||
#include "memcard/block.hpp"
|
||||
#include "memcard/memorycard.hpp"
|
||||
#include <cassert>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
|
@ -1,4 +1,4 @@
|
|||
#include "icon_fetch.hpp"
|
||||
#include "memcard/icon_fetch.hpp"
|
||||
#include "resize_harris.hpp"
|
||||
#include <cstdint>
|
||||
#include <cassert>
|
|
@ -1,5 +1,5 @@
|
|||
#include "memorycard.hpp"
|
||||
#include "block.hpp"
|
||||
#include "memcard/memorycard.hpp"
|
||||
#include "memcard/block.hpp"
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <cassert>
|
Loading…
Add table
Reference in a new issue