Ask Your Question
0

Makefile is not generated when building OpenCV with Opencv_contrib from source

asked 2019-02-14 23:03:37 -0500

updated 2019-02-15 02:09:12 -0500

berak gravatar image

Hello OpenCV community, I have been trying to build the OpenCV with OpenCV_contrib libraries for JAVA for nearly a week and have ran out of options. I am sure that there is a duplicate for this out there but I have not been able to find it. 1. Following these instructions: https://docs.opencv.org/3.4.3/d3/d52/... I am able to successfully build the project. I confirmed this by running some of the applications generated. However, the build does not include a makefile so I do not know how to create a jar to import into JAVA. 2. Following these instructions: https://github.com/opencv/opencv_cont... Again, same result. No Makefile. Please see the compilation below. If anyone has any suggestions, I really appreciate it!

Thank you.

$ cmake -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules/ opencv
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.16299.
-- The CXX compiler identification is MSVC 19.16.27027.1
-- The C compiler identification is MSVC 19.16.27027.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_CXX11 (check file: cmake/checks/cxx11.cpp)
-- Performing Test HAVE_CXX11 - Success
-- Update variable PYTHON2_EXECUTABLE from environment: C:/Python27/python.exe
-- Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.8", minimum required is "2.7")
-- Found PythonLibs: C:/Python27/libs/python27.lib (found suitable exact version "2.7.8")
-- Found PythonInterp: C:/Users/user1/AppData/Local/Programs/Python/Python37-32/python.exe (found suitable version "3.7.1", minimum required is "3.2")
-- Found PythonLibs: C:/Users/user1/AppData/Local/Programs/Python/Python37-32/libs/python37.lib (found suitable exact version "3.7.1")
-- Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CPU_SSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CPU_SSSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success
-- Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CPU_POPCNT_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success
-- Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-02-15 02:11:48 -0500

berak gravatar image

updated 2019-02-15 02:31:05 -0500

However, the build does not include a makefile

visual studio does not use those ! (so none is generated)

you're supposed to open opencv.sln, and build the INSTALL project. after that finished, you will find the jar and dll in opencv/build/install/java

(for the java parts, a build.xml is generated to be used with the ant tool.)

everything in the cmake output looks ok, so where is the real problem ?

edit flag offensive delete link more

Comments

Hi Berak,

Thank you very much for your answer and for clarifying how to build the project. I really appreciate it. After following your instructions, I still did not see see a jar, dll or build.xml file generated. Please see the output of my build from VS 2017. Thank you very much.

https://pastebin.com/MYSZcdEv

Alexandrei gravatar imageAlexandrei ( 2019-02-19 14:13:47 -0500 )edit

can you try again, and set cmake -DBUILD_opencv_world=OFF?

berak gravatar imageberak ( 2019-02-20 02:21:23 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-02-14 23:03:37 -0500

Seen: 175 times

Last updated: Feb 15