Skip to content

Commit

Permalink
Opencv4. windows, osx, ios, android and emscripten (#6256)
Browse files Browse the repository at this point in the history
#changelog #opencv
  • Loading branch information
arturoc authored Mar 16, 2019
1 parent 529ffd8 commit 021e1a2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
9 changes: 7 additions & 2 deletions addons/ofxOpenCv/addon_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ android/x86:
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_calib3d.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_features2d.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_objdetect.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_videoio.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_video.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_videoio.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_imgproc.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_ml.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_core.a
ADDON_LIBS += libs/opencv/lib/android/x86/libopencv_flann.a
ADDON_LIBS += libs/opencv/lib/android/x86/libquirc.a
ADDON_LIBS += libs/opencv/lib/android/x86/libittnotify.a
ADDON_LIBS += libs/opencv/lib/android/x86/liblibprotobuf.a

android/armeabi-v7a:
ADDON_LIBS =
Expand All @@ -113,12 +116,14 @@ android/armeabi-v7a:
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_calib3d.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_features2d.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_objdetect.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_videoio.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_video.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_videoio.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_imgproc.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_ml.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_core.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libopencv_flann.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/libquirc.a
ADDON_LIBS += libs/opencv/lib/android/armeabi-v7a/liblibprotobuf.a

emscripten:
ADDON_LIBS =
Expand Down
6 changes: 3 additions & 3 deletions examples/templates/allAddonsExample/src/ofApp.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "ofMain.h"
#include "ofxOpenCv.h"
#include "ofxNetwork.h"
#include "ofxOsc.h"
Expand All @@ -11,6 +10,7 @@
#include "ofxGui.h"
#include "ofxSvg.h"
#include "ofxXmlPoco.h"
#include "ofMain.h"

class ofApp : public ofBaseApp{

Expand All @@ -19,7 +19,7 @@ class ofApp : public ofBaseApp{
void setup();
void update();
void draw();

void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
Expand All @@ -30,7 +30,7 @@ class ofApp : public ofBaseApp{
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void gotMessage(ofMessage msg);

// we don't actually use these
// just checking to see if they
Expand Down
12 changes: 11 additions & 1 deletion libs/openFrameworksCompiled/project/osx/config.osx.default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@ ifeq ($(shell xcode-select -print-path 2> /dev/null; echo $$?),0)
MAC_OS_SDK_PATH=$(MAC_OS_XCODE_ROOT)/Platforms/MacOSX.platform/Developer/SDKs

ifndef MAC_OS_SDK
ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.10.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.10.sdk)
ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.15.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.15.sdk)
MAC_OS_SDK=10.15
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.14.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.14.sdk)
MAC_OS_SDK=10.14
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.13.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.13.sdk)
MAC_OS_SDK=10.13
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.12.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.12.sdk)
MAC_OS_SDK=10.12
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.11.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.11.sdk)
MAC_OS_SDK=10.11
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.10.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.10.sdk)
MAC_OS_SDK=10.10
else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.9.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.9.sdk)
MAC_OS_SDK=10.9
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ echo "Building openFrameworks - iOS Template Project"
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
source $ROOT/scripts/ci/ccache.sh

xcodebuild -project "$ROOT/scripts/templates/ios/emptyExample.xcodeproj" -target emptyExample -sdk 'iphoneos8.0' ARCHS='armv7'
xcodebuild -project "$ROOT/scripts/templates/ios/emptyExample.xcodeproj" -target emptyExample -sdk 'iphonesimulator' ARCHS='x86_64'
5 changes: 3 additions & 2 deletions scripts/ci/linuxarmv7l/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ createArchImg(){
download=1
elif [ -f ~/archlinux/timestamp ]; then
if [ $(age ~/archlinux/timestamp) -gt 7 ]; then
rm -rf ~/archlinux
download=1
fi
fi
Expand All @@ -92,8 +93,8 @@ createArchImg(){
tar xzf ~/ArchLinuxARM-rpi-2-latest.tar.gz --no-same-owner -C ~/archlinux/ 2>&1 >/dev/null | grep -v "tar: Ignoring unknown extended header keyword"
sed -i s_/etc/pacman_$HOME/archlinux/etc/pacman_g ~/archlinux/etc/pacman.conf
sed -i "s/Required DatabaseOptional/Never/g" ~/archlinux/etc/pacman.conf
pacman -Sy archlinux-keyring && pacman -Syyu
pacman --noconfirm -S ccache
pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Syu ccache
pacman --noconfirm -r ~/archlinux/ --config ~/archlinux/etc/pacman.conf --arch=armv7h -Syu
pacman --noconfirm -r ~/archlinux/ --config ~/archlinux/etc/pacman.conf --arch=armv7h -S \
make \
Expand Down

0 comments on commit 021e1a2

Please sign in to comment.