diff options
author | Adam Szmigin <smidge@xsco.net> | 2020-08-09 23:33:00 +0100 |
---|---|---|
committer | Adam Szmigin <smidge@xsco.net> | 2020-08-09 23:33:00 +0100 |
commit | 1814f491cfc68cc00215fecbb990ace3dc0390e7 (patch) | |
tree | 0590b318fa6210ea6bce2701ca10de8b4257f566 | |
parent | 060ea2e15f373e3040e9272bb8397cb7d312b1e7 (diff) |
Move sqlite_modern_cpp to dedicated dir
The `ext/` directory structure is intended for any external dependencies
that are stored in the source tree.
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp.h (renamed from src/sqlite_modern_cpp.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/errors.h (renamed from src/sqlite_modern_cpp/errors.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/lists/error_codes.h (renamed from src/sqlite_modern_cpp/lists/error_codes.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/log.h (renamed from src/sqlite_modern_cpp/log.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/sqlcipher.h (renamed from src/sqlite_modern_cpp/sqlcipher.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/function_traits.h (renamed from src/sqlite_modern_cpp/utility/function_traits.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/uncaught_exceptions.h (renamed from src/sqlite_modern_cpp/utility/uncaught_exceptions.h) | 0 | ||||
-rw-r--r-- | ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/variant.h (renamed from src/sqlite_modern_cpp/utility/variant.h) | 0 | ||||
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/djinterop/enginelibrary/el_storage.cpp | 1 | ||||
-rw-r--r-- | src/meson.build | 2 | ||||
-rw-r--r-- | test/enginelibrary/performance_data_test.cpp | 2 | ||||
-rw-r--r-- | test/meson.build | 2 |
13 files changed, 7 insertions, 4 deletions
diff --git a/src/sqlite_modern_cpp.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp.h index b493aaa..b493aaa 100644 --- a/src/sqlite_modern_cpp.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp.h diff --git a/src/sqlite_modern_cpp/errors.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/errors.h index 60faaec..60faaec 100644 --- a/src/sqlite_modern_cpp/errors.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/errors.h diff --git a/src/sqlite_modern_cpp/lists/error_codes.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/lists/error_codes.h index 5b3d271..5b3d271 100644 --- a/src/sqlite_modern_cpp/lists/error_codes.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/lists/error_codes.h diff --git a/src/sqlite_modern_cpp/log.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/log.h index a8f7be2..a8f7be2 100644 --- a/src/sqlite_modern_cpp/log.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/log.h diff --git a/src/sqlite_modern_cpp/sqlcipher.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/sqlcipher.h index da0f018..da0f018 100644 --- a/src/sqlite_modern_cpp/sqlcipher.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/sqlcipher.h diff --git a/src/sqlite_modern_cpp/utility/function_traits.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/function_traits.h index cd8fab0..cd8fab0 100644 --- a/src/sqlite_modern_cpp/utility/function_traits.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/function_traits.h diff --git a/src/sqlite_modern_cpp/utility/uncaught_exceptions.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/uncaught_exceptions.h index 17d6326..17d6326 100644 --- a/src/sqlite_modern_cpp/utility/uncaught_exceptions.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/uncaught_exceptions.h diff --git a/src/sqlite_modern_cpp/utility/variant.h b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/variant.h index 11a8429..11a8429 100644 --- a/src/sqlite_modern_cpp/utility/variant.h +++ b/ext/sqlite_modern_cpp/sqlite_modern_cpp/utility/variant.h diff --git a/meson.build b/meson.build index 95cb216..e34ffcb 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,10 @@ thread_dep = dependency('threads') sqlite3_dep = dependency('sqlite3', version: '>=3.11.0', fallback: ['sqlite', 'sqlite_dep']) zlib_dep = dependency('zlib', version: '>=1.2.8', fallback: ['zlib', 'zlib_dep']) +sqlite_modern_cpp_dep = declare_dependency( + dependencies: [sqlite3_dep], + include_directories: 'ext/sqlite_modern_cpp') + inc = include_directories('include') subdir('include') diff --git a/src/djinterop/enginelibrary/el_storage.cpp b/src/djinterop/enginelibrary/el_storage.cpp index a7e08d9..dff4639 100644 --- a/src/djinterop/enginelibrary/el_storage.cpp +++ b/src/djinterop/enginelibrary/el_storage.cpp @@ -25,6 +25,7 @@ namespace enginelibrary el_storage::el_storage(std::string directory) : directory{directory}, db{":memory:"} { + // TODO (mr-smidge): Throw custom database_not_found if files don't exist. // TODO (haslersn): Should we check that directory is an absolute path? db << "ATTACH ? as 'music'" << (directory + "/m.db"); db << "ATTACH ? as 'perfdata'" << (directory + "/p.db"); diff --git a/src/meson.build b/src/meson.build index 0c07d6b..424736e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,7 +22,7 @@ sources = [ ] # Dependencies required by the main library. -core_deps = [thread_dep, dl_dep, sqlite3_dep, zlib_dep] +core_deps = [thread_dep, dl_dep, sqlite3_dep, zlib_dep, sqlite_modern_cpp_dep] # Used by unit tests to reference internal classes. internal_inc = include_directories('.') diff --git a/test/enginelibrary/performance_data_test.cpp b/test/enginelibrary/performance_data_test.cpp index ff23272..c59a8ec 100644 --- a/test/enginelibrary/performance_data_test.cpp +++ b/test/enginelibrary/performance_data_test.cpp @@ -30,8 +30,6 @@ #include <djinterop/enginelibrary.hpp> #include <djinterop/track.hpp> -#include "sqlite_modern_cpp.h" - #define STRINGIFY(x) STRINGIFY_(x) #define STRINGIFY_(x) #x diff --git a/test/meson.build b/test/meson.build index 98bb185..8280a20 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,7 +1,7 @@ boost_test_dep = dependency('boost', modules : ['system', 'filesystem']) # Dependencies required by all unit test executables. -test_deps = [boost_test_dep, sqlite3_dep] +test_deps = [boost_test_dep, sqlite3_dep, sqlite_modern_cpp_dep] engine_library_test_names = [ 'crate_test', |