Skip to content

Commit

Permalink
cmake/LinuxPackaging: bundle gtkdatabox 1.0.0
Browse files Browse the repository at this point in the history
Bundle GtkDataBox version 1.0.0 with the installable.
All dependencies from this library are available in Ubuntu 20.04,
just it is not. When we eventually drop support to Ubuntu 20.04,
we stop bundling it.
The package size increases 142kB due to this.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Mar 21, 2023
1 parent 5080293 commit 953066e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ install(TARGETS osc
)
install(TARGETS oscmain RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

# Ubuntu 20.04 does not have GtkDataBox 1.0.0,
# until we drop support, bundle it.
if(ENABLE_PACKAGING)
install(
FILES "${GTKDATABOX_LIBDIR}/libgtkdatabox.so.1.0.0"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME libgtkdatabox.so.1
)
endif()
# Set default CMAKE_PREFIX_PATH to CMAKE_SYSTEM_PREFIX_PATH
set(CMAKE_PREFIX_PATH ${CMAKE_SYSTEM_PREFIX_PATH})

Expand Down
6 changes: 3 additions & 3 deletions cmake/LinuxPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FIND_PROGRAM(RPMBUILD_CMD rpmbuild)
if (RPMBUILD_CMD)
set(CPACK_PACKAGE_RELOCATABLE OFF)
set(CPACK_GENERATOR ${CPACK_GENERATOR};RPM)
set(CPACK_RPM_PACKAGE_REQUIRES "libiio >= 0.19, gtk3 >= 3.24, libgtkdatabox >= 1.0.0, libjansson > 2.12, libmatio >= 1.5.17")
set(CPACK_RPM_PACKAGE_REQUIRES "libiio >= 0.19, gtk3 >= 3.24, libjansson > 2.12, libmatio >= 1.5.17")
endif()

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
Expand All @@ -33,7 +33,7 @@ if(DEB_DETECT_DEPENDENCIES AND DPKG_CMD AND DPKGQ_CMD)
execute_process(COMMAND "${DPKG_CMD}" --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(PACKAGES "libiio libgtk-3 libgtkdatabox libjansson libmatio")
set(PACKAGES "libiio libgtk-3 libjansson libmatio")
# find the version of the installed package, which is hard to do in
# cmake first, turn the list into an list (seperated by semicolons)
string(REGEX REPLACE " " ";" PACKAGES ${PACKAGES})
Expand Down Expand Up @@ -86,7 +86,7 @@ if(DEB_DETECT_DEPENDENCIES AND DPKG_CMD AND DPKGQ_CMD)
${CPACK_DEBIAN_PACKAGE_DEPENDS})
else()
# assume everything is turned on, and running on a modern OS
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libiio0 (>= 0.19), libgtk-3-0 (>= 3.24.18), libgtkdatabox (>= 1.0.0), libjansson4 (> 2.12), libmatio11 (>= 1.5.17)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libiio0 (>= 0.19), libgtk-3-0 (>= 3.24.18), libjansson4 (> 2.12), libmatio11 (>= 1.5.17)")
message(STATUS "Using default dependencies for packaging")
endif()

Expand Down

0 comments on commit 953066e

Please sign in to comment.