Installing examples

asked 2017-03-08 09:33:23 -0500

I have found the flag -DBUILD_EXAMPLES=ON and can see that the samples are in <cmake_build_directory>/bin.

How does one get the compiled examples to install?
By install I mean copy and set permissions somewhere under PREFIX. In this case /usr/local/bin.

I went to <cmake_build_directory>/samples and tried make install but it only installed the source files.

edit retag flag offensive close merge delete

Comments

why would you want to install the examples? I doubt you want to use them as system commands... You can run them directly from the output folder:

$ cd <build_directory>/bin
$ ./edge lena.jpg
kbarni gravatar imagekbarni ( 2017-03-08 10:24:17 -0500 )edit

Packaging. i.e. getting those executables onto the target without needing to build them on the target.

The architecture for which the code is being built is not the same as the build host. I have a small embedded device that is powerful enough to execute and run code, but it has difficulty compiling the libraries (and examples). As a result, I start a docker container representing the target and do my builds there. The libraries are packaged and brought onto the target hardware that way. These examples might go into the libraries package initially... but probably will be broken out into their own package in the end.

It's not a big deal for me to take care of this step in my packaging logic but leveraging OpenCV make system would be better.

wguynes gravatar imagewguynes ( 2017-03-08 10:33:54 -0500 )edit