CMake porting.

Enable Shape Recognition menu item if OpenCV is available
This commit is contained in:
eap 2013-09-13 09:55:47 +00:00
parent 3ca6ffd9ba
commit fcc908e69c
3 changed files with 6 additions and 0 deletions

View File

@ -153,6 +153,9 @@ IF(SALOME_BUILD_GUI)
ELSE() ELSE()
SET(SALOME_GEOM_USE_OPENCV OFF) SET(SALOME_GEOM_USE_OPENCV OFF)
ENDIF(SALOME_BUILD_GUI) ENDIF(SALOME_BUILD_GUI)
IF(SALOME_GEOM_USE_OPENCV)
SET(OPENCV_DEFINITIONS "-DWITH_OPENCV")
ENDIF()
# Detection summary: # Detection summary:
SALOME_PACKAGE_REPORT() SALOME_PACKAGE_REPORT()

View File

@ -50,6 +50,7 @@ ADD_DEFINITIONS(
${CAS_DEFINITIONS} ${CAS_DEFINITIONS}
${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS} ${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
) )
# libraries to link to # libraries to link to
@ -67,6 +68,7 @@ SET(_link_LIBRARIES
IF(SALOME_GEOM_USE_OPENCV) IF(SALOME_GEOM_USE_OPENCV)
SET( FeatureDetectorDlg_Sources EntityGUI_FeatureDetectorDlg.cxx ) SET( FeatureDetectorDlg_Sources EntityGUI_FeatureDetectorDlg.cxx )
SET( FeatureDetectorDlg_moc_h EntityGUI_FeatureDetectorDlg.h ) SET( FeatureDetectorDlg_moc_h EntityGUI_FeatureDetectorDlg.h )
LIST(APPEND _link_LIBRARIES GEOMShapeRec)
ENDIF() ENDIF()
# --- resources --- # --- resources ---

View File

@ -45,6 +45,7 @@ ADD_DEFINITIONS(
${CAS_DEFINITIONS} ${CAS_DEFINITIONS}
${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS} ${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
) )
# libraries to link to # libraries to link to