Browse Source

Fix for Android build. Added Emgu.CV.Shape.Android.csproj.

UWP10
Canming Huang 10 years ago
parent
commit
b3149b67d2
  1. 14
      CMakeLists.txt
  2. 18
      Emgu.CV.Example/Android/AndroidExamples.csproj
  3. 2
      Emgu.CV.OCR/CMakeLists.txt
  4. 61
      Emgu.CV.Shape/Emgu.CV.Shape.Android.csproj
  5. 3
      platforms/android/scripts/rebuild_all.bat

14
CMakeLists.txt

@ -593,6 +593,13 @@ IF (ANDROID)
SET(ANDROID_SOURCE_FOLDERS Emgu.Util Emgu.CV Emgu.CV.Contrib Emgu.CV.ML Emgu.CV.Cuda Emgu.CV.Stitching Emgu.CV.VideoStab Emgu.CV.Superres Emgu.CV.Shape)
IF(EMGU_CV_WITH_TESSERACT)
LIST(APPEND ANDROID_SOURCE_FOLDERS Emgu.CV.OCR)
INSTALL(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.OCR/tessdata"
DESTINATION Emgu.CV.OCR
COMPONENT main
FILES_MATCHING
PATTERN "*eng.*"
)
ENDIF()
FOREACH(ANDROID_SOURCE_FOLDER ${ANDROID_SOURCE_FOLDERS})
INSTALL(
@ -669,13 +676,6 @@ IF (ANDROID)
DESTINATION "Emgu.CV.Example/LicensePlateRecognition"
COMPONENT main
)
# INSTALL(
# DIRECTORY "Emgu.CV.Extern/tesseract/libtesseract/tessdata"
# DESTINATION "Emgu.CV.Extern/tesseract/libtesseract/tessdata"
# COMPONENT main
# FILES_MATCHING
# PATTERN "*eng.*"
# )
INSTALL(
FILES
"Emgu.CV.Example/TrafficSignRecognition/StopSignDetector.cs"

18
Emgu.CV.Example/Android/AndroidExamples.csproj

@ -143,31 +143,31 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.bigrams">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.bigrams">
<Link>Assets\tessdata\eng.cube.bigrams</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.fold">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.fold">
<Link>Assets\tessdata\eng.cube.fold</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.lm">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.lm">
<Link>Assets\tessdata\eng.cube.lm</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.nn">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.nn">
<Link>Assets\tessdata\eng.cube.nn</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.params">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.params">
<Link>Assets\tessdata\eng.cube.params</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.size">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.size">
<Link>Assets\tessdata\eng.cube.size</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.cube.word-freq">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.cube.word-freq">
<Link>Assets\tessdata\eng.cube.word-freq</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.tesseract_cube.nn">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.tesseract_cube.nn">
<Link>Assets\tessdata\eng.tesseract_cube.nn</Link>
</AndroidAsset>
<AndroidAsset Include="..\..\Emgu.CV.Extern\tesseract\libtesseract\tesseract-ocr\tessdata\eng.traineddata">
<AndroidAsset Include="..\..\Emgu.CV.OCR\tessdata\eng.traineddata">
<Link>Assets\tessdata\eng.traineddata</Link>
</AndroidAsset>
<AndroidResource Include="..\..\opencv\LICENSE">

2
Emgu.CV.OCR/CMakeLists.txt

@ -2,7 +2,7 @@
# Copyright (C) 2004-2015 by EMGU Corporation. All rights reserved.
# --------------------------------------------------------
IF((EMGU_CV_BUILD OR EMGU_CV_EXAMPLE_BUILD) AND EMGU_CV_WITH_TESSERACT AND (NOT ANDROID))
IF((EMGU_CV_BUILD OR EMGU_CV_EXAMPLE_BUILD) AND EMGU_CV_WITH_TESSERACT)
PROJECT(Emgu.CV.OCR)

61
Emgu.CV.Shape/Emgu.CV.Shape.Android.csproj

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>6ca2233c-e897-4605-8af9-620e250613e8</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassLibrary1</RootNamespace>
<AssemblyName>ClassLibrary1</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Data.DataSetExtensions"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="*.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

3
platforms/android/scripts/rebuild_all.bat

@ -6,11 +6,12 @@ cd ..\..\..
cp -f opencv\platforms\android\android.toolchain.cmake android.toolchain.cmake
if "%1%"=="noclean" GOTO END_CLEAN
rm -rf build
:CLEAN
rm -rf build_armeabi
rm -rf build_armeabi-v7a
rm -rf build_x86
rm -rf build
:END_CLEAN
call platforms\android\scripts\build armeabi

Loading…
Cancel
Save