Files
create/cMake/FreeCAD_Helpers/PrintFinalReport.cmake
berniev 243ad94fb2 Simplify usage in Final Report and move Libpack copy stuff out
Added report function to separate logic from presentation and automate layout
Removed Libpack stuff to its own cmake file CopyLibpackDirectories.cmake
Added call in main CMakeLists.txt to libpack stuff
2023-01-28 08:41:34 -07:00

183 lines
6.5 KiB
CMake

macro(PrintFinalReport)
message(STATUS "\n==============\n"
"Summary report\n"
"==============\n")
function(report name)
if(NOT ARGV1)
set(ARGV1 "-undefined-")
endif()
string(APPEND nameSp ${name} ": ")
string(SUBSTRING ${nameSp} 0 20 nameStr)
message(STATUS "${nameStr} ${ARGV1}")
endfunction()
report(BuildType ${CMAKE_BUILD_TYPE})
report(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
report(Flags ${CMAKE_CXX_FLAGS})
report(Standard "Requires C++${CMAKE_CXX_STANDARD}")
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
report(Python "${PYTHON_VERSION_STRING} [${PYTHON_EXECUTABLE}] [${PYTHON_CONFIG_SUFFIX}]")
if(PCL_FOUND)
report(PCL ${PCL_VERSION})
else()
report(PCL "not enabled")
endif()
if(pybind11_FOUND)
report(pybind11 "${pybind11_VERSION}")
else()
report(pybind11 "not enabled")
endif()
report(Boost ${Boost_VERSION})
report(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
report(ZLIB "${ZLIB_VERSION_STRING}")
report(PyCXX "${PYCXX_VERSION} [${PYCXX_INCLUDE_DIR}]")
report(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARIES}] [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
if(BUILD_SMESH)
if(FREECAD_USE_EXTERNAL_SMESH)
report(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
else()
report(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
report(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
report(HDF5 ${HDF5_VERSION})
report(VTK ${VTK_VERSION})
endif()
else()
report(SMESH "do not build")
endif()
if(NETGEN_FOUND)
report(NETGEN "${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]")
else()
report(NETGEN "not enabled")
endif()
#report(OpenCV ${OpenCV_VERSION})
if(SWIG_FOUND)
report(SWIG ${SWIG_VERSION})
else()
report(SWIG "not found")
endif()
if(EIGEN3_FOUND)
report(Eigen3 ${EIGEN3_VERSION})
else()
report(Eigen3 "not found")
endif()
report(QtCore ${QtCore_VERSION})
report(QtNetwork ${QtNetwork_VERSION})
report(QtXml ${QtXml_VERSION})
if (BUILD_GUI)
report(QtWidgets ${QtWidgets_VERSION})
report(QtPrintSupport ${QtPrintSupport_VERSION})
report(QtOpenGL ${QtOpenGL_VERSION})
report(QtSvg ${QtSvg_VERSION})
report(QtUiTools ${QtUiTools_VERSION})
report(QtConcurrent ${QtConcurrent_VERSION})
if(BUILD_WEB)
report(QtWebEngineWidgets ${QtWebEngineWidgets_VERSION})
else()
report(QtWebEngineWidgets "not needed (BUILD_WEB is OFF)")
endif()
if(BUILD_DESIGNER_PLUGIN)
report(DesignerPlugin "${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}")
else()
report(DesignerPlugin "not built (BUILD_DESIGNER_PLUGIN is OFF)")
endif()
else()
report(QtWidgets "not needed")
report(QtPrintSupport "not needed")
report(QtOpenGL "not needed")
report(QtSvg "not needed")
report(QtUiTools "not needed")
report(QtConcurrent "not needed")
report(QtWebKitWidgets "not needed")
endif()
if(DEFINED MACPORTS_PREFIX)
if(Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
report(Shiboken "${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
else()
report(Shiboken "not found (only searched if MACPORTS_PREFIX is defined)")
endif()
if(PySide_FOUND)
report(PySide "${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
if(NOT PYSIDE_INCLUDE_DIR)
report(IncludeDir "Unable to find, python version mismatch?")
endif()
else()
report(PySide: "not found (only searched if MACPORTS_PREFIX is defined)")
endif()
endif()
if(PySide${SHIBOKEN_MAJOR_VERSION}_FOUND)
report(PySide "${PYSIDE_VERSION} [${PYSIDE_INCLUDE_DIR}]")
if(NOT PYSIDE_INCLUDE_DIR)
report(PySideIncludeDir "Unable to find, python version mismatch?")
endif()
else()
report(PySide "not found")
endif()
if(PYSIDE_TOOLS_FOUND)
report(PySideTools "[${PYSIDE_UIC_EXECUTABLE}] [${PYSIDE_RCC_EXECUTABLE}]")
else()
report(PySideTools "not found")
endif()
if(FREECAD_USE_FREETYPE)
if(FREETYPE_FOUND)
report(Freetype ${FREETYPE_VERSION_STRING})
else()
report(Freetype "not found")
endif()
else()
report(Freetype "disabled")
endif()
report(OpenGL ${OPENGL_gl_LIBRARY})
report(OpenGLU "[${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")
report(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
report(Pivy ${PIVY_VERSION})
if (WIN32)
#report(SPNAV "not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
else()
if(SPNAV_FOUND)
report(SPNAV "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
else()
report(SPNAV "not found")
endif()
endif()
if(MATPLOTLIB_FOUND)
report(Matplotlib ${MATPLOTLIB_VERSION})
else()
report(Matplotlib "not found")
endif()
if(BUILD_VR)
if(RIFT_FOUND)
report(Rift ${Rift_VERSION})
else()
report(Rift "not found")
endif()
else()
report(Rift "not enabled (BUILD_VR)")
endif()
if(DOXYGEN_FOUND)
report(Doxygen ${DOXYGEN_VERSION})
report(Language ${DOXYGEN_LANGUAGE})
if(COIN3D_DOC_FOUND)
report(Coin3D_DOC "found [${COIN3D_DOC_PATH}]")
else()
report(Coin3D_DOC "not found")
endif()
else()
report(Doxygen "not found")
endif()
if(BUILD_TEST)
report(Tests "ON")
else()
report(Tests "OFF")
endif()
# Print message to start build process
message("=================================================\n"
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
"=================================================\n")
endmacro()