From 7545a2c03a41b7d3b4f093e40825c95876433d1e Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sat, 30 Mar 2019 14:58:34 +0000 Subject: [PATCH] fix snapcraft build --- CMakeLists.txt | 18 +++++++++--------- snap/snapcraft.yaml | 6 ++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5581dc4..ca76095 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,19 +73,19 @@ add_library(v4l2wrapper STATIC ${LIBSRC_FILES}) target_link_libraries (${PROJECT_NAME} v4l2wrapper) # live555 -if (NOT EXISTS live) - file (DOWNLOAD ${LIVE555URL} ${CMAKE_SOURCE_DIR}/live555-latest.tar.gz ) - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xf live555-latest.tar.gz RESULT_VARIABLE unpack_result) +set(LIVE ${CMAKE_BINARY_DIR}/live) +if (NOT EXISTS ${LIVE}) + file (DOWNLOAD ${LIVE555URL} ${CMAKE_BINARY_DIR}/live555-latest.tar.gz ) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xvf ${CMAKE_BINARY_DIR}/live555-latest.tar.gz RESULT_VARIABLE unpack_result) if(NOT unpack_result STREQUAL "0") message(FATAL_ERROR "Fetching and compiling live555 failed!") endif() -endif(NOT EXISTS live) -FILE(GLOB LIVESOURCE live/groupsock/*.c* live/liveMedia/*.c* live/UsageEnvironment/*.c* live/BasicUsageEnvironment/*.c*) +endif() +FILE(GLOB LIVESOURCE ${LIVE}/groupsock/*.c* ${LIVE}/liveMedia/*.c* ${LIVE}/UsageEnvironment/*.c* ${LIVE}/BasicUsageEnvironment/*.c*) add_definitions(${LIVE555CFLAGS}) -add_library (live555 STATIC ${LIVESOURCE}) -target_include_directories(live555 PUBLIC live/groupsock/include live/liveMedia/include live/UsageEnvironment/include live/BasicUsageEnvironment/include) -target_link_libraries (${PROJECT_NAME} live555) - +add_library (live555 STATIC ${LIVESOURCE}) +target_include_directories(live555 PUBLIC ${LIVE}/groupsock/include ${LIVE}/liveMedia/include ${LIVE}/UsageEnvironment/include ${LIVE}/BasicUsageEnvironment/include) +target_link_libraries (${PROJECT_NAME} live555) #testing enable_testing() diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 326f8b8..dc63578 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: v4l2-rtspserver - version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' + version: git summary: RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9 description: | This is my-snap's description. You have a paragraph or two to tell the @@ -12,7 +12,7 @@ confinement: devmode # use 'strict' once you have the right plugs and slots parts: - build: + v4l2rtspserver: plugin: cmake source: . source-type: git @@ -22,7 +22,5 @@ - pkg-config - liblog4cpp5-dev - libasound2-dev - configflags: - - -DCMAKE_INSTALL_PREFIX=/