Skip to content

Commit 14955e4

Browse files
committed
Added CVPLOT_USE_CONAN, fixes #7
1 parent 0bb8198 commit 14955e4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ project (cv-plot)
77
option(BUILD_SHARED_LIBS "Build shared libs" ON)
88
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
99

10-
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
11-
conan_basic_setup(TARGETS)
10+
option(CVPLOT_USE_CONAN "Use opencv from conan package manager" ON)
11+
if(CVPLOT_USE_CONAN)
12+
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
13+
conan_basic_setup(TARGETS)
1214

13-
#dont use find_package(OpenCV)
14-
#(OpenCVConfig.cmake has some problems with conan package)
15-
set(OpenCV_LIBS CONAN_PKG::opencv)
15+
#dont use find_package(OpenCV)
16+
#(OpenCVConfig.cmake has some problems with conan package)
17+
set(OpenCV_LIBS CONAN_PKG::opencv)
18+
endif()
1619

1720
add_subdirectory(CvPlot)

doc/integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This is the easiest way and should almost always work. Just be sure you have Ope
2121
- You may also build without Conan or add CvPlot to some project with add_subdirectory. In this case, use the CvPlot subdirectory, not the root CMakeLists.txt!
2222
- Variables
2323
- CVPLOT_HEADER_ONLY [default ON]
24+
- CVPLOT_USE_CONAN [default ON] Turn off to use opencv from elsewhere
2425
- CVPLOT_WITH_TESTS [default ON]
2526
- CVPLOT_WITH_EXAMPLES [default ON]
2627
- [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html)

0 commit comments

Comments
 (0)