From baca5e42d5a76e537ee0664b28ba77c045b8e073 Mon Sep 17 00:00:00 2001 From: n-kai-cj Date: Sat, 17 Apr 2021 01:31:49 +0900 Subject: [PATCH 1/5] add cuda build for librealsense2 --- .github/workflows/librealsense2.yml | 21 +++ librealsense2/cppbuild.sh | 24 +-- librealsense2/platform/gpu/pom.xml | 151 ++++++++++++++++++ librealsense2/pom.xml | 4 +- .../librealsense2/presets/realsense2.java | 5 +- 5 files changed, 193 insertions(+), 12 deletions(-) create mode 100644 librealsense2/platform/gpu/pom.xml diff --git a/.github/workflows/librealsense2.yml b/.github/workflows/librealsense2.yml index 9211bcf44e0..dd0a2dbf516 100644 --- a/.github/workflows/librealsense2.yml +++ b/.github/workflows/librealsense2.yml @@ -19,33 +19,54 @@ jobs: linux-armhf: runs-on: ubuntu-16.04 container: ubuntu:xenial + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions linux-arm64: runs-on: ubuntu-16.04 container: ubuntu:xenial + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions linux-x86: runs-on: ubuntu-16.04 container: centos:6 + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions linux-x86_64: runs-on: ubuntu-16.04 container: centos:6 + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions macosx-x86_64: runs-on: macos-10.15 + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions windows-x86: runs-on: windows-2019 + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions windows-x86_64: runs-on: windows-2019 + strategy: + matrix: + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions redeploy: diff --git a/librealsense2/cppbuild.sh b/librealsense2/cppbuild.sh index 783bbd2f515..332e8baac21 100755 --- a/librealsense2/cppbuild.sh +++ b/librealsense2/cppbuild.sh @@ -12,8 +12,8 @@ LIBUSB_VERSION=1.0.22 download https://github.com/IntelRealSense/librealsense/archive/v$LIBREALSENSE2_VERSION.tar.gz librealsense-$LIBREALSENSE2_VERSION.tar.gz download http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-$LIBUSB_VERSION/libusb-$LIBUSB_VERSION.tar.bz2/download libusb-$LIBUSB_VERSION.tar.bz2 -mkdir -p $PLATFORM -cd $PLATFORM +mkdir -p "$PLATFORM$EXTENSION" +cd "$PLATFORM$EXTENSION" mkdir -p include lib bin INSTALL_PATH=`pwd` echo "Decompressing archives..." @@ -24,6 +24,12 @@ cd librealsense-$LIBREALSENSE2_VERSION patch -Np1 < ../../../librealsense2.patch || true sedinplace 's/float_t/float/g' `find src/tm2/ -type f` +GPU_FLAGS="-DBUILD_WITH_CUDA=OFF" +if [[ "$EXTENSION" == *gpu ]]; then + GPU_FLAGS="-DBUILD_WITH_CUDA=ON" + GPU_FLAGS="$GPU_FLAGS -DBUILD_WITH_STATIC_CRT=OFF" +fi + case $PLATFORM in linux-armhf) cd ../libusb-$LIBUSB_VERSION @@ -31,7 +37,7 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . + CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . make -j $MAKEJ make install/strip ;; @@ -41,7 +47,7 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . + CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . make -j $MAKEJ make install/strip ;; @@ -51,7 +57,7 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC="gcc -m32" CXX="g++ -m32" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . + CC="gcc -m32" CXX="g++ -m32" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . make -j $MAKEJ make install/strip ;; @@ -61,12 +67,12 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC="gcc -m64" CXX="g++ -m64" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . + CC="gcc -m64" CXX="g++ -m64" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . make -j $MAKEJ make install/strip ;; macosx-x86_64) - "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_MACOSX_RPATH=ON -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . + "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_MACOSX_RPATH=ON -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . make -j $MAKEJ make install/strip install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @rpath/libusb-1.0.0.dylib ../lib/librealsense2.dylib @@ -76,7 +82,7 @@ case $PLATFORM in cd build export CC="cl.exe" export CXX="cl.exe" - "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF .. + "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS .. ninja -j $MAKEJ cd .. cp -a include/* ../include/ @@ -87,7 +93,7 @@ case $PLATFORM in cd build export CC="cl.exe" export CXX="cl.exe" - "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF .. + "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS .. ninja -j $MAKEJ cd .. cp -a include/* ../include/ diff --git a/librealsense2/platform/gpu/pom.xml b/librealsense2/platform/gpu/pom.xml new file mode 100644 index 00000000000..396748b8980 --- /dev/null +++ b/librealsense2/platform/gpu/pom.xml @@ -0,0 +1,151 @@ + + + 4.0.0 + + + org.bytedeco + javacpp-presets + 1.5.6-SNAPSHOT + ../../ + + + org.bytedeco + librealsense2-platform-gpu + 2.44.0-${project.parent.version} + JavaCPP Presets Platform GPU for librealsense2 + + + librealsense2 + -gpu + + + + + org.bytedeco + javacpp-platform + ${project.parent.version} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.linux-armhf} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.linux-arm64} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.linux-x86} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.linux-x86_64} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.macosx-x86_64} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.windows-x86} + + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.windows-x86_64} + + + + + + + maven-jar-plugin + + + default-jar + + + + ${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-armhf-gpu.jar ${javacpp.moduleId}-linux-arm64-gpu.jar ${javacpp.moduleId}-linux-x86-gpu.jar ${javacpp.moduleId}-linux-x86_64-gpu.jar ${javacpp.moduleId}-macosx-x86_64-gpu.jar ${javacpp.moduleId}-windows-x86-gpu.jar ${javacpp.moduleId}-windows-x86_64-gpu.jar + + + + + + empty-javadoc-jar + + jar + + + javadoc + + + + empty-sources-jar + + jar + + + sources + + + + + + org.moditect + moditect-maven-plugin + + + add-module-infos + none + + + add-platform-module-info + package + + add-module-info + + + + + ${project.build.directory}/${project.artifactId}.jar + + module org.bytedeco.${javacpp.moduleId}.platform.gpu { + requires static org.bytedeco.${javacpp.moduleId}.linux.armhf.gpu; + requires static org.bytedeco.${javacpp.moduleId}.linux.arm64.gpu; + requires static org.bytedeco.${javacpp.moduleId}.linux.x86.gpu; + requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64.gpu; + requires static org.bytedeco.${javacpp.moduleId}.macosx.x86_64.gpu; + requires static org.bytedeco.${javacpp.moduleId}.windows.x86.gpu; + requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64.gpu; + } + + + + + + + + + + + diff --git a/librealsense2/pom.xml b/librealsense2/pom.xml index 11110ea0f43..54a6ab1ee25 100644 --- a/librealsense2/pom.xml +++ b/librealsense2/pom.xml @@ -38,8 +38,8 @@ ISO-8859-1 - ${basedir}/cppbuild/${javacpp.platform}/lib/ - ${basedir}/cppbuild/${javacpp.platform}/lib64/ + ${basedir}/cppbuild/${javacpp.platform}${javacpp.platform.extension}/lib/ + ${basedir}/cppbuild/${javacpp.platform}${javacpp.platform.extension}/lib64/ diff --git a/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java b/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java index 89f8750e260..ee56a8a8e61 100644 --- a/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java +++ b/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java @@ -58,7 +58,10 @@ }, link = "realsense2@.2.44" ), - @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/") + @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/"), + @Platform(value = {"linux-armhf", "linux-arm64", "linux-x86", "linux-x86_64", "macosx", "windows-x86", "windows-x86_64"}, + extension = "-gpu" + ) }, target = "org.bytedeco.librealsense2", global = "org.bytedeco.librealsense2.global.realsense2" From d472e2b4b7a6c2f3cfd6b9ee88bdba359b940097 Mon Sep 17 00:00:00 2001 From: n-kai-cj Date: Sat, 17 Apr 2021 11:20:30 +0900 Subject: [PATCH 2/5] modified only linux-x86_64 and windows-x86_64 --- .github/workflows/librealsense2.yml | 18 ++------- librealsense2/cppbuild.sh | 9 ++--- librealsense2/platform/gpu/pom.xml | 40 ++++--------------- .../librealsense2/presets/realsense2.java | 2 +- 4 files changed, 16 insertions(+), 53 deletions(-) diff --git a/.github/workflows/librealsense2.yml b/.github/workflows/librealsense2.yml index dd0a2dbf516..a6d758b2788 100644 --- a/.github/workflows/librealsense2.yml +++ b/.github/workflows/librealsense2.yml @@ -19,25 +19,19 @@ jobs: linux-armhf: runs-on: ubuntu-16.04 container: ubuntu:xenial - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions linux-arm64: runs-on: ubuntu-16.04 container: ubuntu:xenial - strategy: - matrix: - ext: ["", -gpu] + # strategy: + # matrix: + # ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions linux-x86: runs-on: ubuntu-16.04 container: centos:6 - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions linux-x86_64: @@ -50,16 +44,10 @@ jobs: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions macosx-x86_64: runs-on: macos-10.15 - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions windows-x86: runs-on: windows-2019 - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions windows-x86_64: diff --git a/librealsense2/cppbuild.sh b/librealsense2/cppbuild.sh index 332e8baac21..9ca34e1d843 100755 --- a/librealsense2/cppbuild.sh +++ b/librealsense2/cppbuild.sh @@ -27,7 +27,6 @@ sedinplace 's/float_t/float/g' `find src/tm2/ -type f` GPU_FLAGS="-DBUILD_WITH_CUDA=OFF" if [[ "$EXTENSION" == *gpu ]]; then GPU_FLAGS="-DBUILD_WITH_CUDA=ON" - GPU_FLAGS="$GPU_FLAGS -DBUILD_WITH_STATIC_CRT=OFF" fi case $PLATFORM in @@ -37,7 +36,7 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . + CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . make -j $MAKEJ make install/strip ;; @@ -57,7 +56,7 @@ case $PLATFORM in make -j $MAKEJ make install cd ../librealsense-$LIBREALSENSE2_VERSION - CC="gcc -m32" CXX="g++ -m32" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . + CC="gcc -m32" CXX="g++ -m32" "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DLIBUSB_INC=$INSTALL_PATH/include/libusb-1.0/ -DLIBUSB_LIB=$INSTALL_PATH/lib/libusb-1.0.a -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . make -j $MAKEJ make install/strip ;; @@ -72,7 +71,7 @@ case $PLATFORM in make install/strip ;; macosx-x86_64) - "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_MACOSX_RPATH=ON -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS . + "$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DCMAKE_MACOSX_RPATH=ON -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF . make -j $MAKEJ make install/strip install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @rpath/libusb-1.0.0.dylib ../lib/librealsense2.dylib @@ -82,7 +81,7 @@ case $PLATFORM in cd build export CC="cl.exe" export CXX="cl.exe" - "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF $GPU_FLAGS .. + "$CMAKE" -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" -DBUILD_UNIT_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF .. ninja -j $MAKEJ cd .. cp -a include/* ../include/ diff --git a/librealsense2/platform/gpu/pom.xml b/librealsense2/platform/gpu/pom.xml index 396748b8980..c49d3e8da4f 100644 --- a/librealsense2/platform/gpu/pom.xml +++ b/librealsense2/platform/gpu/pom.xml @@ -31,42 +31,18 @@ ${javacpp.moduleId} ${project.version} - - ${project.groupId} - ${javacpp.moduleId} - ${project.version} - ${javacpp.platform.linux-armhf} - - + ${project.groupId} ${javacpp.moduleId} ${project.version} ${javacpp.platform.linux-x86_64} - - ${project.groupId} - ${javacpp.moduleId} - ${project.version} - ${javacpp.platform.macosx-x86_64} - - - ${project.groupId} - ${javacpp.moduleId} - ${project.version} - ${javacpp.platform.windows-x86} - ${project.groupId} ${javacpp.moduleId} @@ -85,7 +61,11 @@ - ${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-armhf-gpu.jar ${javacpp.moduleId}-linux-arm64-gpu.jar ${javacpp.moduleId}-linux-x86-gpu.jar ${javacpp.moduleId}-linux-x86_64-gpu.jar ${javacpp.moduleId}-macosx-x86_64-gpu.jar ${javacpp.moduleId}-windows-x86-gpu.jar ${javacpp.moduleId}-windows-x86_64-gpu.jar + + ${javacpp.moduleId}.jar + + ${javacpp.moduleId}-linux-x86_64-gpu.jar + ${javacpp.moduleId}-windows-x86_64-gpu.jar @@ -130,12 +110,8 @@ ${project.build.directory}/${project.artifactId}.jar module org.bytedeco.${javacpp.moduleId}.platform.gpu { - requires static org.bytedeco.${javacpp.moduleId}.linux.armhf.gpu; - requires static org.bytedeco.${javacpp.moduleId}.linux.arm64.gpu; - requires static org.bytedeco.${javacpp.moduleId}.linux.x86.gpu; + requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64.gpu; - requires static org.bytedeco.${javacpp.moduleId}.macosx.x86_64.gpu; - requires static org.bytedeco.${javacpp.moduleId}.windows.x86.gpu; requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64.gpu; } diff --git a/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java b/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java index ee56a8a8e61..6f0ee63e73d 100644 --- a/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java +++ b/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java @@ -59,7 +59,7 @@ link = "realsense2@.2.44" ), @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/"), - @Platform(value = {"linux-armhf", "linux-arm64", "linux-x86", "linux-x86_64", "macosx", "windows-x86", "windows-x86_64"}, + @Platform(value = {"linux-arm64", "linux-x86_64", "windows-x86_64"}, extension = "-gpu" ) }, From db478711eb0842dffcc007cc0e569f0ae7fcabd6 Mon Sep 17 00:00:00 2001 From: n-kai-cj Date: Sat, 17 Apr 2021 18:25:04 +0900 Subject: [PATCH 3/5] fix --- .github/workflows/librealsense2.yml | 3 --- librealsense2/platform/gpu/pom.xml | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/librealsense2.yml b/.github/workflows/librealsense2.yml index a6d758b2788..d3d16d66381 100644 --- a/.github/workflows/librealsense2.yml +++ b/.github/workflows/librealsense2.yml @@ -24,9 +24,6 @@ jobs: linux-arm64: runs-on: ubuntu-16.04 container: ubuntu:xenial - # strategy: - # matrix: - # ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions linux-x86: diff --git a/librealsense2/platform/gpu/pom.xml b/librealsense2/platform/gpu/pom.xml index c49d3e8da4f..dbf8bff1d35 100644 --- a/librealsense2/platform/gpu/pom.xml +++ b/librealsense2/platform/gpu/pom.xml @@ -31,12 +31,12 @@ ${javacpp.moduleId} ${project.version} - + ${project.groupId} ${javacpp.moduleId} @@ -63,9 +63,10 @@ ${javacpp.moduleId}.jar - + ${javacpp.moduleId}-linux-arm64-gpu.jar ${javacpp.moduleId}-linux-x86_64-gpu.jar - ${javacpp.moduleId}-windows-x86_64-gpu.jar + ${javacpp.moduleId}-windows-x86_64-gpu.jar + @@ -110,7 +111,7 @@ ${project.build.directory}/${project.artifactId}.jar module org.bytedeco.${javacpp.moduleId}.platform.gpu { - + requires static org.bytedeco.${javacpp.moduleId}.linux.arm64.gpu; requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64.gpu; requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64.gpu; } From 326bd4b8f1ab6db00dcf7a6225a96c1ca161426f Mon Sep 17 00:00:00 2001 From: n-kai-cj Date: Tue, 20 Apr 2021 00:31:53 +0900 Subject: [PATCH 4/5] fix workflows indent --- .github/workflows/librealsense2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/librealsense2.yml b/.github/workflows/librealsense2.yml index d3d16d66381..10f0d552f11 100644 --- a/.github/workflows/librealsense2.yml +++ b/.github/workflows/librealsense2.yml @@ -36,7 +36,7 @@ jobs: container: centos:6 strategy: matrix: - ext: ["", -gpu] + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions macosx-x86_64: @@ -51,7 +51,7 @@ jobs: runs-on: windows-2019 strategy: matrix: - ext: ["", -gpu] + ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions redeploy: From 67ca930d7e78624ba6cf35d14e610ec95c5751ff Mon Sep 17 00:00:00 2001 From: n-kai-cj Date: Sun, 8 Jan 2023 01:21:49 +0900 Subject: [PATCH 5/5] remove gpu extension from workflow --- .github/workflows/librealsense2.yml | 6 ------ librealsense2/platform/gpu/pom.xml | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/librealsense2.yml b/.github/workflows/librealsense2.yml index 290ccbabde4..a456dad297f 100644 --- a/.github/workflows/librealsense2.yml +++ b/.github/workflows/librealsense2.yml @@ -35,9 +35,6 @@ jobs: linux-x86_64: runs-on: ubuntu-20.04 container: centos:7 - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions macosx-x86_64: @@ -50,9 +47,6 @@ jobs: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions windows-x86_64: runs-on: windows-2019 - strategy: - matrix: - ext: ["", -gpu] steps: - uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions redeploy: diff --git a/librealsense2/platform/gpu/pom.xml b/librealsense2/platform/gpu/pom.xml index dbf8bff1d35..12feb42722f 100644 --- a/librealsense2/platform/gpu/pom.xml +++ b/librealsense2/platform/gpu/pom.xml @@ -6,13 +6,13 @@ org.bytedeco javacpp-presets - 1.5.6-SNAPSHOT + 1.5.9-SNAPSHOT ../../ org.bytedeco librealsense2-platform-gpu - 2.44.0-${project.parent.version} + 2.50.0-${project.parent.version} JavaCPP Presets Platform GPU for librealsense2