mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
Handle OpenCV optional product properly
This commit is contained in:
parent
17497fdd95
commit
197ecbaecd
@ -17,6 +17,8 @@
|
|||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
|
||||||
|
INCLUDE(CMakeDependentOption)
|
||||||
|
|
||||||
PROJECT(SalomeGEOM C CXX)
|
PROJECT(SalomeGEOM C CXX)
|
||||||
|
|
||||||
# Ensure a proper linker behavior:
|
# Ensure a proper linker behavior:
|
||||||
@ -64,8 +66,8 @@ OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ${SALOME_BUILD_TESTS})
|
|||||||
|
|
||||||
# Advanced options:
|
# Advanced options:
|
||||||
OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
|
OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
|
||||||
OPTION(SALOME_GEOM_USE_OPENCV "Enable shape recognition from picture" OFF)
|
CMAKE_DEPENDENT_OPTION(SALOME_GEOM_USE_OPENCV "Enable shape recognition from picture" OFF
|
||||||
|
"SALOME_BUILD_GUI" OFF)
|
||||||
MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV)
|
MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV)
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
@ -141,19 +143,12 @@ ENDIF(SALOME_BUILD_GUI)
|
|||||||
FIND_PACKAGE(SalomeCAS REQUIRED)
|
FIND_PACKAGE(SalomeCAS REQUIRED)
|
||||||
FIND_PACKAGE(SalomeVTK 6.0 REQUIRED)
|
FIND_PACKAGE(SalomeVTK 6.0 REQUIRED)
|
||||||
|
|
||||||
|
# OpenCV
|
||||||
IF(SALOME_BUILD_GUI)
|
|
||||||
# OpenCV
|
|
||||||
IF(SALOME_GEOM_USE_OPENCV)
|
|
||||||
FIND_PACKAGE(SalomeOpenCV)
|
|
||||||
SALOME_LOG_OPTIONAL_PACKAGE(OpenCV SALOME_GEOM_USE_OPENCV)
|
|
||||||
ENDIF(SALOME_GEOM_USE_OPENCV)
|
|
||||||
ELSE()
|
|
||||||
SET(SALOME_GEOM_USE_OPENCV OFF)
|
|
||||||
ENDIF(SALOME_BUILD_GUI)
|
|
||||||
IF(SALOME_GEOM_USE_OPENCV)
|
IF(SALOME_GEOM_USE_OPENCV)
|
||||||
SET(OPENCV_DEFINITIONS "-DWITH_OPENCV")
|
FIND_PACKAGE(SalomeOpenCV REQUIRED)
|
||||||
ENDIF()
|
SALOME_LOG_OPTIONAL_PACKAGE(OpenCV SALOME_GEOM_USE_OPENCV)
|
||||||
|
ADD_DEFINITIONS(-DWITH_OPENCV)
|
||||||
|
ENDIF(SALOME_GEOM_USE_OPENCV)
|
||||||
|
|
||||||
# Detection summary:
|
# Detection summary:
|
||||||
SALOME_PACKAGE_REPORT_AND_CHECK()
|
SALOME_PACKAGE_REPORT_AND_CHECK()
|
||||||
|
@ -64,6 +64,7 @@ IF(SALOME_BUILD_GUI)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
IF(SALOME_GEOM_USE_OPENCV)
|
IF(SALOME_GEOM_USE_OPENCV)
|
||||||
SET_AND_CHECK(OPENCV_ROOT_DIR_EXP "@PACKAGE_OPENCV_ROOT_DIR@")
|
SET_AND_CHECK(OPENCV_ROOT_DIR_EXP "@PACKAGE_OPENCV_ROOT_DIR@")
|
||||||
|
ADD_DEFINITIONS(-DWITH_OPENCV)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# For all prerequisites, load the corresponding targets if the package was used
|
# For all prerequisites, load the corresponding targets if the package was used
|
||||||
|
Loading…
Reference in New Issue
Block a user