Skip to content

Commit

Permalink
Add initial CPack configuration to CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Nov 2, 2023
1 parent 54684cf commit 8cdbfc6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,14 @@ if (URL_INSTALL AND NOT URL_AMALGAMATED)
FILE ${CMAKE_CURRENT_BINARY_DIR}/${upa_lib_name}-targets.cmake
NAMESPACE upa::
)

# Packaging
if (URL_MAIN_PROJECT)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_SOURCE_GENERATOR "ZIP")
include(CPack)
endif()
endif()

0 comments on commit 8cdbfc6

Please sign in to comment.