Skip to content
Closed
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
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,23 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})

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

# 1. Install Targets
# Install executable to bin/
install(TARGETS cpackexample DESTINATION bin)

# Install library to lib/
install(TARGETS cpackexamplelib DESTINATION lib)

# Install headers to include/cpackexamplelib
install(FILES
fem/fem.hpp
filesystem/filesystem.hpp
flatset/flatset.hpp
yamlParser/yamlParser.hpp
DESTINATION include/cpackexamplelib
)

# 2. Include CPack Configuration
# We will create this file in the next step
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is "we", what is the "next step"?

include(cmake/CPackConfig.cmake)
11 changes: 11 additions & 0 deletions cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(CPACK_PACKAGE_NAME "cpackexample")
set(CPACK_PACKAGE_VENDOR "University of Stuttgart")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CPack Exercise Solution")
set(CPACK_PACKAGE_VERSION "1.0.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hard-coding to a different version than the project?

set(CPACK_PACKAGE_CONTACT "Student <student@example.com>")
set(CPACK_GENERATOR "TGZ;DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Student <student@example.com>")
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_STRIP_FILES ON)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
include(CPack)