diff --git a/.gitmodules b/.gitmodules index acf8bbe..e9cb36c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "3rdparty/nlohmann_json"] - path = 3rdparty/nlohmann_json + path = subprojects/nlohmann_json url = https://github.com/nlohmann/json.git [submodule "3rdparty/singleapplication"] - path = 3rdparty/singleapplication + path = subprojects/singleapplication/singleapplication.git url = https://github.com/itay-grudev/SingleApplication.git [submodule "3rdparty/csv-parser"] - path = 3rdparty/csv-parser + path = subprojects/csv-parser url = https://github.com/vincentlaucsb/csv-parser.git diff --git a/3rdparty/CMakeLists.txt b/subprojects/CMakeLists.txt similarity index 100% rename from 3rdparty/CMakeLists.txt rename to subprojects/CMakeLists.txt diff --git a/3rdparty/csv-parser b/subprojects/csv-parser similarity index 100% rename from 3rdparty/csv-parser rename to subprojects/csv-parser diff --git a/3rdparty/nlohmann_json b/subprojects/nlohmann_json similarity index 100% rename from 3rdparty/nlohmann_json rename to subprojects/nlohmann_json diff --git a/subprojects/singleapplication/meson.build b/subprojects/singleapplication/meson.build new file mode 100644 index 0000000..1b43463 --- /dev/null +++ b/subprojects/singleapplication/meson.build @@ -0,0 +1,27 @@ +project('singleapplication') + +qt5 = import('qt5') +dep_qt5 = dependency('qt5', modules: ['Core', 'Widgets', 'Network']) + +singleapp_inc = include_directories('singleapplication.git') + +singleapp_moc = qt5.preprocess( + moc_headers: ['singleapplication.git/singleapplication.h', 'singleapplication.git/singleapplication_p.h'], + moc_extra_arguments: ['-DQAPPLICATION_CLASS=QApplication'], + dependencies: dep_qt5 +) + +singleapp_lib = static_library('SingleApplication', + ['singleapplication.git/singleapplication.cpp', 'singleapplication.git/singleapplication_p.cpp', singleapp_moc], + include_directories: singleapp_inc, + cpp_args : '-DQAPPLICATION_CLASS=QApplication', + dependencies: dep_qt5 +) + +singleapp_dep = declare_dependency( + include_directories: singleapp_inc, + link_with: singleapp_lib +) + +# On windows, SingleApplication needs to be linked against advapi32. This is +# done by adding 'advapi32' to cpp_winlibs, where it should be by default. diff --git a/3rdparty/singleapplication b/subprojects/singleapplication/singleapplication.git similarity index 100% rename from 3rdparty/singleapplication rename to subprojects/singleapplication/singleapplication.git