Compare commits
2 commits
33f24ab7be
...
10b5cab5a4
Author | SHA1 | Date | |
---|---|---|---|
10b5cab5a4 | |||
e038d82cfc |
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
|
||||||
find_package(Boost 1.62 COMPONENTS date_time REQUIRED)
|
find_package(Boost 1.62 COMPONENTS date_time REQUIRED)
|
||||||
find_package(SQLite3 REQUIRED)
|
find_package(SQLite3 REQUIRED)
|
||||||
|
|
|
@ -16,9 +16,9 @@ Database::Database()
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
fs::path dbpath = fs::path(std::getenv("HOME")) / ".local/share/kima2-cpp";
|
fs::path dbpath = fs::path(std::getenv("HOME")) / ".local/share/kima2";
|
||||||
#elif defined(__WIN64) || defined(__WIN32)
|
#elif defined(__WIN64) || defined(__WIN32)
|
||||||
fs::path dbpath = fs::path(std::getenv("LOCALAPPDATA") / "/kima2-cpp";
|
fs::path dbpath = fs::path(std::getenv("LOCALAPPDATA") / "/kima2";
|
||||||
#else
|
#else
|
||||||
throw std::runtime_error("Platform not supported.");
|
throw std::runtime_error("Platform not supported.");
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@ Database::Database()
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbpath /= "kima2.db";
|
dbpath /= "kima2-cpp.db";
|
||||||
dbname_ = dbpath.string();
|
dbname_ = dbpath.string();
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue