diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d6c2c..d655b61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,3 +20,23 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES}) DEAL_II_SETUP_TARGET("${PROJECT_NAME}") DEAL_II_SETUP_TARGET(cpackexamplelib) + +install(TARGETS "${PROJECT_NAME}" + RUNTIME DESTINATION bin +) + +install(TARGETS cpackexamplelib + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES + fem/fem.hpp + filesystem/filesystem.hpp + flatset/flatset.hpp + yamlParser/yamlParser.hpp + DESTINATION include/cpackexamplelib +) + +include(cmake/CPackConfig.cmake) +include(CPack) \ No newline at end of file diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake new file mode 100644 index 0000000..fa3d2b0 --- /dev/null +++ b/cmake/CPackConfig.cmake @@ -0,0 +1,24 @@ +# ----------------------------- +# CPack configuration +# ----------------------------- + +set(CPACK_PACKAGE_NAME "cpackexample") +set(CPACK_PACKAGE_VERSION "1.0.0") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CPack Exercise") +set(CPACK_PACKAGE_VENDOR "Lucia Agullo Marti") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/lucia-agullo-marti/cpack-exercise-wt2526") + +# Generators +set(CPACK_GENERATOR "TGZ;DEB") + +# Strip binaries to reduce package size +set(CPACK_STRIP_FILES TRUE) + +# Debian specific settings +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Lucia Agullo Marti ") +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "CPack exercise for the Simulation Software Engineering course (Winter Term 2025/2026)") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + +# Debian dependencies +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libboost-filesystem1.83-dev, libyaml-cpp-dev") \ No newline at end of file