mcExchange
mcExchange

Reputation: 6497

What folders can be deleted after compiling opencv from source?

I compiled opencv from source many times and it consumes a lot of space on my hard drive. Especially the folder in build/modules seems to use a lot of space. Is it safe to remove this folder and everything except for

./opencv-2.X.X/include
./opencv-2.X.X/build/lib

The first folder contains the headers necessary for #include in my c++ programs and the latter contains the dynamic libraries that the compiled programs are linked against. Is there anything else in another folder that is needed / linked against by any program using opencv or can I just delete the rest of it?

Upvotes: 3

Views: 1207

Answers (2)

Brian Cain
Brian Cain

Reputation: 14619

Once you do the make install step you can delete everything under your source dir.

Prior to the build you should have specified a CMAKE_INSTALL_PREFIX=/usr/local/ or something similar. That path will contain all of the outputs of the build that must remain.

Upvotes: 3

Anubhav Rohatgi
Anubhav Rohatgi

Reputation: 458

I would recommend to keep only the include files, the libs and the bin () namely debug and release) both.

so in all only the .dll and the .lib is required on windows and on unix only .so, .a ,.so.v.v(versioning) . along with headers are required.

Upvotes: 2

Related Questions