1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 21:33:04 +04:00

cmake: refactored scripts with samples building:

- allow installing samples sources on all platforms
  even if BUILD_EXAMPLES is disabled,  fixed minor
  issues in sources installation process
- use 'example_<group>_<name>' scheme for target and binary file naming
- use single function for sample executable creation
This commit is contained in:
Maksim Shabunin
2018-02-09 13:30:04 +03:00
parent 633b0e56a5
commit 2200e13c71
15 changed files with 346 additions and 576 deletions
@@ -1,5 +1,5 @@
set(sample_dir ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_code/calib3d/real_time_pose_estimation/src/)
set(target cpp-tutorial-)
set(target example_tutorial_)
set(sample_pnplib
${sample_dir}CsvReader.cpp
@@ -12,6 +12,8 @@ set(sample_pnplib
${sample_dir}RobustMatcher.cpp
)
ocv_include_modules_recurse(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
add_executable( ${target}pnp_registration ${sample_dir}main_registration.cpp ${sample_pnplib} )
add_executable( ${target}pnp_detection ${sample_dir}main_detection.cpp ${sample_pnplib} )
@@ -1,4 +1,5 @@
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
using namespace cv;
using namespace std;