Skip to content

Commit

Permalink
fix debian/install and build process for binary & API clients
Browse files Browse the repository at this point in the history
  • Loading branch information
j1elo committed Jul 23, 2020
1 parent 3b2c524 commit 7d943c2
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 31 deletions.
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,12 @@ pkg_check_modules(SOUP REQUIRED libsoup-2.4>=${SOUP_REQUIRED})

set(CMAKE_INSTALL_GST_PLUGINS_DIR ${CMAKE_INSTALL_LIBDIR}/gstreamer-1.5)

# Patch and build the ALVAR library
message("Patch ALVAR library sources for OpenCV compatibility:")
execute_process(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git apply --verbose --directory=alvar-2.0.0-src-opencv3 alvar-compat-opencv-2-3.patch
RESULT_VARIABLE GIT_RESULT
)
if(NOT GIT_RESULT EQUAL "0")
message(FATAL_ERROR "git apply failed on ALVAR library")
# Set some definitions before adding the ALVAR library
if(NOT DEFINED ALVAR_PACKAGE)
set(ALVAR_PACKAGE src)
endif()
if(NOT DEFINED ALVAR_NOGLUT)
set(ALVAR_NOGLUT 1)
endif()
add_subdirectory(alvar-2.0.0-src-opencv3)

Expand Down
18 changes: 18 additions & 0 deletions alvar-patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Preparation script to build ALVAR from sources.
#
# ALVAR source code has some issues with modern versions of the compiler, so
# we maintain a patch that fixes all compilation errors. This patch should be
# applied once before the build step.

# Bash options for strict error checking
set -o errexit -o errtrace -o pipefail -o nounset

# Trace all commands
set -o xtrace

# Apply our patch on the ALVAR sources
git apply --verbose \
--directory=alvar-2.0.0-src-opencv3 \
./alvar-compat-opencv-2-3.patch
8 changes: 5 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Architecture: any
Section: libs
Depends: ${shlibs:Depends},
${misc:Depends},
kms-core (>= 6.7.0),
kms-elements (>= 6.7.0),
kms-filters (>= 6.7.0)
Breaks: kms-markerdetector-6.0
Replaces: kms-markerdetector-6.0
Expand All @@ -29,9 +31,9 @@ Package: kms-markerdetector-dev
Architecture: any
Section: libdevel
Depends: kms-markerdetector (= ${binary:Version}),
kms-core-dev,
kms-elements-dev,
kms-filters-dev,
kms-core-dev (>= 6.7.0),
kms-elements-dev (>= 6.7.0),
kms-filters-dev (>= 6.7.0),
libopencv-dev,
libsoup2.4-dev,
libtinyxml-dev
Expand Down
8 changes: 8 additions & 0 deletions debian/kms-markerdetector-dev.install
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
usr/include/alvar/*.h
usr/include/alvar/*/*.h
usr/include/alvar/*/*/*.h
usr/include/kurento/modules/*/*.h
usr/include/kurento/modules/*/*.hpp
usr/lib/*/libalvar.so
usr/lib/*/libalvarplatform.so
usr/lib/*/libkmsmarkerdetectorimpl.so
usr/lib/*/pkgconfig/*.pc
usr/share/alvar/*
usr/share/cmake-*/*/*.cmake
usr/share/kurento/modules/*.kmd.json
3 changes: 2 additions & 1 deletion debian/kms-markerdetector.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
usr/lib/*/lib*.so*
usr/lib/*/kurento/*/*.so
usr/lib/*/lib*.so.*
usr/lib/*/libalvarcaptureplugin*.so
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
dh $@ --parallel

override_dh_auto_configure:
dh_auto_configure -- -DALVAR_PACKAGE=src -DALVAR_NOGLUT=1
./alvar-patch.sh && dh_auto_configure
17 changes: 0 additions & 17 deletions src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
cmake_minimum_required (VERSION 2.8)

# Generate code
include (CodeGenerator)

# Possible parameters
# set (MULTI_VALUE_PARAMS
# MODELS
# INTERFACE_LIB_EXTRA_SOURCES
# INTERFACE_LIB_EXTRA_HEADERS
# INTERFACE_LIB_EXTRA_INCLUDE_DIRS
# INTERFACE_LIB_EXTRA_LIBRARIES
# SERVER_IMPL_LIB_EXTRA_SOURCES
# SERVER_IMPL_LIB_EXTRA_HEADERS
# SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS
# SERVER_IMPL_LIB_EXTRA_LIBRARIES
# MODULE_EXTRA_INCLUDE_DIRS
# MODULE_EXTRA_LIBRARIES
# SERVER_IMPL_LIB_FIND_CMAKE_EXTRA_LIBRARIES
# )

generate_code (
MODELS ${CMAKE_CURRENT_SOURCE_DIR}/interface
INTERFACE_LIB_EXTRA_INCLUDE_DIRS ${ALVAR_INCLUDE_DIRS}
Expand Down

0 comments on commit 7d943c2

Please sign in to comment.