Replace libxdg-basedir with Poco::Path.
This commit is contained in:
parent
85b112faf0
commit
d74b3cabfa
|
@ -57,9 +57,7 @@ only.
|
|||
* C++ compiler (tested: https://gcc.gnu.org/[gcc] 5/6/8/9,
|
||||
https://llvm.org/[clang] 3/7)
|
||||
* https://cmake.org/[cmake] (at least: 3.2)
|
||||
* https://pkgconfig.freedesktop.org/wiki/[pkgconfig] (tested: 0.29)
|
||||
* https://github.com/badaix/popl[popl] (tested: 1.2)
|
||||
* http://repo.or.cz/w/libxdg-basedir.git[libxdg-basedir] (tested: 1.2)
|
||||
* https://pocoproject.org/[POCO] (tested: 1.9 / 1.7)
|
||||
* http://vsqlite.virtuosic-bytes.com/[vsqlite++] (tested: 0.3)
|
||||
* http://www.icu-project.org/[ICU] (tested: 64.2 / 57.1)
|
||||
|
@ -74,8 +72,7 @@ only.
|
|||
[source,zsh]
|
||||
----
|
||||
apt-get update
|
||||
apt-get install g++-6 cmake pkg-config libpoco-dev libxdg-basedir-dev \
|
||||
libvsqlitepp-dev libboost-system-dev libboost-filesystem-dev libicu-dev asciidoc
|
||||
apt-get install g++-6 cmake libpoco-dev libvsqlitepp-dev libicu-dev asciidoc
|
||||
# Inside the source directory:
|
||||
wget -O src/cli/popl.hpp https://raw.githubusercontent.com/badaix/popl/v1.2.0/include/popl.hpp
|
||||
export CXX="g++-6"
|
||||
|
|
|
@ -45,7 +45,7 @@ if (WITH_RPM)
|
|||
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3")
|
||||
set(CPACK_RPM_PACKAGE_URL "https://schlomp.space/tastytea/${PROJECT_NAME}")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES
|
||||
"poco-netssl >= 1.6.1, libxdg-basedir, vsqlite++ >= 0.3.13, libicu-devel")
|
||||
"poco-netssl >= 1.6, vsqlite++ >= 0.3, libicu >= 50.1")
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_PACKAGE_ARCHITECTURE}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
|
|
|
@ -9,5 +9,5 @@ Description: @PROJECT_DESCRIPTION@
|
|||
Version: @PROJECT_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -l${name} -lvsqlitepp -lstdc++fs
|
||||
Requires.private: libxdg-basedir, icu-uc, icu-i18n
|
||||
Libs.private: -lPocoNet -lPocoNetSSL -lPocoUtil
|
||||
Requires.private: icu-uc, icu-i18n
|
||||
Libs.private: -lPocoFoundation -lPocoNet -lPocoNetSSL
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
include(GNUInstallDirs)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(libxdg-basedir REQUIRED IMPORTED_TARGET libxdg-basedir)
|
||||
find_package(ICU COMPONENTS uc i18n REQUIRED)
|
||||
# Some distributions do not contain Poco*Config.cmake recipes.
|
||||
find_package(Poco COMPONENTS Foundation Net NetSSL CONFIG)
|
||||
|
@ -23,7 +21,7 @@ target_include_directories(${PROJECT_NAME}
|
|||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE PkgConfig::libxdg-basedir ICU::uc ICU::i18n
|
||||
PRIVATE ICU::uc ICU::i18n
|
||||
PUBLIC vsqlitepp stdc++fs)
|
||||
|
||||
# If no Poco*Config.cmake recipes are found, look for headers in standard dirs.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <basedir.h>
|
||||
#include <Poco/Path.h>
|
||||
#include <sqlite/execute.hpp>
|
||||
#include <sqlite/query.hpp>
|
||||
#include "time.hpp"
|
||||
|
@ -33,10 +33,7 @@ namespace remwharead
|
|||
{
|
||||
try
|
||||
{
|
||||
xdgHandle xdg;
|
||||
xdgInitHandle(&xdg);
|
||||
_dbpath = xdgDataHome(&xdg) / fs::path("remwharead");
|
||||
xdgWipeHandle(&xdg);
|
||||
_dbpath = Poco::Path::dataHome() / fs::path("remwharead");
|
||||
|
||||
if (!fs::exists(_dbpath))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue