From d49542e33872e0659f0305869a65726197218d8f Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Mon, 30 Mar 2020 12:58:55 +0900 Subject: [PATCH] * Add dependency on presets for `jnijavacpp` and `javacpp-platform` artifact to fix issues at load time (issue bytedeco/javacv#1305) --- CHANGELOG.md | 1 + ale/platform/pom.xml | 5 ++ .../java/org/bytedeco/ale/presets/ale.java | 5 +- arrow/cppbuild.sh | 2 +- arrow/platform/pom.xml | 5 ++ .../org/bytedeco/arrow/presets/arrow.java | 56 ++--------------- artoolkitplus/ARToolKitPlus.patch | 16 ++--- artoolkitplus/platform/pom.xml | 5 ++ artoolkitplus/samples/pom.xml | 4 +- .../artoolkitplus/presets/ARToolKitPlus.java | 5 +- ci/install-travis.sh | 2 +- cpu_features/cpu_features-android.patch | 16 ++--- cpu_features/platform/pom.xml | 5 ++ .../cpu_features/presets/cpu_features.java | 4 +- cpython/platform/pom.xml | 5 ++ .../org/bytedeco/cpython/presets/python.java | 62 ++----------------- cuda/cppbuild.sh | 2 +- cuda/platform/pom.xml | 5 ++ .../org/bytedeco/cuda/presets/cudart.java | 7 ++- dnnl/platform/pom.xml | 5 ++ .../java/org/bytedeco/dnnl/presets/dnnl.java | 55 ++-------------- ffmpeg/platform/pom.xml | 5 ++ .../org/bytedeco/ffmpeg/presets/avutil.java | 4 +- fftw/platform/pom.xml | 5 ++ .../java/org/bytedeco/fftw/presets/fftw3.java | 5 +- flycapture/platform/pom.xml | 5 ++ .../flycapture/presets/FlyCapture2.java | 6 +- hdf5/platform/pom.xml | 5 ++ .../java/org/bytedeco/hdf5/presets/hdf5.java | 43 ++----------- hyperscan/platform/pom.xml | 7 ++- .../bytedeco/hyperscan/presets/hyperscan.java | 2 + leptonica/platform/pom.xml | 5 ++ .../org/bytedeco/leptonica/presets/lept.java | 5 +- libdc1394/platform/pom.xml | 5 ++ .../bytedeco/libdc1394/presets/dc1394.java | 5 +- libfreenect/platform/pom.xml | 5 ++ .../libfreenect/presets/freenect.java | 5 +- libfreenect2/platform/pom.xml | 5 ++ .../libfreenect2/presets/freenect2.java | 44 ++----------- libpostal/platform/pom.xml | 5 ++ .../bytedeco/libpostal/presets/postal.java | 5 +- librealsense/platform/pom.xml | 5 ++ .../librealsense/presets/RealSense.java | 46 ++------------ librealsense2/platform/pom.xml | 5 ++ .../librealsense2/presets/realsense2.java | 46 ++------------ liquidfun/platform/pom.xml | 5 ++ .../bytedeco/liquidfun/presets/liquidfun.java | 5 +- llvm/platform/pom.xml | 5 ++ .../java/org/bytedeco/llvm/presets/LLVM.java | 3 +- mkl-dnn/platform/pom.xml | 5 ++ .../org/bytedeco/mkldnn/presets/mklml.java | 10 +-- mkl/platform/pom.xml | 5 ++ .../java/org/bytedeco/mkl/presets/mkl_rt.java | 3 +- .../org/bytedeco/mxnet/presets/mxnet.java | 2 +- onnx/platform/pom.xml | 5 ++ .../java/org/bytedeco/onnx/presets/onnx.java | 5 +- openblas/platform/pom.xml | 5 ++ .../openblas/presets/openblas_nolapack.java | 3 +- .../bytedeco/opencv/presets/opencv_core.java | 39 +----------- qt/platform/pom.xml | 5 ++ .../java/org/bytedeco/qt/presets/Qt5Core.java | 4 +- skia/platform/pom.xml | 5 ++ .../java/org/bytedeco/skia/presets/Skia.java | 4 +- spinnaker/platform/pom.xml | 5 ++ .../spinnaker/presets/Spinnaker_C.java | 6 +- systems/platform/pom.xml | 5 ++ .../org/bytedeco/systems/presets/linux.java | 5 +- .../org/bytedeco/systems/presets/macosx.java | 5 +- .../org/bytedeco/systems/presets/windows.java | 5 +- .../tensorflow/presets/tensorflow.java | 41 +----------- videoinput/platform/pom.xml | 5 ++ .../videoinput/presets/videoInputLib.java | 5 +- 72 files changed, 291 insertions(+), 459 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95faec07701..8caa141492b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Add dependency on presets for `jnijavacpp` and `javacpp-platform` artifact to fix issues at load time ([issue bytedeco/javacv#1305](https://github.com/bytedeco/javacv/issues/1305)) * Bundle the official Java API of ONNX Runtime via the `jnionnxruntime` library * Add CUDA-enabled build for ONNX Runtime via `-gpu` extension * Fix presets for LLVM 9.0 where libclang would fail to load on Windows ([issue #830](https://github.com/bytedeco/javacpp-presets/issues/830)) diff --git a/ale/platform/pom.xml b/ale/platform/pom.xml index e0dfeef8ee7..37eee9b0a5b 100644 --- a/ale/platform/pom.xml +++ b/ale/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/ale/src/main/java/org/bytedeco/ale/presets/ale.java b/ale/src/main/java/org/bytedeco/ale/presets/ale.java index 655e2fa4e1c..3673b948705 100644 --- a/ale/src/main/java/org/bytedeco/ale/presets/ale.java +++ b/ale/src/main/java/org/bytedeco/ale/presets/ale.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Samuel Audet + * Copyright (C) 2017-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -33,7 +34,7 @@ * * @author Samuel Audet */ -@Properties( +@Properties(inherit = javacpp.class, value = { @Platform(value = {"linux-x86", "macosx", "windows"}, compiler = "cpp11", define = "UNIQUE_PTR_NAMESPACE std", link = "ale", include = {"emucore/m6502/src/bspf/src/bspf.hxx", "emucore/m6502/src/Device.hxx", "emucore/Control.hxx", "emucore/Event.hxx", diff --git a/arrow/cppbuild.sh b/arrow/cppbuild.sh index a24aafc5eac..6be437a89b8 100755 --- a/arrow/cppbuild.sh +++ b/arrow/cppbuild.sh @@ -37,7 +37,7 @@ rm -Rf clang mv cfe-$LLVM_VERSION.src clang cd ../build -sedinplace 's/BOOST_VERSION=1.67.0/BOOST_VERSION=1.70.0/g' ../../apache-arrow-$ARROW_VERSION/cpp/thirdparty/versions.txt +export ARROW_BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/1.70.0/boost_1_70_0.tar.gz COMPONENTS="-DARROW_CSV=ON -DARROW_DATASET=ON -DARROW_FILESYSTEM=ON -DARROW_FLIGHT=ON -DARROW_GANDIVA=ON -DARROW_HDFS=ON -DARROW_JSON=ON -DARROW_ORC=ON -DARROW_PARQUET=ON -DARROW_PLASMA=ON -DARROW_DEPENDENCY_SOURCE=BUNDLED -DARROW_VERBOSE_THIRDPARTY_BUILD=ON -DARROW_USE_GLOG=ON -DARROW_WITH_BROTLI=ON -DARROW_WITH_BZ2=OFF -DARROW_WITH_LZ4=ON -DARROW_WITH_SNAPPY=ON -DARROW_WITH_ZLIB=ON -DARROW_WITH_ZSTD=OFF" diff --git a/arrow/platform/pom.xml b/arrow/platform/pom.xml index 4c93cf76279..541c0ad6298 100644 --- a/arrow/platform/pom.xml +++ b/arrow/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/arrow/src/main/java/org/bytedeco/arrow/presets/arrow.java b/arrow/src/main/java/org/bytedeco/arrow/presets/arrow.java index 2aa2de7ba30..df39ca0d93e 100644 --- a/arrow/src/main/java/org/bytedeco/arrow/presets/arrow.java +++ b/arrow/src/main/java/org/bytedeco/arrow/presets/arrow.java @@ -23,11 +23,10 @@ package org.bytedeco.arrow.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -37,6 +36,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, names = {"linux", "macosx", "windows"}, value = { @Platform( @@ -138,60 +138,13 @@ }, link = "arrow@.16" ), - @Platform( - value = "windows", - preload = {"api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140", "vcomp140"} - ), - @Platform( - value = "windows-x86", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"} - ), - @Platform( - value = "windows-x86_64", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"} - ), }, target = "org.bytedeco.arrow", global = "org.bytedeco.arrow.global.arrow" ) -public class arrow implements LoadEnabled, InfoMapper { +public class arrow implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "arrow"); } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x86\\Microsoft.VC141.OpenMP"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x64\\Microsoft.VC141.OpenMP"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info().enumerate()) .put(new Info("defined(__cplusplus)").define()) @@ -342,10 +295,9 @@ public void map(InfoMap infoMap) { .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesByte")) .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesShort")) .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesInt")) + .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesLong")) .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesFloat")) .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesDouble")) - .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesBoolean")) - .put(new Info("arrow::ArrayData::GetValues").javaNames("GetValuesChar")) .put(new Info("std::shared_ptr").annotations("@SharedPtr").valueTypes("@Cast({\"\", \"std::shared_ptr\"}) Scalar").pointerTypes("Scalar")) .put(new Info("std::shared_ptr").annotations("@SharedPtr").pointerTypes("Field")) diff --git a/artoolkitplus/ARToolKitPlus.patch b/artoolkitplus/ARToolKitPlus.patch index 6e4b5aa35d6..9939d02247f 100644 --- a/artoolkitplus/ARToolKitPlus.patch +++ b/artoolkitplus/ARToolKitPlus.patch @@ -18,10 +18,10 @@ diff -ruN ARToolKitPlus-2.3.1/android-arm64.cmake ARToolKitPlus-2.3.1-patch/andr +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target aarch64-none-linux-android -march=armv8-a) + @@ -49,10 +49,10 @@ diff -ruN ARToolKitPlus-2.3.1/android-arm.cmake ARToolKitPlus-2.3.1-patch/androi +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target armv7-none-linux-androideabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16) + @@ -78,10 +78,10 @@ diff -ruN ARToolKitPlus-2.3.1/android-x86_64.cmake ARToolKitPlus-2.3.1-patch/and +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target x86_64-none-linux-android -march=x86-64 -mtune=atom) + @@ -106,10 +106,10 @@ diff -ruN ARToolKitPlus-2.3.1/android-x86.cmake ARToolKitPlus-2.3.1-patch/androi +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target i686-none-linux-android -march=i686 -mtune=atom -mssse3 -mfpmath=sse) + diff --git a/artoolkitplus/platform/pom.xml b/artoolkitplus/platform/pom.xml index 67174c8915c..20a953f37dc 100644 --- a/artoolkitplus/platform/pom.xml +++ b/artoolkitplus/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/artoolkitplus/samples/pom.xml b/artoolkitplus/samples/pom.xml index c3945776e07..7f01ad24f13 100644 --- a/artoolkitplus/samples/pom.xml +++ b/artoolkitplus/samples/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.bytedeco.artoolkitplus multimain - 1.5.2 + 1.5.3-SNAPSHOT MultiMain @@ -10,7 +10,7 @@ org.bytedeco artoolkitplus-platform - 2.3.1-1.5.2 + 2.3.1-1.5.3-SNAPSHOT diff --git a/artoolkitplus/src/main/java/org/bytedeco/artoolkitplus/presets/ARToolKitPlus.java b/artoolkitplus/src/main/java/org/bytedeco/artoolkitplus/presets/ARToolKitPlus.java index 2d7b27207a3..926c4927d03 100644 --- a/artoolkitplus/src/main/java/org/bytedeco/artoolkitplus/presets/ARToolKitPlus.java +++ b/artoolkitplus/src/main/java/org/bytedeco/artoolkitplus/presets/ARToolKitPlus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2014 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -37,7 +38,7 @@ * * @author Samuel Audet */ -@Properties(target="org.bytedeco.artoolkitplus", global="org.bytedeco.artoolkitplus.global.ARToolKitPlus", value={ +@Properties(inherit=javacpp.class, target="org.bytedeco.artoolkitplus", global="org.bytedeco.artoolkitplus.global.ARToolKitPlus", value={ @Platform(include={"ARToolKitPlus_plus.h", "", "", "", "", "", "", "", "", "", "", diff --git a/ci/install-travis.sh b/ci/install-travis.sh index 7284b50841c..63b3eef6eb5 100755 --- a/ci/install-travis.sh +++ b/ci/install-travis.sh @@ -49,7 +49,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_hom if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ android ]]; then CENTOS_VERSION=6 SCL_ENABLE="devtoolset-7 python27 rh-git29" - if [[ "mxnet hyperscan tensorflow onnx ngraph onnxruntime qt skia " =~ "$PROJ " ]] || [[ "$OS" =~ android ]]; then + if [[ "hyperscan tensorflow onnx ngraph onnxruntime qt skia " =~ "$PROJ " ]] || [[ "$OS" =~ android ]]; then CENTOS_VERSION=7 SCL_ENABLE="devtoolset-7 rh-git218" fi diff --git a/cpu_features/cpu_features-android.patch b/cpu_features/cpu_features-android.patch index 8798bc29099..e8ee3beea08 100644 --- a/cpu_features/cpu_features-android.patch +++ b/cpu_features/cpu_features-android.patch @@ -18,10 +18,10 @@ diff -ruN cpu_features-0.2.0/android-arm64.cmake cpu_features-0.2.0-android/andr +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target aarch64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/arm64-v8a/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target aarch64-none-linux-android -march=armv8-a) + @@ -49,10 +49,10 @@ diff -ruN cpu_features-0.2.0/android-arm.cmake cpu_features-0.2.0-android/androi +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target armv7-none-linux-androideabi -Wl,--fix-cortex-a8 -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/armeabi-v7a/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target armv7-none-linux-androideabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16) + @@ -78,10 +78,10 @@ diff -ruN cpu_features-0.2.0/android-x86_64.cmake cpu_features-0.2.0-android/and +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -static-libstdc++ -lc++_static -lc++abi -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target x86_64-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86_64/ -nostdlib++ -lc++_static -lc++abi -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target x86_64-none-linux-android -march=x86-64 -mtune=atom) + @@ -106,10 +106,10 @@ diff -ruN cpu_features-0.2.0/android-x86.cmake cpu_features-0.2.0-android/androi +set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++") + +set(CMAKE_C_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_LINK_EXECUTABLE " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -lm -lc") -+set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -static-libstdc++ -lc++_static -lc++abi -landroid_support -lm -lc") ++set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -target i686-none-linux-android -Wl,--no-undefined -z text -o -gcc-toolchain $ENV{ANDROID_BIN} --sysroot=$ENV{ANDROID_ROOT} -L$ENV{ANDROID_CPP}/libs/x86/ -nostdlib++ -lc++_static -lc++abi -landroid_support -lm -lc") + +add_definitions(-D__ANDROID_API__=21 -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target i686-none-linux-android -march=i686 -mtune=atom -mssse3 -mfpmath=sse) + diff --git a/cpu_features/platform/pom.xml b/cpu_features/platform/pom.xml index 415f31c1c4c..1c658d8ac1a 100644 --- a/cpu_features/platform/pom.xml +++ b/cpu_features/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/cpu_features/src/main/java/org/bytedeco/cpu_features/presets/cpu_features.java b/cpu_features/src/main/java/org/bytedeco/cpu_features/presets/cpu_features.java index be42a9eb558..e6f35640f1b 100644 --- a/cpu_features/src/main/java/org/bytedeco/cpu_features/presets/cpu_features.java +++ b/cpu_features/src/main/java/org/bytedeco/cpu_features/presets/cpu_features.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Samuel Audet + * Copyright (C) 2019-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -35,6 +36,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( include = { diff --git a/cpython/platform/pom.xml b/cpython/platform/pom.xml index f8f5331e014..1745f1fa256 100644 --- a/cpython/platform/pom.xml +++ b/cpython/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/cpython/src/main/java/org/bytedeco/cpython/presets/python.java b/cpython/src/main/java/org/bytedeco/cpython/presets/python.java index 4b17bb888fe..f65d83f480d 100644 --- a/cpython/src/main/java/org/bytedeco/cpython/presets/python.java +++ b/cpython/src/main/java/org/bytedeco/cpython/presets/python.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Samuel Audet + * Copyright (C) 2018-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -25,12 +25,11 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -40,6 +39,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( cinclude = { @@ -135,44 +135,15 @@ @Platform(value = "linux-x86", preloadpath = {"/usr/lib32/", "/usr/lib/"}), @Platform(value = "linux-x86_64", preloadpath = {"/usr/lib64/", "/usr/lib/"}), @Platform(value = "linux-ppc64", preloadpath = {"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}), - @Platform( - value = "macosx", - link = "python3.7m!" - ), - @Platform( - value = "windows", - link = "python37", - preload = {"api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140", "vcomp140", "python3"} - ), - @Platform( - value = "windows-x86", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"} - ), - @Platform( - value = "windows-x86_64", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"} - ), + @Platform(value = "macosx", link = "python3.7m!"), + @Platform(value = "windows", link = "python37"), }, target = "org.bytedeco.cpython", global = "org.bytedeco.cpython.global.python", helper = "org.bytedeco.cpython.helper.python" ) @NoException -public class python implements LoadEnabled, InfoMapper { +public class python implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "cpython"); } /** Returns {@code Loader.cacheResource("/org/bytedeco/cpython/" + Loader.getPlatform() + "/lib/")}. */ @@ -186,27 +157,6 @@ public static File[] cachePackages() throws IOException { return new File[] {f, new File(f, "python3.7"), new File(f, "python3.7/lib-dynload"), new File(f, "python3.7/site-packages")}; } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x86\\Microsoft.VC141.OpenMP"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x64\\Microsoft.VC141.OpenMP"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info("Python-ast.h").linePatterns("#define Module.*", "int PyAST_Check.*").skip()) diff --git a/cuda/cppbuild.sh b/cuda/cppbuild.sh index d49134cd426..ffab5157604 100755 --- a/cuda/cppbuild.sh +++ b/cuda/cppbuild.sh @@ -8,7 +8,7 @@ if [[ -z "$PLATFORM" ]]; then fi case $PLATFORM in - linux-x86*|linux-ppc*) + linux-*) if [[ ! -d "/usr/local/cuda/" ]]; then echo "Please install CUDA under the default installation directory" exit 1 diff --git a/cuda/platform/pom.xml b/cuda/platform/pom.xml index 2222ceb46fb..697100c1421 100644 --- a/cuda/platform/pom.xml +++ b/cuda/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/cuda/src/main/java/org/bytedeco/cuda/presets/cudart.java b/cuda/src/main/java/org/bytedeco/cuda/presets/cudart.java index 946a6065c34..1c98e5f376f 100644 --- a/cuda/src/main/java/org/bytedeco/cuda/presets/cudart.java +++ b/cuda/src/main/java/org/bytedeco/cuda/presets/cudart.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015-2019 Samuel Audet + * Copyright (C) 2015-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -34,13 +35,13 @@ * * @author Samuel Audet */ -@Properties(names = {"linux-x86_64", "linux-arm64", "linux-ppc64le", "macosx-x86_64", "windows-x86_64"}, value = { +@Properties(inherit = javacpp.class, names = {"linux-x86_64", "linux-arm64", "linux-ppc64le", "macosx-x86_64", "windows-x86_64"}, value = { @Platform(include = {"", "", "", "", "", "", "", "", "", "", "", /*"", "*/ "", "", "cuda_fp16.hpp", ""}, compiler = "cpp11", exclude = "", includepath = "/usr/local/cuda-10.2/include/", link = {"cudart@.10.2", "cuda@.1#"}, linkpath = "/usr/local/cuda-10.2/lib/"), - @Platform(value = {"linux-x86_64", "linux-ppc64le"}, linkpath = "/usr/local/cuda-10.2/lib64/"), + @Platform(value = {"linux-x86_64", "linux-arm64", "linux-ppc64le"}, linkpath = "/usr/local/cuda-10.2/lib64/"), @Platform(value = "macosx-x86_64", includepath = "/Developer/NVIDIA/CUDA-10.2/include/", linkpath = {"/Developer/NVIDIA/CUDA-10.2/lib/", "/usr/local/cuda/lib/"}), @Platform(value = "windows-x86_64", preload = "cudart64_102", diff --git a/dnnl/platform/pom.xml b/dnnl/platform/pom.xml index b0558274359..3286a83df38 100644 --- a/dnnl/platform/pom.xml +++ b/dnnl/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/dnnl/src/main/java/org/bytedeco/dnnl/presets/dnnl.java b/dnnl/src/main/java/org/bytedeco/dnnl/presets/dnnl.java index 13933ef587f..a59657ab7ea 100644 --- a/dnnl/src/main/java/org/bytedeco/dnnl/presets/dnnl.java +++ b/dnnl/src/main/java/org/bytedeco/dnnl/presets/dnnl.java @@ -23,10 +23,10 @@ package org.bytedeco.dnnl.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; +import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,6 +36,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( value = {"linux-x86_64", "macosx-x86_64", "windows-x86_64"}, @@ -44,58 +45,12 @@ include = {"dnnl_types.h", "dnnl_config.h", /*"dnnl_debug.h",*/ "dnnl_version.h", "dnnl.h", "dnnl.hpp"}, link = "dnnl@.1", preload = {"gomp@.1", "iomp5"}, resource = {"include", "lib"} ), - @Platform( - value = "windows", - preload = {"api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140", "vcomp140"} - ), - @Platform( - value = "windows-x86", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"} - ), - @Platform( - value = "windows-x86_64", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"} - ), }, target = "org.bytedeco.dnnl", global = "org.bytedeco.dnnl.global.dnnl" ) -public class dnnl implements LoadEnabled, InfoMapper { - - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x86\\Microsoft.VC141.OpenMP"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x64\\Microsoft.VC141.OpenMP"); - break; - default: - // not Windows - } - } - } +public class dnnl implements InfoMapper { + static { Loader.checkVersion("org.bytedeco", "dnnl"); } public void map(InfoMap infoMap) { infoMap.put(new Info().enumerate()) diff --git a/ffmpeg/platform/pom.xml b/ffmpeg/platform/pom.xml index c5d96801dd4..b611f81f23e 100644 --- a/ffmpeg/platform/pom.xml +++ b/ffmpeg/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java index 7a59e4a7e1d..06efd4c25ec 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2019 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -27,6 +27,7 @@ import org.bytedeco.javacpp.annotation.Name; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,6 +37,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, target = "org.bytedeco.ffmpeg.avutil", global = "org.bytedeco.ffmpeg.global.avutil", value = { diff --git a/fftw/platform/pom.xml b/fftw/platform/pom.xml index dd36c1f6997..cafc405e09f 100644 --- a/fftw/platform/pom.xml +++ b/fftw/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/fftw/src/main/java/org/bytedeco/fftw/presets/fftw3.java b/fftw/src/main/java/org/bytedeco/fftw/presets/fftw3.java index c1521aa77b0..43cade84fed 100644 --- a/fftw/src/main/java/org/bytedeco/fftw/presets/fftw3.java +++ b/fftw/src/main/java/org/bytedeco/fftw/presets/fftw3.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Samuel Audet + * Copyright (C) 2014-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -34,7 +35,7 @@ * * @author Samuel Audet */ -@Properties(global = "org.bytedeco.fftw.global.fftw3", value = { +@Properties(inherit = javacpp.class, global = "org.bytedeco.fftw.global.fftw3", value = { @Platform(include = "", link = {"fftw3@.3", "fftw3f@.3"}), @Platform(value = "android", link = {"fftw3", "fftw3f"}), @Platform(value = "windows", preload = {"libfftw3-3", "libfftw3f-3"}) }) diff --git a/flycapture/platform/pom.xml b/flycapture/platform/pom.xml index 009f17bff3e..2a1cafadbe9 100644 --- a/flycapture/platform/pom.xml +++ b/flycapture/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/flycapture/src/main/java/org/bytedeco/flycapture/presets/FlyCapture2.java b/flycapture/src/main/java/org/bytedeco/flycapture/presets/FlyCapture2.java index 1a124e18fd3..12200cd63f4 100644 --- a/flycapture/src/main/java/org/bytedeco/flycapture/presets/FlyCapture2.java +++ b/flycapture/src/main/java/org/bytedeco/flycapture/presets/FlyCapture2.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2017 Samuel Audet, Jarek Sacha + * Copyright (C) 2014-2020 Samuel Audet, Jarek Sacha * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -41,7 +42,8 @@ * * @author Jarek Sacha */ -@Properties(target = "org.bytedeco.flycapture.FlyCapture2", +@Properties(inherit = javacpp.class, + target = "org.bytedeco.flycapture.FlyCapture2", global = "org.bytedeco.flycapture.global.FlyCapture2", value = { @Platform(value = {"linux-x86", "linux-arm", "windows"}, include = {"", "", diff --git a/hdf5/platform/pom.xml b/hdf5/platform/pom.xml index d5409e7ec65..ee3d2cbec70 100644 --- a/hdf5/platform/pom.xml +++ b/hdf5/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/hdf5/src/main/java/org/bytedeco/hdf5/presets/hdf5.java b/hdf5/src/main/java/org/bytedeco/hdf5/presets/hdf5.java index c04a74da599..cc0691bb0fc 100644 --- a/hdf5/src/main/java/org/bytedeco/hdf5/presets/hdf5.java +++ b/hdf5/src/main/java/org/bytedeco/hdf5/presets/hdf5.java @@ -23,11 +23,10 @@ package org.bytedeco.hdf5.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,7 +35,7 @@ * * @author Samuel Audet */ -@Properties(target = "org.bytedeco.hdf5", global = "org.bytedeco.hdf5.global.hdf5", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.hdf5", global = "org.bytedeco.hdf5.global.hdf5", value = { @Platform(value = {"linux", "macosx", "windows"}, define = {"GENERIC_EXCEPTION_CLASS H5::Exception", "GENERIC_EXCEPTION_TOSTRING getCDetailMsg()"}, include = {"H5pubconf.h", /* "H5version.h", */ "H5public.h", "H5Cpublic.h", "H5Ipublic.h", @@ -50,44 +49,10 @@ "H5FaccProp.h", "H5FcreatProp.h", "H5AtomType.h", "H5PredType.h", "H5EnumType.h", "H5IntType.h", "H5FloatType.h", "H5StrType.h", "H5CompType.h", "H5ArrayType.h", "H5VarLenType.h", "H5DataSet.h", "H5Group.h", "H5File.h", "H5Library.h"}, link = {"hdf5@.200", "hdf5_cpp@.200", "hdf5_hl@.200", "hdf5_hl_cpp@.200"}, resource = {"include", "lib"}), - @Platform(value = "windows", link = {"zlibstatic", "libhdf5", "libhdf5_cpp", "libhdf5_hl", "libhdf5_hl_cpp"}, preload = { - "api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140"}), - @Platform(value = "windows-x86", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"}), - @Platform(value = "windows-x86_64", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}) }) -public class hdf5 implements LoadEnabled, InfoMapper { + @Platform(value = "windows", link = {"zlibstatic", "libhdf5", "libhdf5_cpp", "libhdf5_hl", "libhdf5_hl_cpp"}) }) +public class hdf5 implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "hdf5"); } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info("H5_DLL", "H5_DLLVAR", "H5_HLDLL", "H5_DLLCPP", "H5CHECK", "H5OPEN", "H5E_ERR_CLS", "H5E_BEGIN_TRY", "H5E_END_TRY", "H5G_link_t", "H5std_string", "H5O_TOKEN_UNDEF").cppTypes().annotations()) diff --git a/hyperscan/platform/pom.xml b/hyperscan/platform/pom.xml index fbabc053ea8..404e990a91c 100644 --- a/hyperscan/platform/pom.xml +++ b/hyperscan/platform/pom.xml @@ -19,6 +19,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} @@ -112,4 +117,4 @@ - \ No newline at end of file + diff --git a/hyperscan/src/main/java/org/bytedeco/hyperscan/presets/hyperscan.java b/hyperscan/src/main/java/org/bytedeco/hyperscan/presets/hyperscan.java index 840ddee0f72..c774287a3fa 100644 --- a/hyperscan/src/main/java/org/bytedeco/hyperscan/presets/hyperscan.java +++ b/hyperscan/src/main/java/org/bytedeco/hyperscan/presets/hyperscan.java @@ -25,11 +25,13 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @Properties( + inherit = javacpp.class, value = { @Platform( value = {"linux-x86_64", "macosx-x86_64", "windows-x86_64"}, diff --git a/leptonica/platform/pom.xml b/leptonica/platform/pom.xml index 6eda38f757b..0cf2403b214 100644 --- a/leptonica/platform/pom.xml +++ b/leptonica/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/leptonica/src/main/java/org/bytedeco/leptonica/presets/lept.java b/leptonica/src/main/java/org/bytedeco/leptonica/presets/lept.java index ea3329a26ed..6dc65162fc5 100644 --- a/leptonica/src/main/java/org/bytedeco/leptonica/presets/lept.java +++ b/leptonica/src/main/java/org/bytedeco/leptonica/presets/lept.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2018 Samuel Audet + * Copyright (C) 2014-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -34,7 +35,7 @@ * * @author Samuel Audet */ -@Properties(target = "org.bytedeco.leptonica", global = "org.bytedeco.leptonica.global.lept", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.leptonica", global = "org.bytedeco.leptonica.global.lept", value = { @Platform(include = {"leptonica/alltypes.h", "leptonica/environ.h", "leptonica/array.h", "leptonica/bbuffer.h", "leptonica/heap.h", "leptonica/list.h", "leptonica/ptra.h", "leptonica/queue.h", "leptonica/rbtree.h", "leptonica/stack.h", "leptonica/arrayaccess.h", "leptonica/bmf.h", "leptonica/ccbord.h", "leptonica/dewarp.h", "leptonica/gplot.h", "leptonica/imageio.h", "leptonica/jbclass.h", "leptonica/morph.h", "leptonica/pix.h", diff --git a/libdc1394/platform/pom.xml b/libdc1394/platform/pom.xml index 4bbe4711fe5..e05571866fb 100644 --- a/libdc1394/platform/pom.xml +++ b/libdc1394/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/libdc1394/src/main/java/org/bytedeco/libdc1394/presets/dc1394.java b/libdc1394/src/main/java/org/bytedeco/libdc1394/presets/dc1394.java index cb4433a4fb1..0f5ee10b5bc 100644 --- a/libdc1394/src/main/java/org/bytedeco/libdc1394/presets/dc1394.java +++ b/libdc1394/src/main/java/org/bytedeco/libdc1394/presets/dc1394.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2016 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -38,7 +39,7 @@ * * @author Samuel Audet */ -@Properties(target = "org.bytedeco.libdc1394", global = "org.bytedeco.libdc1394.global.dc1394", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.libdc1394", global = "org.bytedeco.libdc1394.global.dc1394", value = { @Platform(not = "android", include = {"", "", "", "", "", "", "", "", "", "", "", "", ""}, link = "dc1394@.25"), diff --git a/libfreenect/platform/pom.xml b/libfreenect/platform/pom.xml index 66cf504c9bd..eab305ec1e9 100644 --- a/libfreenect/platform/pom.xml +++ b/libfreenect/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/libfreenect/src/main/java/org/bytedeco/libfreenect/presets/freenect.java b/libfreenect/src/main/java/org/bytedeco/libfreenect/presets/freenect.java index a9d4bade306..bde54076ee7 100644 --- a/libfreenect/src/main/java/org/bytedeco/libfreenect/presets/freenect.java +++ b/libfreenect/src/main/java/org/bytedeco/libfreenect/presets/freenect.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2014 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -27,6 +27,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -35,7 +36,7 @@ * * @author Samuel Audet */ -@Properties(target = "org.bytedeco.libfreenect", global = "org.bytedeco.libfreenect.global.freenect", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.libfreenect", global = "org.bytedeco.libfreenect.global.freenect", value = { @Platform(not = "android", include = {"", "", /*"",*/ ""}, link = {"freenect@0.5", "freenect_sync@0.5"}), diff --git a/libfreenect2/platform/pom.xml b/libfreenect2/platform/pom.xml index be5258c7e8e..56029d3cfc0 100644 --- a/libfreenect2/platform/pom.xml +++ b/libfreenect2/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/libfreenect2/src/main/java/org/bytedeco/libfreenect2/presets/freenect2.java b/libfreenect2/src/main/java/org/bytedeco/libfreenect2/presets/freenect2.java index f6fb87e1d8c..276c92b8918 100644 --- a/libfreenect2/src/main/java/org/bytedeco/libfreenect2/presets/freenect2.java +++ b/libfreenect2/src/main/java/org/bytedeco/libfreenect2/presets/freenect2.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Jérémy Laviole + * Copyright (C) 2016-2020 Jérémy Laviole, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -22,11 +22,10 @@ package org.bytedeco.libfreenect2.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -35,48 +34,15 @@ * * @author Jeremy Laviole */ -@Properties(target = "org.bytedeco.libfreenect2", global = "org.bytedeco.libfreenect2.global.freenect2", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.libfreenect2", global = "org.bytedeco.libfreenect2.global.freenect2", value = { @Platform(value = {"linux-x86", "macosx-x86_64", "windows-x86_64"}, include = {"", "", "", "", "", "", ""}, link = "freenect2@.0.2"), - @Platform(value = "macosx-x86_64", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/"), - @Platform(value = "windows-x86_64", preload = { - "api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140", "libusb-1.0", "glfw3", "turbojpeg", "freenect2-openni2"}, - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}) }) -public class freenect2 implements LoadEnabled, InfoMapper { + @Platform(value = "macosx-x86_64", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/") }) +public class freenect2 implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "libfreenect2"); } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info("LIBFREENECT2_WITH_CUDA_SUPPORT", "LIBFREENECT2_WITH_OPENCL_SUPPORT").define(false)) .put(new Info("libfreenect2::Frame::Type").valueTypes("@Cast(\"libfreenect2::Frame::Type\") int")) diff --git a/libpostal/platform/pom.xml b/libpostal/platform/pom.xml index c9fa4a53d1d..a2de8619735 100644 --- a/libpostal/platform/pom.xml +++ b/libpostal/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/libpostal/src/main/java/org/bytedeco/libpostal/presets/postal.java b/libpostal/src/main/java/org/bytedeco/libpostal/presets/postal.java index a2959394e18..593187b0682 100644 --- a/libpostal/src/main/java/org/bytedeco/libpostal/presets/postal.java +++ b/libpostal/src/main/java/org/bytedeco/libpostal/presets/postal.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Maurice Betzel, Samuel Audet + * Copyright (C) 2018-2020 Maurice Betzel, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -33,6 +34,7 @@ * @author Maurice Betzel, Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( value = {"linux-x86_64", "macosx-x86_64", "windows-x86_64"}, @@ -52,5 +54,4 @@ public void map(InfoMap infoMap) { .put(new Info("libpostal_normalized_tokens").skip()) .put(new Info("char").cast().valueTypes("byte").pointerTypes("BytePointer", "String")); } - } diff --git a/librealsense/platform/pom.xml b/librealsense/platform/pom.xml index 99a1e710144..5c9c6344124 100644 --- a/librealsense/platform/pom.xml +++ b/librealsense/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/librealsense/src/main/java/org/bytedeco/librealsense/presets/RealSense.java b/librealsense/src/main/java/org/bytedeco/librealsense/presets/RealSense.java index e244aac61fc..88f5d9b1cea 100644 --- a/librealsense/src/main/java/org/bytedeco/librealsense/presets/RealSense.java +++ b/librealsense/src/main/java/org/bytedeco/librealsense/presets/RealSense.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Jérémy Laviole, Samuel Audet + * Copyright (C) 2016-2020 Jérémy Laviole, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -22,15 +22,14 @@ package org.bytedeco.librealsense.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; import org.bytedeco.javacpp.FunctionPointer; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.ByVal; import org.bytedeco.javacpp.annotation.Cast; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -39,49 +38,14 @@ * * @author Jérémy Laviole */ -@Properties(target = "org.bytedeco.librealsense", global = "org.bytedeco.librealsense.global.RealSense", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.librealsense", global = "org.bytedeco.librealsense.global.RealSense", value = { @Platform(value = {"linux-x86", "macosx-x86", "windows-x86"}, compiler = "cpp11", include = {"", "", "", ""}, link = "realsense@.1"), - @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/"), - @Platform(value = "windows", preload = { - "api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140"}), - @Platform(value = "windows-x86", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"}), - @Platform(value = "windows-x86_64", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}) }) -public class RealSense implements LoadEnabled, InfoMapper { + @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/") }) +public class RealSense implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "librealsense"); } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info("std::runtime_error").cast().pointerTypes("Pointer")) .put(new Info("std::timed_mutex").cast().pointerTypes("Pointer")) diff --git a/librealsense2/platform/pom.xml b/librealsense2/platform/pom.xml index e5c6b496d64..c3c0d8b0154 100644 --- a/librealsense2/platform/pom.xml +++ b/librealsense2/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} 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 0e238dff4ad..c11a67c1578 100644 --- a/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java +++ b/librealsense2/src/main/java/org/bytedeco/librealsense2/presets/realsense2.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Samuel Audet + * Copyright (C) 2019-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -22,11 +22,10 @@ package org.bytedeco.librealsense2.presets; import java.util.List; -import org.bytedeco.javacpp.ClassProperties; -import org.bytedeco.javacpp.LoadEnabled; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,6 +35,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( value = {"linux-x86", "macosx-x86", "windows-x86"}, @@ -58,53 +58,17 @@ }, link = "realsense2@.2.29" ), - @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/"), - @Platform(value = "windows", preload = { - "api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140"}), - @Platform(value = "windows-x86", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"}), - @Platform(value = "windows-x86_64", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}) + @Platform(value = "macosx", preload = "usb-1.0@.0", preloadpath = "/usr/local/lib/") }, target = "org.bytedeco.librealsense2", global = "org.bytedeco.librealsense2.global.realsense2" ) -public class realsense2 implements LoadEnabled, InfoMapper { +public class realsense2 implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "librealsense2"); } - @Override public void init(ClassProperties properties) { - String platform = properties.getProperty("platform"); - List preloadpaths = properties.get("platform.preloadpath"); - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - break; - default: - // not Windows - } - } - } - public void map(InfoMap infoMap) { infoMap.put(new Info("rs2_camera_info", "rs2_stream").cast().valueTypes("int").pointerTypes("IntPointer", "IntBuffer", "int[]")) .put(new Info("RS2_API_VERSION_STR").cppTypes("const char*").pointerTypes("String").translate(false)) .put(new Info("rs2_create_playback_device").skip()); } - } diff --git a/liquidfun/platform/pom.xml b/liquidfun/platform/pom.xml index 9ac7b7e67e9..6f6c5198fb6 100644 --- a/liquidfun/platform/pom.xml +++ b/liquidfun/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/liquidfun/src/main/java/org/bytedeco/liquidfun/presets/liquidfun.java b/liquidfun/src/main/java/org/bytedeco/liquidfun/presets/liquidfun.java index e730c69c956..6981dc3f7b0 100644 --- a/liquidfun/src/main/java/org/bytedeco/liquidfun/presets/liquidfun.java +++ b/liquidfun/src/main/java/org/bytedeco/liquidfun/presets/liquidfun.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Felix Andrews + * Copyright (C) 2016-2020 Felix Andrews, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -33,7 +34,7 @@ * @author Felix Andrews */ -@Properties(target = "org.bytedeco.liquidfun", global = "org.bytedeco.liquidfun.global.liquidfun", value = { +@Properties(inherit = javacpp.class, target = "org.bytedeco.liquidfun", global = "org.bytedeco.liquidfun.global.liquidfun", value = { @Platform(value = {"linux-x86", "macosx", "windows-x86"}, define = "LIQUIDFUN_EXTERNAL_LANGUAGE_API 1", include = {"", diff --git a/llvm/platform/pom.xml b/llvm/platform/pom.xml index 5a176c12d56..37816b30df1 100644 --- a/llvm/platform/pom.xml +++ b/llvm/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/llvm/src/main/java/org/bytedeco/llvm/presets/LLVM.java b/llvm/src/main/java/org/bytedeco/llvm/presets/LLVM.java index 3b1fd5d4ea5..c83512395ab 100644 --- a/llvm/src/main/java/org/bytedeco/llvm/presets/LLVM.java +++ b/llvm/src/main/java/org/bytedeco/llvm/presets/LLVM.java @@ -24,9 +24,10 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.*; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.*; -@Properties(target = "org.bytedeco.llvm.LLVM", global = "org.bytedeco.llvm.global.LLVM", value = {@Platform( +@Properties(inherit = javacpp.class, target = "org.bytedeco.llvm.LLVM", global = "org.bytedeco.llvm.global.LLVM", value = {@Platform( value = {"linux", "macosx", "windows"}, define = {"__STDC_LIMIT_MACROS", "__STDC_CONSTANT_MACROS"}, include = {"", "", "", "", "", "", "", "", "", "", "", "", "", diff --git a/mkl-dnn/platform/pom.xml b/mkl-dnn/platform/pom.xml index 61c8f48f29b..6b843f35a16 100644 --- a/mkl-dnn/platform/pom.xml +++ b/mkl-dnn/platform/pom.xml @@ -21,6 +21,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/mkl-dnn/src/main/java/org/bytedeco/mkldnn/presets/mklml.java b/mkl-dnn/src/main/java/org/bytedeco/mkldnn/presets/mklml.java index 319f0997960..ab61185ea97 100644 --- a/mkl-dnn/src/main/java/org/bytedeco/mkldnn/presets/mklml.java +++ b/mkl-dnn/src/main/java/org/bytedeco/mkldnn/presets/mklml.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Samuel Audet + * Copyright (C) 2018-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -23,12 +23,13 @@ package org.bytedeco.mkldnn.presets; import java.util.List; -import org.bytedeco.javacpp.annotation.NoException; -import org.bytedeco.javacpp.annotation.Platform; -import org.bytedeco.javacpp.annotation.Properties; import org.bytedeco.javacpp.ClassProperties; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.LoadEnabled; +import org.bytedeco.javacpp.annotation.NoException; +import org.bytedeco.javacpp.annotation.Platform; +import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -38,6 +39,7 @@ * @author Samuel Audet */ @Properties( + inherit = javacpp.class, value = { @Platform( value = {"linux-x86_64", "macosx-x86_64", "windows-x86_64"}, diff --git a/mkl/platform/pom.xml b/mkl/platform/pom.xml index 8e9575aae5b..f9de0018a79 100644 --- a/mkl/platform/pom.xml +++ b/mkl/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/mkl/src/main/java/org/bytedeco/mkl/presets/mkl_rt.java b/mkl/src/main/java/org/bytedeco/mkl/presets/mkl_rt.java index e00fd5dc1a0..47ffe66eae4 100644 --- a/mkl/src/main/java/org/bytedeco/mkl/presets/mkl_rt.java +++ b/mkl/src/main/java/org/bytedeco/mkl/presets/mkl_rt.java @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -34,7 +35,7 @@ * * @author Samuel Audet */ -@Properties(global = "org.bytedeco.mkl.global.mkl_rt", names = {"linux-x86", "macosx-x86", "windows-x86"}, value = { +@Properties(inherit = javacpp.class, global = "org.bytedeco.mkl.global.mkl_rt", names = {"linux-x86", "macosx-x86", "windows-x86"}, value = { @Platform(include = {"mkl.h", "mkl_version.h", "mkl_types.h", /*"mkl_blas.h",*/ "mkl_trans.h", "mkl_cblas.h", "mkl_spblas.h", /*"mkl_lapack.h",*/ "mkl_lapacke.h", "mkl_dss.h", "mkl_pardiso.h", "mkl_sparse_handle.h", "mkl_service.h", "mkl_rci.h", "mkl_vml.h", "mkl_vml_defines.h", "mkl_vml_types.h", "mkl_vml_functions.h", "mkl_vsl.h", "mkl_vsl_defines.h", "mkl_vsl_types.h", "mkl_vsl_functions.h", "mkl_df.h", "mkl_df_defines.h", "mkl_df_types.h", "mkl_df_functions.h", diff --git a/mxnet/src/main/java/org/bytedeco/mxnet/presets/mxnet.java b/mxnet/src/main/java/org/bytedeco/mxnet/presets/mxnet.java index 5153d8cab0f..714fb9155f2 100644 --- a/mxnet/src/main/java/org/bytedeco/mxnet/presets/mxnet.java +++ b/mxnet/src/main/java/org/bytedeco/mxnet/presets/mxnet.java @@ -65,7 +65,7 @@ public class mxnet implements LoadEnabled, InfoMapper { // Only apply this at load time since we don't want to copy the MKL or CUDA libraries here if (Loader.isLoadLibraries()) { - List l = Arrays.asList("iomp5", "libiomp5md", "mklml", "mklml_intel"); + List l = Arrays.asList("gomp@.1", "iomp5", "libiomp5md", "mklml", "mklml_intel"); if (!preloads.containsAll(l)) { preloads.addAll(0, l); } diff --git a/onnx/platform/pom.xml b/onnx/platform/pom.xml index a24a320d40a..83959d02cb7 100644 --- a/onnx/platform/pom.xml +++ b/onnx/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java b/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java index cc704e8dfe1..e4ecb72b1de 100644 --- a/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java +++ b/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Alexander Merritt, Samuel Audet + * Copyright (C) 2018-2020 Alexander Merritt, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -23,12 +23,13 @@ package org.bytedeco.onnx.presets; import org.bytedeco.javacpp.annotation.*; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.*; import org.bytedeco.javacpp.FunctionPointer; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.Pointer; -@Properties(target = "org.bytedeco.onnx", global = "org.bytedeco.onnx.global.onnx", value = {@Platform( +@Properties(inherit = javacpp.class, target = "org.bytedeco.onnx", global = "org.bytedeco.onnx.global.onnx", value = {@Platform( value = {"linux", "macosx"}, define = {"ONNX_NAMESPACE onnx", "ONNX_USE_LITE_PROTO", "ONNX_ML 1", "SHARED_PTR_NAMESPACE std", "UNIQUE_PTR_NAMESPACE std"}, compiler = "cpp11", diff --git a/openblas/platform/pom.xml b/openblas/platform/pom.xml index ea1e65a3027..62f83255486 100644 --- a/openblas/platform/pom.xml +++ b/openblas/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/openblas/src/main/java/org/bytedeco/openblas/presets/openblas_nolapack.java b/openblas/src/main/java/org/bytedeco/openblas/presets/openblas_nolapack.java index ac60d6b3555..24e05588393 100644 --- a/openblas/src/main/java/org/bytedeco/openblas/presets/openblas_nolapack.java +++ b/openblas/src/main/java/org/bytedeco/openblas/presets/openblas_nolapack.java @@ -31,6 +31,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -39,7 +40,7 @@ * * @author Samuel Audet */ -@Properties(global = "org.bytedeco.openblas.global.openblas_nolapack", value = { +@Properties(inherit = javacpp.class, global = "org.bytedeco.openblas.global.openblas_nolapack", value = { @Platform(define = {"__OPENBLAS 1", "LAPACK_COMPLEX_CPP"}, include = {"openblas_config.h", "cblas.h"}, link = "openblas_nolapack@.0", resource = {"include", "lib"}, diff --git a/opencv/src/main/java/org/bytedeco/opencv/presets/opencv_core.java b/opencv/src/main/java/org/bytedeco/opencv/presets/opencv_core.java index 9cb6d58da1e..343dc23772a 100644 --- a/opencv/src/main/java/org/bytedeco/opencv/presets/opencv_core.java +++ b/opencv/src/main/java/org/bytedeco/opencv/presets/opencv_core.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2019 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ "", "", "", "", "", "", "", "", "opencv_adapters.h"}, link = {"opencv_core@.4.2", "opencv_imgproc@.4.2"}, resource = {"include", "lib", "sdk", "share", "x86", "x64", "OpenCVConfig.cmake", "OpenCVConfig-version.cmake", "python"}, linkresource = "lib", - preload = {"gomp@.1", "opencv_cudev@.4.2"}, compiler = "cpp11"), + preload = {"opencv_cudev@.4.2"}, compiler = "cpp11"), @Platform(value = "android", preload = ""), @Platform(value = "ios", preload = {"liblibjpeg", "liblibpng", "liblibprotobuf", "liblibwebp", "libzlib", "libopencv_core"}), @Platform(value = "linux", preloadpath = {"/usr/lib/", "/usr/lib32/", "/usr/lib64/"}), @@ -68,24 +68,7 @@ @Platform(value = "linux-x86", preloadpath = {"/usr/lib32/", "/usr/lib/"}), @Platform(value = "linux-x86_64", preloadpath = {"/usr/lib64/", "/usr/lib/"}), @Platform(value = "linux-ppc64", preloadpath = {"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}), - @Platform(value = "windows", define = "_WIN32_WINNT 0x0502", link = {"opencv_core420", "opencv_imgproc420"}, preload = { - "api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "vcruntime140", "msvcp140", "concrt140", "vcomp140", "opencv_cudev420"}), - @Platform(value = "windows-x86", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"}), - @Platform(value = "windows-x86_64", preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}), + @Platform(value = "windows", define = "_WIN32_WINNT 0x0502", link = {"opencv_core420", "opencv_imgproc420"}, preload = {"opencv_cudev420"}), @Platform(value = {"linux-arm64", "linux-ppc64le", "linux-x86_64", "macosx-x86_64", "windows-x86_64"}, extension = "-gpu")}, target = "org.bytedeco.opencv.opencv_core", global = "org.bytedeco.opencv.global.opencv_core", @@ -129,22 +112,6 @@ public class opencv_core implements LoadEnabled, InfoMapper { if (i > 0) { resources.add("/org/bytedeco/cuda/"); } - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x86\\Microsoft.VC141.OpenMP"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x64\\Microsoft.VC141.OpenMP"); - break; - default: - // not Windows - } - } } public void map(InfoMap infoMap) { diff --git a/qt/platform/pom.xml b/qt/platform/pom.xml index 81bb3a48ee5..954c191d2c0 100644 --- a/qt/platform/pom.xml +++ b/qt/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/qt/src/main/java/org/bytedeco/qt/presets/Qt5Core.java b/qt/src/main/java/org/bytedeco/qt/presets/Qt5Core.java index e313be468ca..bf10378043f 100644 --- a/qt/src/main/java/org/bytedeco/qt/presets/Qt5Core.java +++ b/qt/src/main/java/org/bytedeco/qt/presets/Qt5Core.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Greg Hart, Samuel Audet + * Copyright (C) 2019-2020 Greg Hart, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -27,10 +27,12 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; @Properties( + inherit = javacpp.class, target = "org.bytedeco.qt.Qt5Core", global = "org.bytedeco.qt.global.Qt5Core", helper = "org.bytedeco.qt.helper.Qt5Core", diff --git a/skia/platform/pom.xml b/skia/platform/pom.xml index 10912cde07d..432430e1c83 100644 --- a/skia/platform/pom.xml +++ b/skia/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/skia/src/main/java/org/bytedeco/skia/presets/Skia.java b/skia/src/main/java/org/bytedeco/skia/presets/Skia.java index 269c0dcd0fa..28b0a608e72 100644 --- a/skia/src/main/java/org/bytedeco/skia/presets/Skia.java +++ b/skia/src/main/java/org/bytedeco/skia/presets/Skia.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Jeremy Apthorp + * Copyright (C) 2017-2020 Jeremy Apthorp, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -24,9 +24,11 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.*; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.*; @Properties( + inherit = javacpp.class, target = "org.bytedeco.skia", global = "org.bytedeco.skia.global.Skia", value = { diff --git a/spinnaker/platform/pom.xml b/spinnaker/platform/pom.xml index ca29932cd74..1178c1e8ac3 100644 --- a/spinnaker/platform/pom.xml +++ b/spinnaker/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/spinnaker/src/main/java/org/bytedeco/spinnaker/presets/Spinnaker_C.java b/spinnaker/src/main/java/org/bytedeco/spinnaker/presets/Spinnaker_C.java index 927c3d8c780..817eab71c0a 100644 --- a/spinnaker/src/main/java/org/bytedeco/spinnaker/presets/Spinnaker_C.java +++ b/spinnaker/src/main/java/org/bytedeco/spinnaker/presets/Spinnaker_C.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2017 Samuel Audet, Jarek Sacha + * Copyright (C) 2014-2020 Samuel Audet, Jarek Sacha * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -35,7 +36,8 @@ * * @author Jarek Sacha */ -@Properties(target = "org.bytedeco.spinnaker.Spinnaker_C", +@Properties(inherit = javacpp.class, + target = "org.bytedeco.spinnaker.Spinnaker_C", global = "org.bytedeco.spinnaker.global.Spinnaker_C", value = { @Platform(value = {"linux-x86_64", "linux-arm64", "windows"}, include = {"", diff --git a/systems/platform/pom.xml b/systems/platform/pom.xml index e796c2111eb..c6d807d031e 100644 --- a/systems/platform/pom.xml +++ b/systems/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/systems/src/main/java/org/bytedeco/systems/presets/linux.java b/systems/src/main/java/org/bytedeco/systems/presets/linux.java index 444db13eb38..b93f5f5ff37 100644 --- a/systems/src/main/java/org/bytedeco/systems/presets/linux.java +++ b/systems/src/main/java/org/bytedeco/systems/presets/linux.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2018 Samuel Audet + * Copyright (C) 2017-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.BuildEnabled; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; @@ -40,7 +41,7 @@ * * @author Samuel Audet */ -@Properties(value = {@Platform(value = "linux", +@Properties(inherit = javacpp.class, value = {@Platform(value = "linux", exclude = {"bits/locale.h", "bits/socket.h", "bits/siginfo.h", "bits/sigaction.h", "bits/sigcontext.h", "bits/sigstack.h", "bits/sched.h", "bits/confname.h", "bits/resource.h"}, include = {"cpuid.h", "dlfcn.h", "nl_types.h", "xlocale.h", "bits/locale.h", "langinfo.h", "locale.h", diff --git a/systems/src/main/java/org/bytedeco/systems/presets/macosx.java b/systems/src/main/java/org/bytedeco/systems/presets/macosx.java index c628eed3f09..d35171004d9 100644 --- a/systems/src/main/java/org/bytedeco/systems/presets/macosx.java +++ b/systems/src/main/java/org/bytedeco/systems/presets/macosx.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Samuel Audet + * Copyright (C) 2017-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.BuildEnabled; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; @@ -36,7 +37,7 @@ * * @author Samuel Audet */ -@Properties(value = {@Platform(value = "macosx-x86", +@Properties(inherit = javacpp.class, value = {@Platform(value = "macosx-x86", define = "__STDC_WANT_LIB_EXT1__ 1", include = {"cpuid.h", "dlfcn.h", "nl_types.h", "xlocale.h", "_locale.h", "langinfo.h", "locale.h", "sys/uio.h", "sys/_types/_iovec_t.h", "sys/socket.h", "sys/errno.h", "string.h", "stdlib.h", /*"sys/types.h",*/ "sys/_types/_timespec.h", "sys/_types/_timeval.h", "sys/time.h", "time.h", "utime.h", diff --git a/systems/src/main/java/org/bytedeco/systems/presets/windows.java b/systems/src/main/java/org/bytedeco/systems/presets/windows.java index 238279d16d6..462b36f7728 100644 --- a/systems/src/main/java/org/bytedeco/systems/presets/windows.java +++ b/systems/src/main/java/org/bytedeco/systems/presets/windows.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Samuel Audet + * Copyright (C) 2017-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ import org.bytedeco.javacpp.annotation.NoException; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.BuildEnabled; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; @@ -36,7 +37,7 @@ * * @author Samuel Audet */ -@Properties(value = {@Platform(value = "windows-x86", define = {"WINVER 0x0601", "_WIN32_WINNT 0x0601"}, +@Properties(inherit = javacpp.class, value = {@Platform(value = "windows-x86", define = {"WINVER 0x0601", "_WIN32_WINNT 0x0601"}, include = {"minwindef.h", "guiddef.h", "winnt.h", "minwinbase.h", "processenv.h", "fileapi.h", "debugapi.h", "utilapiset.h", "handleapi.h", "errhandlingapi.h", "fibersapi.h", "namedpipeapi.h", "profileapi.h", "heapapi.h", "ioapiset.h", "synchapi.h", "interlockedapi.h", "processthreadsapi.h", "sysinfoapi.h", "memoryapi.h", "threadpoollegacyapiset.h", diff --git a/tensorflow/src/main/java/org/bytedeco/tensorflow/presets/tensorflow.java b/tensorflow/src/main/java/org/bytedeco/tensorflow/presets/tensorflow.java index a504871d0f1..6c35769ee50 100644 --- a/tensorflow/src/main/java/org/bytedeco/tensorflow/presets/tensorflow.java +++ b/tensorflow/src/main/java/org/bytedeco/tensorflow/presets/tensorflow.java @@ -36,6 +36,7 @@ import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; import org.bytedeco.javacpp.annotation.StdString; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.BuildEnabled; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; @@ -56,7 +57,7 @@ * * @author Samuel Audet */ -@Properties(value = { +@Properties(inherit = javacpp.class, value = { @Platform( value = {"linux", "macosx", "windows"}, compiler = "cpp11", @@ -270,27 +271,7 @@ // "Advapi32#", "double-conversion", "zlibstatic", "gpr", "grpc_unsecure", "grpc++_unsecure", "farmhash", "fft2d", // "lmdb", "giflib", "libjpeg", "libpng16_static", "nsync", "nsync_cpp", "libprotobuf", "re2", "snappy", "sqlite", "mklml", "mkldnn", // "tensorflow_static", "tf_protos_cc", "tf_cc_op_gen_main", "tf_python_protos_cc", "tf_c_python_api"}, - preload = {"api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", - "api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0", - "api-ms-win-core-string-l1-1-0", "api-ms-win-core-errorhandling-l1-1-0", "api-ms-win-core-timezone-l1-1-0", "api-ms-win-core-file-l1-1-0", - "api-ms-win-core-namedpipe-l1-1-0", "api-ms-win-core-handle-l1-1-0", "api-ms-win-core-file-l2-1-0", "api-ms-win-core-heap-l1-1-0", - "api-ms-win-core-libraryloader-l1-1-0", "api-ms-win-core-synch-l1-1-0", "api-ms-win-core-processthreads-l1-1-0", - "api-ms-win-core-processenvironment-l1-1-0", "api-ms-win-core-datetime-l1-1-0", "api-ms-win-core-localization-l1-2-0", - "api-ms-win-core-sysinfo-l1-1-0", "api-ms-win-core-synch-l1-2-0", "api-ms-win-core-console-l1-1-0", "api-ms-win-core-debug-l1-1-0", - "api-ms-win-core-rtlsupport-l1-1-0", "api-ms-win-core-processthreads-l1-1-1", "api-ms-win-core-file-l1-2-0", "api-ms-win-core-profile-l1-1-0", - "api-ms-win-core-memory-l1-1-0", "api-ms-win-core-util-l1-1-0", "api-ms-win-core-interlocked-l1-1-0", "ucrtbase", - "msvcr120", "libiomp5md", "mklml", "vcruntime140", "msvcp140", "concrt140", "vcomp140", "python37"}), - @Platform( - value = "windows-x86", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"}), - @Platform( - value = "windows-x86_64", - preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/", - "C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}), + preload = {"msvcr120", "libiomp5md", "mklml", "python37"}), @Platform( value = "windows-x86_64", extension = {"-gpu", "-python", "-python-gpu"}, @@ -552,22 +533,6 @@ public void init(Logger logger, java.util.Properties properties, String encoding resources.add("/org/bytedeco/cuda/"); resources.add("/org/bytedeco/tensorrt/"); } - - String vcredistdir = System.getenv("VCToolsRedistDir"); - if (vcredistdir != null && vcredistdir.length() > 0) { - switch (platform) { - case "windows-x86": - preloadpaths.add(0, vcredistdir + "\\x86\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x86\\Microsoft.VC141.OpenMP"); - break; - case "windows-x86_64": - preloadpaths.add(0, vcredistdir + "\\x64\\Microsoft.VC141.CRT"); - preloadpaths.add(1, vcredistdir + "\\x64\\Microsoft.VC141.OpenMP"); - break; - default: - // not Windows - } - } } public void map(InfoMap infoMap) { diff --git a/videoinput/platform/pom.xml b/videoinput/platform/pom.xml index 1205951e1dd..17550b34737 100644 --- a/videoinput/platform/pom.xml +++ b/videoinput/platform/pom.xml @@ -20,6 +20,11 @@ + + org.bytedeco + javacpp-platform + ${project.parent.version} + ${project.groupId} ${javacpp.moduleId} diff --git a/videoinput/src/main/java/org/bytedeco/videoinput/presets/videoInputLib.java b/videoinput/src/main/java/org/bytedeco/videoinput/presets/videoInputLib.java index 1a9fd0ae177..270b5e33be1 100644 --- a/videoinput/src/main/java/org/bytedeco/videoinput/presets/videoInputLib.java +++ b/videoinput/src/main/java/org/bytedeco/videoinput/presets/videoInputLib.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2014 Samuel Audet + * Copyright (C) 2013-2020 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.presets.javacpp; import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -33,7 +34,7 @@ * * @author Samuel Audet */ -@Properties(target="org.bytedeco.videoinput", global="org.bytedeco.videoinput.global.videoInputLib", value={ +@Properties(inherit=javacpp.class, target="org.bytedeco.videoinput", global="org.bytedeco.videoinput.global.videoInputLib", value={ @Platform(value="windows", include={"", ""}, link={"ole32", "oleaut32", "amstrmid", "strmiids", "uuid"}) }) public class videoInputLib implements InfoMapper { static { Loader.checkVersion("org.bytedeco", "videoinput"); }