From bc520d13685f5a5bee0d2bd338073d109803da79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Thu, 1 May 2025 18:15:20 +0200 Subject: [PATCH] Update cmakelists --- CMakeLists.txt | 32 +++++++++++++++++++++----------- Makefile | 9 ++++++--- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a64e01..92d09a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,11 +69,15 @@ write_basic_package_version_file( COMPATIBILITY AnyNewerVersion ) +# configure_package_config_file( +# "${CMAKE_CURRENT_SOURCE_DIR}/bayesnetConfig.cmake.in" +# "${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfig.cmake" +# INSTALL_DESTINATION lib/cmake/bayesnet +# ) configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/bayesnetConfig.cmake.in" + ${CMAKE_CURRENT_SOURCE_DIR}/bayesnetConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfig.cmake" - INSTALL_DESTINATION lib/cmake/bayesnet -) + INSTALL_DESTINATION share/bayesnet) install(TARGETS bayesnet EXPORT bayesnetTargets @@ -85,15 +89,21 @@ install(DIRECTORY bayesnet/ DESTINATION include/bayesnet FILES_MATCHING CONFIGUR install(FILES ${CMAKE_BINARY_DIR}/configured_files/include/bayesnet/config.h DESTINATION include/bayesnet CONFIGURATIONS Release) -install(EXPORT bayesnetTargets - FILE bayesnetTargets.cmake - NAMESPACE bayesnet:: - DESTINATION lib/cmake/bayesnet) +# install(EXPORT bayesnetTargets +# FILE bayesnetTargets.cmake +# NAMESPACE bayesnet:: +# DESTINATION lib/cmake/bayesnet) -install(EXPORT bayesnetTargets - FILE bayesnetConfig.cmake - NAMESPACE bayesnet:: - DESTINATION lib/cmake/bayesnet) +# install(EXPORT bayesnetTargets +# FILE bayesnetConfig.cmake +# NAMESPACE bayesnet:: +# DESTINATION lib/cmake/bayesnet) +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfigVersion.cmake" + DESTINATION share/bayesnet +) + diff --git a/Makefile b/Makefile index d1bf38f..f4c0292 100644 --- a/Makefile +++ b/Makefile @@ -86,10 +86,13 @@ init: ## Initialize the project installing dependencies clean: ## Clean the project @echo ">>> Cleaning the project..." - @if test -d build_Debug ; then echo "- Deleting build_Debug folder" ; rm -rf build_Debug; fi - @if test -d build_Release ; then echo "- Deleting build_Release folder" ; rm -rf build_Release; fi @if test -f CMakeCache.txt ; then echo "- Deleting CMakeCache.txt"; rm -f CMakeCache.txt; fi - @if test -d vcpkg_installed ; then echo "- Deleting vcpkg_installed folder" ; rm -rf vcpkg_installed; fi + @for folder in $(f_release) $(f_debug) vpcpkg_installed install_test ; do \ + if test -d "$$folder" ; then \ + echo "- Deleting $$folder folder" ; \ + rm -rf "$$folder"; \ + fi; \ + done @$(MAKE) clean-test @echo ">>> Done";