From fcc908e69cdb3917400fd6c6cbdae04da399b491 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 13 Sep 2013 09:55:47 +0000 Subject: [PATCH] CMake porting. Enable Shape Recognition menu item if OpenCV is available --- CMakeLists.txt | 3 +++ src/EntityGUI/CMakeLists.txt | 2 ++ src/GEOMGUI/CMakeLists.txt | 1 + 3 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95f7c507e..05acda462 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,9 @@ IF(SALOME_BUILD_GUI) ELSE() SET(SALOME_GEOM_USE_OPENCV OFF) ENDIF(SALOME_BUILD_GUI) +IF(SALOME_GEOM_USE_OPENCV) + SET(OPENCV_DEFINITIONS "-DWITH_OPENCV") +ENDIF() # Detection summary: SALOME_PACKAGE_REPORT() diff --git a/src/EntityGUI/CMakeLists.txt b/src/EntityGUI/CMakeLists.txt index 1e32b65b9..bcbca2b69 100755 --- a/src/EntityGUI/CMakeLists.txt +++ b/src/EntityGUI/CMakeLists.txt @@ -50,6 +50,7 @@ ADD_DEFINITIONS( ${CAS_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} + ${OPENCV_DEFINITIONS} ) # libraries to link to @@ -67,6 +68,7 @@ SET(_link_LIBRARIES IF(SALOME_GEOM_USE_OPENCV) SET( FeatureDetectorDlg_Sources EntityGUI_FeatureDetectorDlg.cxx ) SET( FeatureDetectorDlg_moc_h EntityGUI_FeatureDetectorDlg.h ) + LIST(APPEND _link_LIBRARIES GEOMShapeRec) ENDIF() # --- resources --- diff --git a/src/GEOMGUI/CMakeLists.txt b/src/GEOMGUI/CMakeLists.txt index 5a7cb587e..f69a8d1ac 100755 --- a/src/GEOMGUI/CMakeLists.txt +++ b/src/GEOMGUI/CMakeLists.txt @@ -45,6 +45,7 @@ ADD_DEFINITIONS( ${CAS_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} + ${OPENCV_DEFINITIONS} ) # libraries to link to -- 2.39.2