diff --git a/CMakeLists.txt b/CMakeLists.txt index 88d769f..0a4515f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,10 @@ add_git_submodule("lib/mdlp") add_git_submodule("lib/argparse") add_git_submodule("lib/json") -find_library(XLSXWRITER_LIB libxlsxwriter.dylib PATHS /usr/local/lib ${HOME}/lib/usr/local/lib) + +find_library(XLSXWRITER_LIB NAMES libxlsxwriter.dylib libxlsxwriter.so PATHS ${BayesNet_SOURCE_DIR}/lib/libxlsxwriter/lib) +message("XLSXWRITER_LIB=${XLSXWRITER_LIB}") + # Subdirectories # -------------- diff --git a/README.md b/README.md index 426be8d..ad2660c 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,9 @@ export BOOST_ROOT=/path/to/library/ ```bash cd lib/libxlsxwriter make -sudo make install +make install DESTDIR=/home/rmontanana/Code PREFIX= ``` -It has to be installed in /usr/local/lib otherwise CMakeLists.txt has to be modified accordingly - Environment variable has to be set: ```bash diff --git a/src/Platform/CMakeLists.txt b/src/Platform/CMakeLists.txt index 26584e7..3a565e1 100644 --- a/src/Platform/CMakeLists.txt +++ b/src/Platform/CMakeLists.txt @@ -11,12 +11,7 @@ add_executable(b_list list.cc Datasets.cc Dataset.cc) add_executable(b_best best.cc BestResults.cc Result.cc Statistics.cc BestResultsExcel.cc ExcelFile.cc) add_executable(testx testx.cpp Datasets.cc Dataset.cc Folding.cc ) target_link_libraries(b_main BayesNet ArffFiles mdlp "${TORCH_LIBRARIES}") -if ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") - target_link_libraries(b_manage "${TORCH_LIBRARIES}" libxlsxwriter.so ArffFiles mdlp stdc++fs) - target_link_libraries(b_best Boost::boost libxlsxwriter.so stdc++fs) -else() - target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp) - target_link_libraries(b_best Boost::boost "${XLSXWRITER_LIB}") -endif() +target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp) +target_link_libraries(b_best Boost::boost "${XLSXWRITER_LIB}") target_link_libraries(b_list ArffFiles mdlp "${TORCH_LIBRARIES}") target_link_libraries(testx ArffFiles BayesNet "${TORCH_LIBRARIES}") \ No newline at end of file