Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
6fa593c
started editing cmake files for android build
Mar 12, 2018
3de665d
ocv macro changes
Mar 12, 2018
1bcb5a4
replaced all ocv macros by vp macros
Mar 15, 2018
1a89e5f
began adding android template files
Mar 16, 2018
3e63b1a
started editing cmake files for android build
Mar 12, 2018
c8c9789
ocv macro changes
Mar 12, 2018
85ad901
replaced all ocv macros by vp macros
Mar 15, 2018
094b608
began adding android template files
Mar 16, 2018
1a93661
building visp_core works. error in linking the lapac 3rd party
Mar 17, 2018
2e5f143
Merge remote-tracking branch 'origin/android_build' into android_build
Mar 17, 2018
ff18229
libvisp_core.so build. edited clapack 3rd party
Mar 17, 2018
8b98fe4
made OpenCV to VISP edits
Mar 18, 2018
5ea4640
pthread support for android
Mar 19, 2018
9280240
Merge branch 'master' into android_build
Apr 8, 2018
be99a2c
initial commit
Apr 9, 2018
561bb6b
Merge branch 'android_build' into java_module
Apr 29, 2018
4f59940
Merge remote-tracking branch 'upstream/master' into java_module
Apr 29, 2018
6e35923
Merged "java_module" and "upstream/master". Need to add python scripts
Apr 29, 2018
90b09cf
need to create java.hpp files
Apr 29, 2018
6b80af0
finalizing changes for java
May 10, 2018
28059d5
omitting some files for the sake of a javabuild
May 12, 2018
d466df9
Make things working without java module
fspindle May 15, 2018
01f8647
added detecting apache ant
akshay326 May 30, 2018
b32c0e7
removed unused python module. Swtichin to Opencv400 JavaGenerator
akshay326 May 30, 2018
f18ebce
adding parser scrpits in java module only
akshay326 May 30, 2018
9e5498c
just added the new file structure
akshay326 May 30, 2018
a14cfb4
did regex + manually replacement opencv to visp
akshay326 May 30, 2018
2184a85
resolved ant dependencies and required macros
akshay326 May 30, 2018
52a0e8f
python is detected and java module is building
May 31, 2018
a034043
build working, files to be added
akshay326 Jun 2, 2018
4b9f4b2
Merge branch 'only_gen_java_py' into java_module
akshay326 Jun 2, 2018
b90678a
Merge branch 'only_gen_java_py' into java_module
akshay326 Jun 2, 2018
f7ad30e
removed tests for now
akshay326 Jun 2, 2018
6f0845b
build work with a java library and jar executable
akshay326 Jun 2, 2018
d998f74
remove tests for now
akshay326 Jun 2, 2018
56437d1
removed harcoded paths
akshay326 Jun 2, 2018
c0a6dcb
minor header missing patch
akshay326 Jun 2, 2018
971bc80
removed harcoding java wrapper support. Going to update VpMatrix class
akshay326 Jun 5, 2018
ac24085
added vpColVector and vpRect
akshay326 Jun 5, 2018
5882d87
added vpTracker, vpForwardProjection, vpPoint
akshay326 Jun 5, 2018
2d10bd9
removed generic JNI workaround
akshay326 Jun 6, 2018
84d8ded
add java wrapping for GUI/IO
akshay326 Jun 7, 2018
687f02f
working towards simple imgproc demo
akshay326 Jun 7, 2018
d839c58
Remove *.pyc from git scm
fspindle Jun 12, 2018
fa56d1a
Add info about java usage
fspindle Jun 12, 2018
f09c3dc
Add doxygen tutorial for java
fspindle Jun 12, 2018
3897a6b
Fix typo
fspindle Jun 12, 2018
63553f5
Merge branch 'master' into java_module
fspindle Jun 13, 2018
b52d920
Use cmake function rather then macro to have the same behavior than O…
fspindle Jun 13, 2018
76d185e
Disable java module when python, ant or jni not available
fspindle Jun 13, 2018
7978fa3
Detect Python before parsing visp modules
fspindle Jun 13, 2018
3ce12ae
Make cmake output quiet when numpy is not found
fspindle Jun 13, 2018
4e98a92
Fix visp.jar binary output path
fspindle Jun 13, 2018
d11902d
Remove EXECUTABLE_OUTPUT_PATH since ViSP uses BINARY_OUTPUT_PATH. Rem…
fspindle Jun 13, 2018
3cf4adb
auto build working. 1 class, 2 fns only
akshay326 Jun 15, 2018
e1c1da5
added a few more functions in VpMatrix. It works
akshay326 Jun 15, 2018
7c0a962
added VpColVector and VpRowVector works fine now
akshay326 Jun 15, 2018
dacf673
ignore .idea folder
akshay326 Jun 15, 2018
0d4c197
added VpImageUchar and VpImageRGBa. Works
akshay326 Jun 15, 2018
97d9626
changed JNI, java templates
akshay326 Jun 16, 2018
1b0daca
remove JNI exception support
akshay326 Jun 16, 2018
23a5929
removed suppor for delete function
akshay326 Jun 16, 2018
90567cf
fns belonging to class will go in Class.java not Module.java
akshay326 Jun 16, 2018
decc93a
removed empty <Module>.java files
akshay326 Jun 16, 2018
03af4ea
dont create <Module>.inl.hpp, create <Class>.cpp instead
akshay326 Jun 16, 2018
2222bec
VISP_JAVA_BINDINGS_DIR is null. Temp workaround for now
akshay326 Jun 16, 2018
427d74c
remove including deprecated misc/src/cpp folder
akshay326 Jun 16, 2018
31e49c3
Merge pull request #9 from AKS1996/so_analysis
akshay326 Jun 17, 2018
fef0551
typo in java/generator
akshay326 Jun 20, 2018
5fa9255
add visp_java.cpp/.hpp
akshay326 Jun 20, 2018
1e2b4b6
added visp installation doc
akshay326 Jun 21, 2018
93c8a33
Fix build on OSX
fspindle Jun 21, 2018
f3a5e09
Merge pull request #11 from AKS1996/java_module_fix_osx
akshay326 Jun 21, 2018
e21c911
moving extern C to bottom
akshay326 Jun 22, 2018
2e5221a
This was causing missing symbols error
akshay326 Jun 22, 2018
6f41aaa
add reverse camel support
akshay326 Jun 22, 2018
748afe1
switch back to <module>.inl.hpp file instead of JNI <class>.cpp file
akshay326 Jun 22, 2018
a67c19d
add Java execption support. Introduce common.h
akshay326 Jun 22, 2018
83994ed
add finalize support in template
akshay326 Jun 22, 2018
09bd373
demo file edit
akshay326 Jun 22, 2018
0dd3df8
add delete/finalize support. Keep code intended. Closing #4
akshay326 Jun 23, 2018
ba4f67b
Update .gitignore
akshay326 Jun 23, 2018
f4695a1
Merge branch 'master' into java_module
akshay326 Jun 23, 2018
9188b5e
getPixel and getPixels for VpImageUChar
akshay326 Jun 24, 2018
7d0e9a0
minor parsing edits
akshay326 Jun 24, 2018
7b237c4
java wrapping visp_io module
akshay326 Jun 24, 2018
0767279
some typos
akshay326 Jun 24, 2018
3e07b8a
getPixel and getPixels for VpImageRGBa
akshay326 Jun 24, 2018
4fb0e76
typo in path
akshay326 Jun 24, 2018
2b17ddd
add VpDisplay class in module gui. Using Swing for now
akshay326 Jun 26, 2018
978f031
turn uchar to unsigned char
akshay326 Jun 27, 2018
1d1f343
turn dump to toString functions
akshay326 Jun 27, 2018
5aa506b
add GUI support for imageRGBa
akshay326 Jun 27, 2018
0cb6e5b
typo
akshay326 Jun 27, 2018
6091e24
Add ant as 3rd-party to test java module
fspindle Jun 30, 2018
b123bb0
Install ant 3rd party when testing with appveyor
fspindle Jun 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ CMakeCache.txt
CMakeLists.txt.user*
platforms/ios/build_framework.pyc
*.bak
*.pyc
modules/java/\.idea/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ before_install:
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install tesseract; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then export OpenCV_DIR=/usr/local/opt/opencv; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install libxml2 libdc1394 gsl; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install ant; fi"

# Get libs for Linux
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get update -qq; fi"
Expand All @@ -39,6 +40,7 @@ before_install:
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get install -qq libavcodec-dev libbz2-dev; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get install -qq libogre-1.9-dev libois-dev; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get install -qq libzbar-dev libdmtx-dev; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get install -qq ant; fi"

before_script:
- mkdir build
Expand Down
15 changes: 15 additions & 0 deletions 3rdparty/clapack/f2c/fio.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@
#define FTELL ftell
#endif

// TODO @AKS1996 made some changes here.
// Refer https://github.com/nmoinvaz/minizip/issues/137
#ifdef __ANDROID__
# define fopen64 fopen
# define freopen64 freopen
# ifdef __USE_FILE_OFFSET64
# define ftello64 ftello
# define fseeko64 fseeko
# else
# define ftello64 ftell
# define fseeko64 fseek
# endif
#endif
// extra changes end

#ifndef OFF_T
#define OFF_T long
#endif
Expand Down
82 changes: 79 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ if(NOT CMAKE_TOOLCHAIN_FILE)
if(WIN32)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory")
endif()
else()
else(NOT CMAKE_TOOLCHAIN_FILE)
#Android: set output folder to ${CMAKE_BINARY_DIR}
set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" )
# Crosscompiling
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory")
endif()
Expand Down Expand Up @@ -141,6 +143,17 @@ else()
set(VISP_INSTALL_BINARIES_PREFIX "")
endif()

if(ANDROID)
set(LIBRARY_OUTPUT_PATH "${VISP_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}")
vp_update(3P_LIBRARY_OUTPUT_PATH "${VISP_BINARY_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}")
vp_update(VISP_LIB_INSTALL_PATH sdk/native/libs/${ANDROID_NDK_ABI_NAME})
vp_update(VISP_3P_LIB_INSTALL_PATH sdk/native/3rdparty/libs/${ANDROID_NDK_ABI_NAME})
vp_update(VISP_CONFIG_INSTALL_PATH sdk/native/jni)
vp_update(VISP_INCLUDE_INSTALL_PATH sdk/native/jni/include)
vp_update(VISP_SAMPLES_SRC_INSTALL_PATH samples/native)
vp_update(VISP_OTHER_INSTALL_PATH sdk/etc)
endif()

# where to install the library and headers
if(WIN32)
set(VISP_INC_INSTALL_PATH ${CMAKE_INSTALL_INCLUDEDIR})
Expand All @@ -151,6 +164,10 @@ if(WIN32)
endif()
set(VISP_BIN_INSTALL_PATH "${VISP_INSTALL_BINARIES_PREFIX}${CMAKE_INSTALL_BINDIR}")
set(VISP_3P_LIB_INSTALL_PATH "${VISP_INSTALL_BINARIES_PREFIX}static${CMAKE_INSTALL_LIBDIR}")
set(VISP_SAMPLES_SRC_INSTALL_PATH samples/native)
set(VISP_JAR_INSTALL_PATH java)
set(VISP_OTHER_INSTALL_PATH etc)
set(VISP_CONFIG_INSTALL_PATH ".")
else()
# The location where includes and libraries will be installed

Expand All @@ -162,6 +179,9 @@ else()
set(VISP_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR})
set(VISP_BIN_INSTALL_PATH ${CMAKE_INSTALL_BINDIR})
set(VISP_3P_LIB_INSTALL_PATH share/ViSP/3rdparty/${VISP_LIB_INSTALL_PATH})
set(VISP_SAMPLES_SRC_INSTALL_PATH share/ViSP/samples)
set(VISP_JAR_INSTALL_PATH share/ViSP/java)
set(VISP_OTHER_INSTALL_PATH share/ViSP)
endif()
set(VISP_3P_LIBRARY_OUTPUT_PATH "${VISP_BINARY_DIR}/3rdparty/lib")

Expand All @@ -182,6 +202,11 @@ else()
set(VISP_DLLVERSION "")
endif()

# --- Python Support ---
if(NOT IOS)
include(cmake/VISPDetectPython.cmake)
endif()

include_directories(${VISP_INCLUDE_DIR})

#----------------------------------------------------------------------
Expand Down Expand Up @@ -210,6 +235,20 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${VISP_LIB_INSTALL_PATH}")

if(ANDROID)
vp_update(VISP_JNI_INSTALL_PATH "${VISP_LIB_INSTALL_PATH}")
elseif(INSTALL_CREATE_DISTRIB)
vp_update(VISP_JNI_INSTALL_PATH "${VISP_JAR_INSTALL_PATH}/${VISP_ARCH}")
else()
vp_update(VISP_JNI_INSTALL_PATH "${VISP_JAR_INSTALL_PATH}")
endif()
vp_update(VISP_JNI_BIN_INSTALL_PATH "${VISP_JNI_INSTALL_PATH}")

if(NOT VISP_LIB_ARCHIVE_INSTALL_PATH)
set(VISP_LIB_ARCHIVE_INSTALL_PATH ${VISP_LIB_INSTALL_PATH})
endif()


# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
Expand Down Expand Up @@ -331,6 +370,10 @@ VP_OPTION(BUILD_EXAMPLES "" "" "Build ViSP examples" "" ON)
VP_OPTION(BUILD_TESTS "" "" "Build ViSP tests" "" ON)
VP_OPTION(BUILD_COVERAGE "" "" "Enables test coverage" "" OFF IF (BUILD_TESTS AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE MATCHES "Debug"))

# Build java as an option
VP_OPTION(BUILD_JAVA "" "" "Enable Java support" "" (ANDROID OR NOT CMAKE_CROSSCOMPILING) IF (ANDROID OR (NOT APPLE_FRAMEWORK AND NOT WINRT)) )
VP_OPTION(BUILD_FAT_JAVA_LIB "" "" "Create Java wrapper exporting all functions of ViSP library (requires static build of ViSP modules)" "" ANDROID IF NOT BUILD_SHARED_LIBS)

# Build demos as an option.
VP_OPTION(BUILD_DEMOS "" "" "Build ViSP demos" "" ON)
# Build tutorials as an option.
Expand Down Expand Up @@ -507,7 +550,7 @@ VP_OPTION(USE_ARIA ARIA "" "Include aria support" "" O
VP_OPTION(USE_ZBAR ZBAR "" "Include zbar support" "" ON IF NOT WINRT)
VP_OPTION(USE_DMTX DMTX "" "Include dmtx support" "" ON IF NOT WINRT)
VP_OPTION(USE_PCL PCL QUIET "Include Point Cloud Library support" "" ON IF (USE_REALSENSE OR USE_REALSENSE2) AND NOT WINRT AND NOT IOS)
VP_OPTION(WITH_PTHREAD "" "" "Build pthread as built-in library" "" ON IF (NOT USE_PTHREAD) AND (WIN32 OR MINGW) AND (NOT WINRT_8_1) AND (NOT WINRT_8_0))
VP_OPTION(WITH_PTHREAD "" "" "Build pthread as built-in library" "" ON IF (NOT USE_PTHREAD) AND (WIN32 OR MINGW OR ANDROID) AND (NOT WINRT_8_1) AND (NOT WINRT_8_0))
# Since C99 is not supported by MSVC 2010 or prior, we disable apriltag if MSVC < 2012
VP_OPTION(WITH_APRILTAG "" "" "Build AprilTag as built-in library" "" ON IF (USE_PTHREAD OR WITH_PTHREAD) AND (NOT WINRT_8_1) AND (NOT WINRT_8_0) AND (NOT MSVC_VERSION LESS 1700))
VP_OPTION(WITH_ATIDAQ "" "" "Build atidaq-c as built-in library" "" ON IF USE_COMEDI AND NOT WINRT)
Expand Down Expand Up @@ -672,11 +715,31 @@ if(UNIX)
endif()
endif()

#---------------------------------------------------------------------
# Android support
#---------------------------------------------------------------------
if(ANDROID)
include(cmake/DetectAndroidSDK.cmake)
if(NOT ANDROID_NATIVE_API_LEVEL GREATER 23)
message(WARNING "ViSP requires Android SDK tools revision 24 or newer. Otherwise tests and samples will no be compiled.")
endif()
endif()

#----------------------------------------------------------------------
# Add 3rd-party libraries
#----------------------------------------------------------------------
include(cmake/VISP3rdParty.cmake)

# --- Java Support ---
if(BUILD_JAVA)
if(ANDROID)
include(cmake/DetectAndroidSDK.cmake)
else()
include(cmake/VISPDetectApacheAnt.cmake)
find_package(JNI)
endif()
endif()

#-----------------------------------------------------------------------------
# Add extra compilation flags
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -926,7 +989,6 @@ if(BUILD_PACKAGE)
include(cmake/CPackConfig.cmake)
endif(BUILD_PACKAGE)


#----------------------------------------------------------------------
# Generate the package dependent visp-config shell script for projects which
# are not using CMake:
Expand Down Expand Up @@ -1156,6 +1218,20 @@ if(WIN32)
endif()
endif()

# ========================== java ==========================
status("")
status(" Python (for build):" PYTHON_DEFAULT_AVAILABLE THEN "${PYTHON_DEFAULT_EXECUTABLE}" ELSE NO)

if(BUILD_JAVA OR BUILD_visp_java)
status("")
status(" Java:" BUILD_FAT_JAVA_LIB THEN "export all functions" ELSE "")
status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${ANT_VERSION})" ELSE NO)
if(NOT ANDROID)
status(" JNI:" JNI_INCLUDE_DIRS THEN "${JNI_INCLUDE_DIRS}" ELSE NO)
endif()
endif()


# ============================ Options ===========================
status("")
status(" Build options: ")
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ install:
7z x ${env:VISP_OPENCV_MINGW_FILE} -y -o"C:\projects\deps"
}

# ant
- choco install ant

cache:
- opencv-3.3.0-MinGW-build-package.7z -> appveyor.yml

Expand Down
2 changes: 1 addition & 1 deletion cmake/AddExtraCompilationFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ endif()

if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-fPIC)
add_extra_compiler_option(-fPIC) # Is needed for ANDROID too.
endif()
endif()

Expand Down
Loading