Skip to content

Commit 9a1c8b6

Browse files
committed
Shared - Add podofo Library + Blank Account
1 parent d94ccfc commit 9a1c8b6

File tree

7 files changed

+55
-5
lines changed

7 files changed

+55
-5
lines changed

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: johnwason/vcpkg-action@v5
2828
id: vcpkg
2929
with:
30-
pkgs: libnick
30+
pkgs: libnick podofo
3131
triplet: x64-windows
3232
cache-key: windows-latest
3333
revision: 710677da49b03885c65c8b5ca43072d4b1acde75

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ A C++20 compiler is also required to build Denaro.
3131
1. Set the `VCPKG_ROOT` environment variable to the path of your vcpkg installation's root directory.
3232
### Windows
3333
1. Set the `VCPKG_DEFAULT_TRIPLET` environment variable to `x64-windows`
34-
1. Run `vcpkg install libnick`
34+
1. Run `vcpkg install libnick podofo`
3535
### Linux
3636
1. Set the `VCPKG_DEFAULT_TRIPLET` environment variable to `x64-linux`
37-
1. Run `vcpkg install libnick libxmlpp`
37+
1. Run `vcpkg install libnick libxmlpp podofo`
3838

3939
## Building
4040
1. First, clone/download the repo.

flatpak/org.nickvision.money.json

+15
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@
107107
}
108108
]
109109
},
110+
{
111+
"name": "podofo",
112+
"buildsystem": "cmake-ninja",
113+
"builddir": true,
114+
"config-opts": [
115+
"-DCMAKE_BUILD_TYPE=Release"
116+
],
117+
"sources": [
118+
{
119+
"type": "git",
120+
"url": "https://github.com/podofo/podofo",
121+
"tag": "0.10.3"
122+
}
123+
]
124+
},
110125
{
111126
"name": "org.nickvision.money",
112127
"buildsystem": "cmake-ninja",

libdenaro/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ endif()
55
add_library(libdenaro
66
"src/controllers/mainwindowcontroller.cpp"
77
"src/controllers/preferencesviewcontroller.cpp"
8+
"src/models/account.cpp"
89
"src/models/accountmetadata.cpp"
910
"src/models/color.cpp"
1011
"src/models/configuration.cpp"
@@ -26,7 +27,8 @@ else()
2627
endif()
2728

2829
find_package(libnick CONFIG REQUIRED)
29-
target_link_libraries(libdenaro PUBLIC libnick::libnick)
30+
find_package(podofo CONFIG REQUIRED)
31+
target_link_libraries(libdenaro PUBLIC libnick::libnick $<IF:$<TARGET_EXISTS:podofo_shared>,podofo_shared,podofo_static>)
3032

3133
if(HAS_GETTEXT)
3234
add_custom_command(TARGET libdenaro POST_BUILD COMMAND "${GETTEXT_XGETTEXT_EXECUTABLE}" --from-code=utf-8 --add-comments --c++ --force-po --output="${POT_FILE}" --keyword=_ --keyword=_n:1,2 --keyword=_p:1c,2 --keyword=_pn:1c,2,3 --keyword=C_:1c,2 --width=80 ${TRANSLATE_FILES} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")

libdenaro/include/models/account.h

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef ACCOUNT_H
2+
#define ACCOUNT_H
3+
4+
namespace Nickvision::Money::Shared::Models
5+
{
6+
class Account
7+
{
8+
public:
9+
10+
private:
11+
12+
};
13+
}
14+
15+
#endif //ACCOUNT_H

libdenaro/src/models/account.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "models/account.h"
2+
3+
namespace Nickvision::Money::Shared::Models
4+
{
5+
6+
}

snap/snapcraft.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,20 @@ parts:
7777
prime:
7878
- usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libxml++-5.0*.so*
7979

80+
podofo:
81+
after: [build-deps]
82+
source: https://github.com/podofo/podofo
83+
source-tag: '0.10.3'
84+
source-depth: 1
85+
plugin: cmake
86+
cmake-parameters:
87+
- -DCMAKE_INSTALL_PREFIX=/usr
88+
- -DCMAKE_BUILD_TYPE=Release
89+
build-environment:
90+
- CPLUS_INCLUDE_PATH: ${CRAFT_STAGE}/include
91+
8092
denaro:
81-
after: [build-deps, maddy, libnick, libxmlplusplus]
93+
after: [build-deps, maddy, libnick, libxmlplusplus, podofo]
8294
plugin: cmake
8395
source: https://github.com/NickvisionApps/Denaro.git
8496
source-depth: 1

0 commit comments

Comments
 (0)