Add install cmake/make target

This commit is contained in:
2024-07-22 22:01:33 +02:00
parent 248a511972
commit ab12622009
2 changed files with 12 additions and 1 deletions

View File

@@ -34,3 +34,11 @@ include_directories(
add_library(fimdlp src/CPPFImdlp.cpp src/Metrics.cpp src/BinDisc.cpp src/Discretizer.cpp)
target_link_libraries(fimdlp "${TORCH_LIBRARIES}")
# Installation
# ------------
install(TARGETS fimdlp
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
CONFIGURATIONS Release)
install(DIRECTORY src/ DESTINATION include/fimdlp FILES_MATCHING CONFIGURATIONS Release PATTERN "*.h")

View File

@@ -9,6 +9,9 @@ build:
@cmake -B build_release -S . -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF -DENABLE_SAMPLE=ON
@cmake --build build_release -j 8
install:
@cmake --build build_release --target install -j 8
test:
@if [ -d build_debug ]; then rm -fr build_debug; fi
@mkdir build_debug