Update sample project and README
This commit is contained in:
@@ -4,24 +4,19 @@ project(bayesnet_sample)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(Torch REQUIRED)
|
||||
find_library(BayesNet NAMES libBayesNet BayesNet libBayesNet.a REQUIRED)
|
||||
find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet)
|
||||
find_library(FImdlp NAMES libfimdlp.a PATHS REQUIRED)
|
||||
|
||||
message(STATUS "FImdlp=${FImdlp}")
|
||||
message(STATUS "FImdlp_INCLUDE_DIRS=${FImdlp_INCLUDE_DIRS}")
|
||||
message(STATUS "BayesNet=${BayesNet}")
|
||||
message(STATUS "Bayesnet_INCLUDE_DIRS=${Bayesnet_INCLUDE_DIRS}")
|
||||
|
||||
include_directories(
|
||||
../tests/lib/Files
|
||||
lib/json/include
|
||||
/usr/local/include
|
||||
/usr/local/include/fimdlp/
|
||||
)
|
||||
find_package(Torch CONFIG REQUIRED)
|
||||
find_package(bayesnet CONFIG REQUIRED)
|
||||
find_package(fimdlp CONFIG REQUIRED)
|
||||
find_package(folding CONFIG REQUIRED)
|
||||
find_package(arff-files CONFIG REQUIRED)
|
||||
find_package(nlohman_json CONFIG REQUIRED)
|
||||
|
||||
add_executable(bayesnet_sample sample.cc)
|
||||
target_link_libraries(bayesnet_sample ${FImdlp} "${TORCH_LIBRARIES}" "${BayesNet}")
|
||||
add_executable(bayesnet_sample_xspode sample_xspode.cc)
|
||||
target_link_libraries(bayesnet_sample_xspode ${FImdlp} "${TORCH_LIBRARIES}" "${BayesNet}")
|
||||
target_link_libraries(bayesnet_sample PRIVATE
|
||||
fimdlp::fimdlp
|
||||
arff-files::arff-files
|
||||
"${TORCH_LIBRARIES}"
|
||||
bayesnet::bayesnet
|
||||
nlohmann_json::nlohmann_json
|
||||
folding::folding
|
||||
)
|
||||
|
21
sample/vcpkg-configuration.json
Normal file
21
sample/vcpkg-configuration.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"registries": [
|
||||
{
|
||||
"kind": "git",
|
||||
"repository": "https://github.com/rmontanana/vcpkg-stash",
|
||||
"baseline": "393efa4e74e053b6f02c4ab03738c8fe796b28e5",
|
||||
"packages": [
|
||||
"folding",
|
||||
"bayesnet",
|
||||
"arff-files",
|
||||
"fimdlp",
|
||||
"libtorch-bin"
|
||||
]
|
||||
}
|
||||
],
|
||||
"default-registry": {
|
||||
"kind": "git",
|
||||
"repository": "https://github.com/microsoft/vcpkg",
|
||||
"baseline": "760bfd0c8d7c89ec640aec4df89418b7c2745605"
|
||||
}
|
||||
}
|
12
sample/vcpkg.json
Normal file
12
sample/vcpkg.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "sample-project",
|
||||
"version-string": "0.1.0",
|
||||
"dependencies": [
|
||||
"bayesnet",
|
||||
"folding",
|
||||
"arff-files",
|
||||
"fimdlp",
|
||||
"nlohmann-json",
|
||||
"libtorch-bin"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user