From 97cd3e988dfe286262e619a97d37754925244886 Mon Sep 17 00:00:00 2001 From: Vlad Vesa Date: Thu, 23 Feb 2023 17:17:51 +0200 Subject: [PATCH] make use of pkg for modeling external dependencies --- .gitignore | 2 ++ .gitmodules | 6 ------ .pkg | 9 +++++++++ CMakeLists.txt | 1 + src/CMakeLists.txt | 1 - src/cppgtfs | 1 - src/pfaedle/CMakeLists.txt | 3 ++- src/pfaedle/gtfs/Writer.cpp | 2 +- src/pfaedle/osm/OsmBuilder.cpp | 2 +- src/pfaedle/osm/OsmBuilder.h | 2 +- src/xml | 1 - 11 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 .pkg delete mode 160000 src/cppgtfs delete mode 160000 src/xml diff --git a/.gitignore b/.gitignore index 880d38c..bfd91c5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ compile_commands.json [._]s[a-w][a-z] *.cppr *.hr +cmake-build-debug +deps diff --git a/.gitmodules b/.gitmodules index 0b9e413..39fc129 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "src/cppgtfs"] - path = src/cppgtfs - url = https://github.com/ad-freiburg/cppgtfs.git -[submodule "src/xml"] - path = src/xml - url = https://github.com/patrickbr/pfxml.git [submodule "src/configparser"] path = src/configparser url = https://git.patrickbrosi.de/patrick/configparser diff --git a/.pkg b/.pkg new file mode 100644 index 0000000..02784c0 --- /dev/null +++ b/.pkg @@ -0,0 +1,9 @@ +[cppgtfs] + url=git@github.com:vesavlad/cppgtfs.git + branch=add-propper-cmake-project-definition + commit=69dcdbf392b30777dbfc943c6ca512f33df8eac6 + +[pfxml] + url=git@github.com:patrickbr/pfxml.git + branch=master + commit=c7202d1435b6a4d460fc38b59ca131620b204c4f diff --git a/CMakeLists.txt b/CMakeLists.txt index ce5e3e7..de4c1a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required (VERSION 2.8) project (pfaedle) +include(cmake/pkg.cmake) if (CMAKE_BUILD_TYPE) string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fbf3449..13c1a4d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,5 @@ include_directories( add_subdirectory(util) add_subdirectory(pfaedle) -add_subdirectory(cppgtfs) add_subdirectory(configparser) add_subdirectory(shapevl) diff --git a/src/cppgtfs b/src/cppgtfs deleted file mode 160000 index 192272f..0000000 --- a/src/cppgtfs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 192272f4ab542e75ffad9b545be5cc68e5599828 diff --git a/src/pfaedle/CMakeLists.txt b/src/pfaedle/CMakeLists.txt index e36ccf1..82acc1d 100644 --- a/src/pfaedle/CMakeLists.txt +++ b/src/pfaedle/CMakeLists.txt @@ -17,8 +17,9 @@ configure_file ( add_executable(pfaedle ${pfaedle_main}) add_library(pfaedle_dep ${pfaedle_SRC}) +target_link_libraries(pfaedle_dep PRIVATE ad_cppgtfs pfxml) include_directories(pfaedle_dep PUBLIC ${PROJECT_SOURCE_DIR}/src/cppgtfs/src) -target_link_libraries(pfaedle pfaedle_dep util configparser ad_cppgtfs -lpthread ${LIBZIP_LIBRARY}) +target_link_libraries(pfaedle pfaedle_dep util configparser -lpthread ${LIBZIP_LIBRARY}) add_subdirectory(tests) diff --git a/src/pfaedle/gtfs/Writer.cpp b/src/pfaedle/gtfs/Writer.cpp index 0380fc1..6c38729 100644 --- a/src/pfaedle/gtfs/Writer.cpp +++ b/src/pfaedle/gtfs/Writer.cpp @@ -18,7 +18,7 @@ #include "ad/cppgtfs/Parser.h" #include "ad/cppgtfs/Writer.h" #include "ad/cppgtfs/gtfs/flat/Agency.h" -#include "ad/util/CsvWriter.h" +#include "ad/cppgtfs/util/CsvWriter.h" #include "pfaedle/gtfs/Writer.h" using ad::cppgtfs::Parser; diff --git a/src/pfaedle/osm/OsmBuilder.cpp b/src/pfaedle/osm/OsmBuilder.cpp index 425e283..d385412 100644 --- a/src/pfaedle/osm/OsmBuilder.cpp +++ b/src/pfaedle/osm/OsmBuilder.cpp @@ -24,7 +24,7 @@ #include "util/Misc.h" #include "util/Nullable.h" #include "util/log/Log.h" -#include "xml/pfxml.h" +#include "pfxml/pfxml.h" using ad::cppgtfs::gtfs::Stop; using pfaedle::osm::BlockSearch; diff --git a/src/pfaedle/osm/OsmBuilder.h b/src/pfaedle/osm/OsmBuilder.h index 9cf1505..73b8e9e 100644 --- a/src/pfaedle/osm/OsmBuilder.h +++ b/src/pfaedle/osm/OsmBuilder.h @@ -25,7 +25,7 @@ #include "util/Nullable.h" #include "util/geo/Geo.h" #include "util/xml/XmlWriter.h" -#include "xml/pfxml.h" +#include "pfxml/pfxml.h" namespace pfaedle { namespace osm { diff --git a/src/xml b/src/xml deleted file mode 160000 index ee92108..0000000 --- a/src/xml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ee9210828b1d1f81fb9ff9f3b7da87327c3390e6