Reputation: 1793
I have generated the OpenCV libraries using CMake a couple of times using tutorials available online, albeit without completely understanding the process. Here is the process that I follow
.sln
files. I open the file OpenCV.sln
and run the project ALL_BUILD
for both Debug and Release configurations.bin
which contains the libraries (both .lib
and .dll
for the release and debug versions.INSTALL
(in the same solution), just out of curiosity. I noticed that it creates another folder, that contains the library files in almost the same pattern as the prebuilt libraries that come with the OpenCV package. Interestingly, my programs in MSVC or Qt work equally well if I link with either the libraries in the install
folder or the bin
/lib
folder.My questions are
install
solution?install
solution different from the ones found in the bin
and lib
folders?install
solution not built when the ALL_BUILD
solution is builtUpvotes: 4
Views: 950
Reputation: 20296
- What is the function of the
install
solution?
It packages/collects the build output into a portable set of libraries and headers that you know you can move around in your pc, or to another machine.
- How are the libraries generated by the
install
solution different from the ones found in thebin
andlib
folders?
They are not. You have probably built first shared and then (by reconfiguring with cmake) static libraries, but than the target install only installs the one you have currently selected (in your cmake-gui?)
- Why is the
install
solution not built when theALL_BUILD
solution is built
install
is a special target for cmake. In fact, by default install
triggers all
and only actually executes when all
has successfully terminated, but the viceversa is not true.
Upvotes: 3