Skip to content

Commit

Permalink
CMakeLists.txt: ENABLE_PACKAGING bundle libad*-iio
Browse files Browse the repository at this point in the history
Include libad9166-iio and libad93610-iio libraries in the deb/rpm,
so the user does not have to manually install those first.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Mar 22, 2023
1 parent 8d836d1 commit f44b844
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,29 @@ 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)
# Ubuntu 20.04 does not have GtkDataBox 1.0.0,
# until we drop support, bundle it.
get_filename_component(GTKDATABOX_LIBRARIES_REALPATH "${GTKDATABOX_LIBDIR}/libgtkdatabox.so" REALPATH)
install(
FILES "${GTKDATABOX_LIBDIR}/libgtkdatabox.so.1.0.0"
FILES "${GTKDATABOX_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME libgtkdatabox.so.1
)
# Bundle libad*-iio, so the user does not need to install those first.
if (LIBAD9361_LIBRARIES)
get_filename_component(LIBAD9361_LIBRARIES_REALPATH "${LIBAD9361_LIBRARIES}" REALPATH)
install(
FILES "${LIBAD9361_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if (LIBAD9166_LIBRARIES)
get_filename_component(LIBAD9166_LIBRARIES_REALPATH "${LIBAD9166_LIBRARIES}" REALPATH)
install(
FILES "${LIBAD9166_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
endif()
# Set default CMAKE_PREFIX_PATH to CMAKE_SYSTEM_PREFIX_PATH
set(CMAKE_PREFIX_PATH ${CMAKE_SYSTEM_PREFIX_PATH})
Expand Down

0 comments on commit f44b844

Please sign in to comment.