Skip to content

Commit

Permalink
[CMake] don't generate disabled packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Nov 22, 2023
1 parent ec01620 commit a4b1dab
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions cmake/Packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_VERBATIM_VARIABLES On)

# Package components
set(CPACK_COMPONENTS_ALL "lib;dev;dl_dev;debug;bin;matlab;casadi;casadi_dev;extra;extra_dev")
set(CPACK_DEB_COMPONENT_INSTALL On)
set(CPACK_COMPONENTS_ALL "lib;dev;dl_dev;debug;bin;extra;extra_dev")
if (ALPAQA_WITH_CASADI)
list(APPEND CPACK_COMPONENTS_ALL "casadi" "casadi_dev")
endif()
if (ALPAQA_WITH_MATLAB)
list(APPEND CPACK_COMPONENTS_ALL "matlab")
endif()

set(CPACK_DEBIAN_LIB_PACKAGE_NAME "libalpaqa")
set(CPACK_DEBIAN_LIB_DISPLAY_NAME "alpaqa libraries")
set(CPACK_DEBIAN_LIB_DESCRIPTION "Shared libraries needed to run applications that use alpaqa.")
Expand Down Expand Up @@ -50,8 +57,12 @@ set(CPACK_DEBIAN_BIN_PACKAGE_NAME "libalpaqa-tools")
set(CPACK_DEBIAN_BIN_DISPLAY_NAME "alpaqa command-line tools")
set(CPACK_DEBIAN_BIN_DESCRIPTION "Command line utilities such as alpaqa-driver, which can be used to invoke the solvers directly, without the need to write any C++ code.")
set(CPACK_DEBIAN_BIN_GROUP "Tools")
set(CPACK_DEBIAN_BIN_PACKAGE_DEPENDS "libalpaqa-casadi (= ${CPACK_PACKAGE_VERSION}), libalpaqa-extra (= ${CPACK_PACKAGE_VERSION})")
set(CPACK_COMPONENT_BIN_DEPENDS "casadi;extra")
set(CPACK_DEBIAN_BIN_PACKAGE_DEPENDS "libalpaqa-extra (= ${CPACK_PACKAGE_VERSION})")
set(CPACK_COMPONENT_BIN_DEPENDS "extra")
if (ALPAQA_WITH_CASADI)
string(APPEND CPACK_DEBIAN_BIN_PACKAGE_DEPENDS ", libalpaqa-casadi (= ${CPACK_PACKAGE_VERSION})")
list(APPEND CPACK_COMPONENT_BIN_DEPENDS "casadi")
endif()

set(CPACK_DEBIAN_MATLAB_PACKAGE_NAME "libalpaqa-matlab")
set(CPACK_DEBIAN_MATLAB_DISPLAY_NAME "alpaqa Matlab interface")
Expand Down

0 comments on commit a4b1dab

Please sign in to comment.