Skip to content

Commit

Permalink
Adding thirdparty libraries to vcpkg (#246)
Browse files Browse the repository at this point in the history
* thirdpart libs initial commit

* Updated builder file

* Updating other builder files

* Changes in portfile, vcpkg baseline commit updated

* vcpkg.json was changed in a prev commit fixing it

* new changes in libraries

* path update changes in vcpkg

* vcpkg.json file changes in previous commit fixed

* Fix for libmp4 windows build issue

* Removing gstreamer dependency from aprapipes (#253)

* initial commit

* builder files changed to remove gstreamer

* Removing gst based modules, other gstreamer files

* small yml file fix

---------

Co-authored-by: Vinayak Bhustali <[email protected]>

* thirdpart libs initial commit

* Updated builder file

* Updating other builder files

* Changes in portfile, vcpkg baseline commit updated

* vcpkg.json was changed in a prev commit fixing it

* new changes in libraries

* path update changes in vcpkg

* vcpkg.json file changes in previous commit fixed

* Fix for libmp4 windows build issue

---------

Co-authored-by: Vinayak Bhustali <[email protected]>
  • Loading branch information
Vinayak-YB and Vinayak Bhustali authored Jul 5, 2023
1 parent bd172e5 commit c0838bf
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 106 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-test-lin-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,8 @@ jobs:
with:
path: |
${{ inputs.cache-path }}
./thirdparty/libmp4/build
key: ${{ inputs.flav }}-4-${{ hashFiles( 'base/vcpkg.json', 'vcpkg/baseline.json', 'submodule_ver.txt') }}
restore-keys: ${{ inputs.flav }}-


- name: Build libmp4 when it is not cached
if: ${{ steps.cache-all.outputs.cache-hit != 'true' }}
working-directory: ${{github.workspace}}/thirdparty/libmp4
run: ./build.cmd

- name: Make build folder
run: mkdir -p build
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build-test-lin-wsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,12 @@ jobs:
with:
path: |
${{ inputs.cache-path }}
./thirdparty/libmp4/build
key: ${{ inputs.flav }}-4-${{ hashFiles( 'base/vcpkg.json', 'vcpkg/baseline.json', 'submodule_ver.txt') }}
restore-keys: ${{ inputs.flav }}-

- name: On WSL prep the thirdparty build scripts
working-directory: ${{github.workspace}}/thirdparty
run: |
(dos2unix libmp4/build.cmd) || true
chmod a+x libmp4/build.cmd
shell: wsl-bash {0}

- name: Build libmp4 when it is not cached
if: ${{ steps.cache-all.outputs.cache-hit != 'true' }}
working-directory: ${{github.workspace}}/thirdparty/libmp4
run: ./build.cmd
shell: wsl-bash {0}

- name: Make build folder
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build-test-lin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,9 @@ jobs:
with:
path: |
${{ inputs.cache-path }}
./thirdparty/libmp4/build
key: ${{ inputs.flav }}-4-${{ hashFiles( 'base/vcpkg.json', 'vcpkg/baseline.json', 'submodule_ver.txt') }}
restore-keys: ${{ inputs.flav }}-

- name: Build libmp4 when it is not cached
if: ${{ steps.cache-all.outputs.cache-hit != 'true' }}
working-directory: ${{github.workspace}}/thirdparty/libmp4
run: ./build.cmd

- name: Make build folder
run: mkdir -p build
continue-on-error: true
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build-test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,8 @@ jobs:
with:
path: |
${{ inputs.cache-path }}
${{ github.workspace }}/thirdparty/libmp4/build/Release/mp4lib.lib
key: ${{ inputs.flav }}-3-${{ hashFiles( 'base/vcpkg.json', 'vcpkg/baseline.json', 'submodule_ver.txt') }}
restore-keys: ${{ inputs.flav }}-

- name: Build libmp4 when it is not cached
if: ${{ steps.cache-all.outputs.cache-hit != 'true' }}
working-directory: ${{github.workspace}}/thirdparty/libmp4
run: ./build.cmd && new-item build/Release -ItemType directory -Force && copy-item ./build/RelWithDebInfo/mp4lib.lib -Destination ./build/Release/ -Force

- name: Make build folder
run: mkdir -p build
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Apra-Labs/vcpkg
[submodule "thirdparty/libmp4"]
path = thirdparty/libmp4
url = https://github.com/Apra-Labs/libmp4.git
branch = forApraPipes
17 changes: 7 additions & 10 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@ set(CMAKE_CXX_STANDARD 14)
project(APRAPIPES)


set ( LIBMP4_LIB_DIR "../thirdparty/libmp4/build/")
set ( LIBMP4_INC_DIR "../thirdparty/libmp4/include/")

IF(ENABLE_WINDOWS)
set (LIBMP4_LIB_DIR "${CMAKE_SOURCE_DIR}/../thirdparty/libmp4/build/${CMAKE_BUILD_TYPE}")
ENDIF(ENABLE_WINDOWS)

message(STATUS $ENV{PKG_CONFIG_PATH}">>>>>> PKG_CONFIG_PATH")

message(STATUS ${LIBMP4_LIB_DIR} ">>>>>> LIBMP4_LIB_DIR")
message(STATUS ${LIBMP4_INC_DIR} ">>>>>> LIBMP4_INC_DIR")
list(APPEND CMAKE_PREFIX_PATH ${LIBMP4_LIB_DIR})
find_library(LIBMP4_LIB NAMES mp4lib.lib libmp4lib.a REQUIRED)
find_package(PkgConfig REQUIRED)


Expand Down Expand Up @@ -84,6 +74,8 @@ IF(ENABLE_CUDA)
find_library(NVBUFUTILSLIB nvbuf_utils REQUIRED)
find_library(EGLSTREAM_CAMCONSUMER_LIB nveglstream_camconsumer REQUIRED)
find_library(NVARGUS_SOCKETCLINET_LIB nvargus_socketclient REQUIRED)
find_library(LIBRE_LIB NAMES libre.so libre.a REQUIRED)
find_library(BARESIP_LIB NAMES libbaresip.so REQUIRED)
find_package(Curses REQUIRED)

SET(JETSON_LIBS
Expand All @@ -101,6 +93,8 @@ IF(ENABLE_CUDA)
ELSEIF(ENABLE_LINUX)
find_library(LIBNVCUVID libnvcuvid.so PATHS ../thirdparty/Video_Codec_SDK_10.0.26/Lib/linux/stubs/x86_64 NO_DEFAULT_PATH)
find_library(LIBNVENCODE libnvidia-encode.so PATHS ../thirdparty/Video_Codec_SDK_10.0.26/Lib/linux/stubs/x86_64 NO_DEFAULT_PATH)
find_library(LIBRE_LIB NAMES libre.so libre.a REQUIRED)
find_library(BARESIP_LIB NAMES libbaresip.so REQUIRED)
SET(NVCODEC_LIB ${LIBNVCUVID} ${LIBNVENCODE})
SET(NVCUDAToolkit_LIBS
libcuda.so
Expand Down Expand Up @@ -450,6 +444,8 @@ ${FFMPEG_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${LIBMP4_INC_DIR}
${BARESIP_INC_DIR}
${LIBRE_INC_DIR}
${NVCODEC_INCLUDE_DIR}
)

Expand Down Expand Up @@ -570,6 +566,7 @@ ENDIF (ENABLE_CUDA)


find_library(OPENH264_LIB NAMES openh264.lib libopenh264.a REQUIRED)
find_library(LIBMP4_LIB NAMES mp4lib.lib libmp4lib.a REQUIRED)

target_link_libraries(aprapipesut
aprapipes
Expand Down
135 changes: 73 additions & 62 deletions base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,75 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "apra-pipes-cuda",
"version": "0.0.1",
"builtin-baseline": "4e8ee452bcec49209042e7876800ec68e8477d14",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"contrib",
"cuda",
"cudnn",
"dnn",
"jpeg",
"nonfree",
"png",
"tiff",
"webp"
]
},
"libjpeg-turbo",
"openh264",
"ffmpeg",
"bigint",
"boost-math",
"boost-system",
"boost-thread",
"boost-filesystem",
"boost-serialization",
"boost-log",
"boost-chrono",
"boost-test",
"boost-iostreams",
"boost-dll",
"nu-book-zxing-cpp",
"liblzma",
"bzip2",
"zlib",
"sfml",
{
"name": "glib",
"default-features": false,
"features": [
"libmount"
],
"platform": "(linux \u0026 x64)",
"$reason": "skip linux:arm64 and windows"
},
{
"name": "glib",
"default-features": true,
"platform": "windows"
},
{
"name": "hiredis",
"platform": "!arm64"
},
{
"name": "redis-plus-plus",
"platform": "!arm64"
}
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "apra-pipes-cuda",
"version": "0.0.1",
"builtin-baseline": "b0053dfa8bbaabd1cfc602b27d3cf7295987a073",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"contrib",
"cuda",
"cudnn",
"dnn",
"jpeg",
"nonfree",
"png",
"tiff",
"webp"
]
},
"libjpeg-turbo",
"openh264",
"ffmpeg",
"bigint",
"boost-math",
"boost-system",
"boost-thread",
"boost-filesystem",
"boost-serialization",
"boost-log",
"boost-chrono",
"boost-test",
"boost-iostreams",
"boost-dll",
"nu-book-zxing-cpp",
"liblzma",
"bzip2",
"zlib",
"sfml",
{
"name": "glib",
"default-features": false,
"features": [
"libmount"
],
"platform": "(linux \u0026 x64)",
"$reason": "skip linux:arm64 and windows"
},
{
"name": "glib",
"default-features": true,
"platform": "windows"
},
{
"name": "hiredis",
"platform": "!arm64"
},
{
"name": "redis-plus-plus",
"platform": "!arm64"
},
{
"name": "re",
"platform": "!windows"
},
{
"name": "baresip",
"platform": "!windows"
},
{
"name": "libmp4"
}
]
}
}
1 change: 0 additions & 1 deletion thirdparty/libmp4
Submodule libmp4 deleted from ae73a3

0 comments on commit c0838bf

Please sign in to comment.