From 6117c31bccd5ca11064e8fe3917cd874f504eb51 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 31 Jan 2016 09:41:41 +0100 Subject: [PATCH] + unify error messages on not found libraries --- CMakeLists.txt | 70 ++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b96b1378..e6b7727a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,7 +407,9 @@ if(FREECAD_LIBPACK_USE) find_package(SWIG) IF(NOT SWIG_FOUND) - MESSAGE("SWIG was not found, build no SWIG binding for pivy") + MESSAGE("==================================================\n" + "SWIG not found, don't build SWIG binding for pivy.\n" + "==================================================\n") ENDIF(NOT SWIG_FOUND) # -------------------------------- Shiboken/PySide ------------------------ @@ -591,7 +593,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") find_package(XercesC REQUIRED) IF(NOT XercesC_FOUND) MESSAGE(FATAL_ERROR "==================\n" - "XercesC not found!\n" + "XercesC not found.\n" "==================\n") ENDIF(NOT XercesC_FOUND) @@ -621,7 +623,9 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") else() find_package(SMESH) if(NOT SMESH_FOUND) - message(ERROR "SMESH was not found.") + message(ERROR "================\n" + "SMESH not found.\n" + "================\n") endif() include_directories(${SMESH_INCLUDE_DIR}) endif() @@ -645,7 +649,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") IF(NOT SWIG_FOUND) MESSAGE("==================================================\n" - "SWIG was not found, build no SWIG binding for pivy\n" + "SWIG not found, don't build SWIG binding for pivy.\n" "==================================================\n") ENDIF(NOT SWIG_FOUND) @@ -653,9 +657,9 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") find_package(Eigen3) IF(NOT EIGEN3_FOUND) - MESSAGE("====================\n" - "Eigen3 was not found\n" - "====================\n") + MESSAGE("=================\n" + "Eigen3 not found.\n" + "=================\n") ENDIF(NOT EIGEN3_FOUND) # -------------------------------- Qt -------------------------------- @@ -678,14 +682,14 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") IF(NOT QT4_FOUND) MESSAGE(FATAL_ERROR "=======================\n" - "Qt libraries not found!\n" + "Qt libraries not found.\n" "=======================\n") ENDIF(NOT QT4_FOUND) IF(NOT QT_QTWEBKIT_FOUND) - MESSAGE("========================================================\n" - "Qt Webkit not found, will not build browser integration!\n" - "========================================================\n") + MESSAGE("=====================================================\n" + "Qt Webkit not found, don't build browser integration.\n" + "=====================================================\n") ENDIF(NOT QT_QTWEBKIT_FOUND) @@ -719,9 +723,9 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(FREECAD_USE_FREETYPE) find_package(Freetype) if(NOT FREETYPE_FOUND) - MESSAGE("==============================================================================\n" - "FreeType2 library is not available. Part module will lack of makeWireString().\n" - "==============================================================================\n") + MESSAGE("===============================================================\n" + "FreeType2 not found. Part module will lack of makeWireString().\n" + "===============================================================\n") endif(NOT FREETYPE_FOUND) endif(FREECAD_USE_FREETYPE) @@ -731,27 +735,25 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # -------------------------------- OpenGL -------------------------------- find_package(OpenGL) - include(FindPackageMessage) - if(OPENGL_GLU_FOUND) - find_package_message(OPENGL_GLU - "Found OpenGLU: ${OPENGL_glu_LIBRARY}" - "[${OPENGL_glu_LIBRARY}][${OEPNGL_INCLUDE_DIR}]") - else(OPENGL_GLU_FOUND) - message(FATAL_ERROR "==============================\n" - "The GLU library was not found.\n" - "==============================\n") - endif(OPENGL_GLU_FOUND) + include(FindPackageMessage) + if(OPENGL_GLU_FOUND) + find_package_message(OPENGL_GLU + "Found OpenGLU: ${OPENGL_glu_LIBRARY}" + "[${OPENGL_glu_LIBRARY}][${OEPNGL_INCLUDE_DIR}]") + else(OPENGL_GLU_FOUND) + message(FATAL_ERROR "======================\n" + "GLU library not found.\n" + "======================\n") + endif(OPENGL_GLU_FOUND) # -------------------------------- Coin3D -------------------------------- - if(BUILD_GUI) - find_package(Coin3D REQUIRED) - if(NOT COIN3D_FOUND) - MESSAGE(FATAL_ERROR "====================\n" - "Coin3D was not found\n" - "====================\n") - endif(NOT COIN3D_FOUND) - endif(BUILD_GUI) + find_package(Coin3D REQUIRED) + if(NOT COIN3D_FOUND) + MESSAGE(FATAL_ERROR "=================\n" + "Coin3D not found.\n" + "=================\n") + endif(NOT COIN3D_FOUND) # ------------------------------ Spaceball ------------------------------- @@ -794,7 +796,9 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") IF(MATPLOTLIB_FOUND) message(STATUS "-- matplotlib-${MATPLOTLIB_VERSION} has been found.") ELSE(MATPLOTLIB_FOUND) - message("-- matplotlib not found, Plot module won't be available!") + message("=====================================================\n" + "matplotlib not found, Plot module won't be available.\n" + "=====================================================\n") ENDIF(MATPLOTLIB_FOUND) # ------------------------------------------------------------------------