Skip to content

Commit

Permalink
Add CPack support
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirlua committed Jun 21, 2024
1 parent 06368a2 commit 6ff5892
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions concurrency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,31 @@ add_custom_target(copy_changelog ALL
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/CHANGELOG.md ${CMAKE_BINARY_DIR}/CHANGELOG.md
DEPENDS ${PROJECT_SOURCE_DIR}/CHANGELOG.md
COMMENT "Copying CHANGELOG.md to the build directory"
)

include(CPack)

# Set packaging details
set(CPACK_PACKAGE_NAME "WorkerQueue")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION "Cross platform asynchronous worker queue based on modern C++")
set(CPACK_PACKAGE_MAINTAINER "kadirlua")

# Use file(GLOB ...) to match specific header files
file(GLOB HEADER_FILES "${PROJECT_SOURCE_DIR}/concurrency/*.h")

# Install the matched header files
install(FILES ${HEADER_FILES} DESTINATION include)

install(FILES ${PROJECT_BINARY_DIR}/concurrency/version.h DESTINATION include)

# Include the CHANGELOG.md and LICENSE files in the package
install(FILES ${PROJECT_SOURCE_DIR}/CHANGELOG.md DESTINATION .)
install(FILES ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION .)

# Include other necessary files and targets
install(TARGETS ${LIBRARY_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

0 comments on commit 6ff5892

Please sign in to comment.