Skip to content

Commit

Permalink
[INFRA] Update cpack target
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Oct 15, 2024
1 parent b9be277 commit 204c49d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
18 changes: 18 additions & 0 deletions build_system/cpack_install.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

# Only if creating the source package (`make package_source`):
# Copy dependency include directories into package's staging folder
if (CPACK_SOURCE_INSTALLED_DIRECTORIES)
file (COPY "@SEQAN3_SDSL_INCLUDE_DIR@/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/include/seqan3/vendor")
file (COPY "@SEQAN3_CEREAL_INCLUDE_DIR@/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/include/seqan3/vendor")
configure_file ("@CPM_DOWNLOAD_LOCATION@" "${CMAKE_CURRENT_BINARY_DIR}/build_system/CPM.cmake" COPYONLY)
if ("@use_ccache_ADDED@" STREQUAL "YES")
configure_file ("@use_ccache_SOURCE_DIR@/ccache/CMakeLists.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test/cmake/seqan3_require_ccache.cmake" COPYONLY)
endif ()
if ("@doxygen_awesome_ADDED@" STREQUAL "YES")
file (COPY "@doxygen_awesome_SOURCE_DIR@/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/test/documentation/doxygen_awesome")
endif ()
endif ()
21 changes: 20 additions & 1 deletion build_system/seqan3-package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,27 @@ set (CPACK_PACKAGE_ICON "${SEQAN3_CLONE_DIR}/test/documentation/seqan_logo.svg")
set (CPACK_RESOURCE_FILE_LICENSE "${SEQAN3_CLONE_DIR}/LICENSE.md")
set (CPACK_RESOURCE_FILE_README "${SEQAN3_CLONE_DIR}/README.md")

# Already being called on source package, i.e. CPM is already downloaded.
if (NOT CPM_DOWNLOAD_LOCATION)
set (CPM_DOWNLOAD_LOCATION "${SEQAN3_CLONE_DIR}/build_system/CPM.cmake")
else ()
CPMGetPackage (use_ccache)
CPMGetPackage (doxygen_awesome)
endif ()

configure_file ("${SEQAN3_CLONE_DIR}/build_system/cpack_install.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cpack_install.cmake" @ONLY)
set (CPACK_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/cpack_install.cmake")

# Source Package
set (CPACK_SOURCE_GENERATOR "TXZ")
set (CPACK_SOURCE_IGNORE_FILES "\\\\.git($|/)")
# Next 2 lines would overwrite copy in cpack_install.cmake
list (APPEND CPACK_SOURCE_IGNORE_FILES "/build_system/CPM.cmake")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/test/cmake/seqan3_require_ccache.cmake")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/\.git($|/)")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/\.github/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/\.vscode/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/build/")
list (APPEND CPACK_SOURCE_IGNORE_FILES "/submodules/")

include (CPack)

0 comments on commit 204c49d

Please sign in to comment.