fix snapcraft build

This commit is contained in:
Michel Promonet 2019-03-30 14:58:34 +00:00
parent b6c129faea
commit 7545a2c03a
2 changed files with 11 additions and 13 deletions

View File

@ -73,19 +73,19 @@ add_library(v4l2wrapper STATIC ${LIBSRC_FILES})
target_link_libraries (${PROJECT_NAME} v4l2wrapper) target_link_libraries (${PROJECT_NAME} v4l2wrapper)
# live555 # live555
if (NOT EXISTS live) set(LIVE ${CMAKE_BINARY_DIR}/live)
file (DOWNLOAD ${LIVE555URL} ${CMAKE_SOURCE_DIR}/live555-latest.tar.gz ) if (NOT EXISTS ${LIVE})
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xf live555-latest.tar.gz RESULT_VARIABLE unpack_result) 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") if(NOT unpack_result STREQUAL "0")
message(FATAL_ERROR "Fetching and compiling live555 failed!") message(FATAL_ERROR "Fetching and compiling live555 failed!")
endif() endif()
endif(NOT EXISTS live) endif()
FILE(GLOB LIVESOURCE live/groupsock/*.c* live/liveMedia/*.c* live/UsageEnvironment/*.c* live/BasicUsageEnvironment/*.c*) FILE(GLOB LIVESOURCE ${LIVE}/groupsock/*.c* ${LIVE}/liveMedia/*.c* ${LIVE}/UsageEnvironment/*.c* ${LIVE}/BasicUsageEnvironment/*.c*)
add_definitions(${LIVE555CFLAGS}) add_definitions(${LIVE555CFLAGS})
add_library (live555 STATIC ${LIVESOURCE}) add_library (live555 STATIC ${LIVESOURCE})
target_include_directories(live555 PUBLIC live/groupsock/include live/liveMedia/include live/UsageEnvironment/include live/BasicUsageEnvironment/include) target_include_directories(live555 PUBLIC ${LIVE}/groupsock/include ${LIVE}/liveMedia/include ${LIVE}/UsageEnvironment/include ${LIVE}/BasicUsageEnvironment/include)
target_link_libraries (${PROJECT_NAME} live555) target_link_libraries (${PROJECT_NAME} live555)
#testing #testing
enable_testing() enable_testing()

View File

@ -1,6 +1,6 @@
name: v4l2-rtspserver 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 summary: RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9
description: | description: |
This is my-snap's description. You have a paragraph or two to tell the 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 confinement: devmode # use 'strict' once you have the right plugs and slots
parts: parts:
build: v4l2rtspserver:
plugin: cmake plugin: cmake
source: . source: .
source-type: git source-type: git
@ -22,7 +22,5 @@
- pkg-config - pkg-config
- liblog4cpp5-dev - liblog4cpp5-dev
- libasound2-dev - libasound2-dev
configflags:
- -DCMAKE_INSTALL_PREFIX=/