From 326ea4e9ae0415151b351271771081a37d667b79 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 13 Dec 2016 16:58:06 +0300 Subject: [PATCH] CMake correction to use debug information just if the corresponded libraries are found. --- CMakeCommon/FindDFBrowser.cmake | 10 ++++++---- CMakeCommon/FindVInspector.cmake | 10 ++++++---- src/XGUI/CMakeLists.txt | 6 ++++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CMakeCommon/FindDFBrowser.cmake b/CMakeCommon/FindDFBrowser.cmake index 2cf5e9a34..46166288c 100644 --- a/CMakeCommon/FindDFBrowser.cmake +++ b/CMakeCommon/FindDFBrowser.cmake @@ -19,9 +19,11 @@ IF(EXISTS ${DFBROWSER_ROOT_DIR}) SET(DFBROWSER_LIB_DIR "${DFBROWSER_ROOT_DIR}/lib") FIND_LIBRARY(DFBrowserAPI DFBrowserAPI "${DFBROWSER_LIB_DIR}") - SET(DFBrowserAPI ${DFBrowserAPI}) + IF(DFBrowserAPI) + SET(DFBrowserAPI ${DFBrowserAPI}) + MESSAGE(STATUS "DFBrowser found at ${DFBROWSER_ROOT_DIR}") + MESSAGE(STATUS "DFBrowser include dir at ${DFBROWSER_INCLUDE_DIR}") + MESSAGE(STATUS "DFBrowser lib dir at ${DFBROWSER_LIB_DIR}") + ENDIF(DFBrowserAPI) - MESSAGE(STATUS "DFBrowser found at ${DFBROWSER_ROOT_DIR}") - MESSAGE(STATUS "DFBrowser include dir at ${DFBROWSER_INCLUDE_DIR}") - MESSAGE(STATUS "DFBrowser lib dir at ${DFBROWSER_LIB_DIR}") ENDIF(EXISTS ${DFBROWSER_ROOT_DIR}) diff --git a/CMakeCommon/FindVInspector.cmake b/CMakeCommon/FindVInspector.cmake index f88ff79dc..f548c46df 100644 --- a/CMakeCommon/FindVInspector.cmake +++ b/CMakeCommon/FindVInspector.cmake @@ -19,9 +19,11 @@ IF(EXISTS ${VINSPECTOR_ROOT_DIR}) SET(VINSPECTOR_LIB_DIR "${VINSPECTOR_ROOT_DIR}/lib") FIND_LIBRARY(VInspectorAPI VInspectorAPI "${VINSPECTOR_LIB_DIR}") - SET(VInspectorAPI ${VInspectorAPI}) + IF(VInspectorAPI) + SET(VInspectorAPI ${VInspectorAPI}) + MESSAGE(STATUS "VInspector found at ${VINSPECTOR_ROOT_DIR}") + MESSAGE(STATUS "VInspector include dir at ${VINSPECTOR_INCLUDE_DIR}") + MESSAGE(STATUS "VInspector lib dir at ${VINSPECTOR_LIB_DIR}") + ENDIF(VInspectorAPI) - MESSAGE(STATUS "VInspector found at ${VINSPECTOR_ROOT_DIR}") - MESSAGE(STATUS "VInspector include dir at ${VINSPECTOR_INCLUDE_DIR}") - MESSAGE(STATUS "VInspector lib dir at ${VINSPECTOR_LIB_DIR}") ENDIF(EXISTS ${VINSPECTOR_ROOT_DIR}) diff --git a/src/XGUI/CMakeLists.txt b/src/XGUI/CMakeLists.txt index c140d618c..7adccd4eb 100644 --- a/src/XGUI/CMakeLists.txt +++ b/src/XGUI/CMakeLists.txt @@ -129,7 +129,8 @@ SET(PROJECT_INCLUDES ${CAS_INCLUDE_DIRS} ${SUIT_INCLUDE}) -IF(EXISTS ${VINSPECTOR_ROOT_DIR}) +IF(${VInspectorAPI}) + message("VINSPECTOR is defined") SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${VInspectorAPI}) SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${VINSPECTOR_INCLUDE_DIR}) @@ -140,7 +141,8 @@ IF(NOT ${HAVE_SALOME}) SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR}) ENDIF(NOT ${HAVE_SALOME}) -IF(EXISTS ${DFBROWSER_ROOT_DIR}) +IF(${DFBrowserAPI}) + message("DFBROWSER is defined") SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${DFBrowserAPI}) SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${DFBROWSER_INCLUDE_DIR}) -- 2.39.2