Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,26 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})

DEAL_II_SETUP_TARGET("${PROJECT_NAME}")
DEAL_II_SETUP_TARGET(cpackexamplelib)

# executable
install(TARGETS "${PROJECT_NAME}"
RUNTIME DESTINATION bin
)

# libraries
install(TARGETS cpackexamplelib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

# header files
install(FILES
fem/fem.hpp
filesystem/filesystem.hpp
flatset/flatset.hpp
yamlParser/yamlParser.hpp
DESTINATION include/cpackexamplelib
)

# Include our packaging configuration
include(cmake/CPackConfig.cmake)
16 changes: 16 additions & 0 deletions cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_VENDOR "Henry Cai")
set(CPACK_PACKAGE_CONTACT "st166080@stud.uni-stuttgart.de")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Exercise for packaging with Cpack, which is a tool
combined with CMake to create installation packages (tar or deb).")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/HenryCai-st/cpack-exercise-wt2526")
set(CPACK_GENERATOR "TGZ;DEB")

set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Henry Cai <st166080@stud.uni-stuttgart.de>")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_STRIP_FILES ON)

include(CPack)