Update cmakelists

This commit is contained in:
2025-05-01 18:15:20 +02:00
parent a8b3866974
commit bc520d1368
2 changed files with 27 additions and 14 deletions

View File

@@ -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
)

View File

@@ -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";