Skip to content

Commit

Permalink
+ unify error messages on not found libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 31, 2016
1 parent 0f858f9 commit 6117c31
Showing 1 changed file with 37 additions and 33 deletions.
70 changes: 37 additions & 33 deletions CMakeLists.txt
Expand Up @@ -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 ------------------------
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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()
Expand All @@ -645,17 +649,17 @@ 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)

# -------------------------------- Eigen --------------------------------

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 --------------------------------
Expand All @@ -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)


Expand Down Expand Up @@ -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)

Expand All @@ -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 -------------------------------

Expand Down Expand Up @@ -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)

# ------------------------------------------------------------------------
Expand Down

0 comments on commit 6117c31

Please sign in to comment.