diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 65a5706..0000000 --- a/.gitmodules +++ /dev/null @@ -1,10 +0,0 @@ - -[submodule "lib/json"] - path = lib/json - url = https://github.com/nlohmann/json.git -[submodule "lib/catch2"] - path = lib/catch2 - url = https://github.com/catchorg/Catch2.git -[submodule "lib/mdlp"] - path = lib/mdlp - url = https://github.com/rmontanana/mdlp diff --git a/CMakeLists.txt b/CMakeLists.txt index f48212b..5be85b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,8 @@ endif() find_package(Python3 3.11 COMPONENTS Interpreter Development REQUIRED) message("Python3_LIBRARIES=${Python3_LIBRARIES}") +find_package(nlohmann_json CONFIG REQUIRED) + # CMakes modules # -------------- set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) @@ -64,9 +66,11 @@ endif (ENABLE_CLANG_TIDY) # External libraries - dependencies of PyClassifiers # -------------------------------------------------- -find_library(BayesNet NAMES libBayesNet BayesNet libBayesNet.a PATHS ${PyClassifiers_SOURCE_DIR}/../lib/lib REQUIRED) -find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${PyClassifiers_SOURCE_DIR}/../lib/include) -message(STATUS "BayesNet=${BayesNet}") +# find_library(BayesNet NAMES libBayesNet BayesNet libBayesNet.a PATHS ${PyClassifiers_SOURCE_DIR}/../lib/lib REQUIRED) +# find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${PyClassifiers_SOURCE_DIR}/../lib/include) +find_library(bayesnet NAMES libbayesnet bayesnet libbayesnet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED) +find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include) +message(STATUS "BayesNet=${bayesnet}") message(STATUS "Bayesnet_INCLUDE_DIRS=${Bayesnet_INCLUDE_DIRS}") diff --git a/Makefile b/Makefile index def64c8..61959f1 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ release: ## Build a Release version of the project @echo ">>> Building Release PyClassifiers..."; @if [ -d ./$(f_release) ]; then rm -rf ./$(f_release); fi @mkdir $(f_release); - @cmake -S . -B $(f_release) -D CMAKE_BUILD_TYPE=Release + @cmake -S . -B $(f_release) -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake @echo ">>> Done"; opt = "" diff --git a/lib/catch2 b/lib/catch2 deleted file mode 160000 index 506276c..0000000 --- a/lib/catch2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 506276c59217429c93abd2fe9507c7f45eb81072 diff --git a/lib/json b/lib/json deleted file mode 160000 index 48e7b4c..0000000 --- a/lib/json +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48e7b4c23b089c088c11e51c824d78d0f0949b40 diff --git a/lib/mdlp b/lib/mdlp deleted file mode 160000 index 7d62d6a..0000000 --- a/lib/mdlp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7d62d6af4a6ca944a3bbde0b61f651fd4b2d3f57 diff --git a/pyclfs/CMakeLists.txt b/pyclfs/CMakeLists.txt index 541bb7e..e14ab7c 100644 --- a/pyclfs/CMakeLists.txt +++ b/pyclfs/CMakeLists.txt @@ -5,4 +5,4 @@ include_directories( ${Bayesnet_INCLUDE_DIRS} ) add_library(PyClassifiers ODTE.cc STree.cc SVC.cc RandomForest.cc XGBoost.cc PyClassifier.cc PyWrap.cc) -target_link_libraries(PyClassifiers ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::boost Boost::python Boost::numpy) \ No newline at end of file +target_link_libraries(PyClassifiers nlohmann_json::nlohmann_json ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::boost Boost::python Boost::numpy) \ No newline at end of file diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000..b241242 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,21 @@ +{ + "default-registry": { + "kind": "git", + "baseline": "760bfd0c8d7c89ec640aec4df89418b7c2745605", + "repository": "https://github.com/microsoft/vcpkg" + }, + "registries": [ + { + "kind": "git", + "repository": "https://github.com/rmontanana/vcpkg-stash", + "baseline": "1ea69243c0e8b0de77c9d1dd6e1d7593ae7f3627", + "packages": [ + "arff-files", + "bayesnet", + "fimdlp", + "folding", + "libtorch-bin" + ] + } + ] +} \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..d9b7888 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,47 @@ + { + "name": "platform", + "version-string": "1.1.0", + "dependencies": [ + "arff-files", + "nlohmann-json", + "fimdlp", + "libtorch-bin", + "folding", + "argparse", + "libxlsxwriter" + ], + "overrides": [ + { + "name": "arff-files", + "version": "1.1.0" + }, + { + "name": "fimdlp", + "version": "2.0.1" + }, + { + "name": "libtorch-bin", + "version": "2.7.0" + }, + { + "name": "bayesnet", + "version": "1.1.1" + }, + { + "name": "folding", + "version": "1.1.1" + }, + { + "name": "argpase", + "version": "3.2" + }, + { + "name": "libxlsxwriter", + "version": "1.2.2" + }, + { + "name": "nlohmann-json", + "version": "3.11.3" + } + ] + } \ No newline at end of file