Skip to content

Commit fe308e1

Browse files
authored
build: CMake option to disable OpenCV with CImg
1 parent 4afebf1 commit fe308e1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ option(MATPLOTPP_BUILD_WITH_EXCEPTIONS "Add compiler flags to use exceptions." O
5656
option(MATPLOTPP_BUILD_HIGH_RESOLUTION_WORLD_MAP "Compile the high resolution maps for geoplots" ON)
5757
option(MATPLOTPP_BUILD_FOR_DOCUMENTATION_IMAGES "Bypass show() commands and save figures as .svg at destruction" OFF)
5858
option(MATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND "Compile target with the experimental OpenGL backend" OFF)
59+
option(MATPLOTPP_WITH_OPENCV "Use OpenCV in CImg" ON)
5960

6061
# Where to find dependencies
6162
option(MATPLOTPP_WITH_SYSTEM_CIMG "Use system-provided CImg.h instead of bundled" OFF)

source/3rd_party/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ endif()
117117
if (CMAKE_MODULE_PATH)
118118
find_package(OpenCV QUIET)
119119
if (OpenCV_FOUND)
120-
target_compile_definitions(cimg INTERFACE cimg_use_opencv)
120+
if (MATPLOTPP_WITH_OPENCV)
121+
target_compile_definitions(cimg INTERFACE cimg_use_opencv)
122+
endif()
121123
target_link_libraries(cimg INTERFACE ${OpenCV_LIBRARIES})
122124
target_include_directories(cimg INTERFACE ${OpenCV_INCLUDE_DIRS})
123125
endif()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy