mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
CMake biz: Instead of providing elusive prints of missing dependencies for required features and continuing the build configuration, fail fast instead; user can easily disable the feature or fix the paths for the dependency.
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
################################################################################
|
||||
|
||||
FIND_PACKAGE(SWIG)
|
||||
|
||||
IF(SWIG_FOUND)
|
||||
IF(NOT SWIG_FOUND)
|
||||
MESSAGE(FATAL_ERROR "BUILD_IFCPYTHON enabled, but unable to find SWIG. Disable BUILD_IFCPYTHON or fix SWIG paths to proceed.")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(${SWIG_USE_FILE})
|
||||
|
||||
@@ -33,8 +34,9 @@ IF(NOT "$ENV{PYTHON_LIBRARY}" STREQUAL "")
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(PythonLibs)
|
||||
|
||||
IF(PYTHONLIBS_FOUND)
|
||||
IF(NOT PYTHONLIBS_FOUND)
|
||||
MESSAGE(FATAL_ERROR "BUILD_IFCPYTHON enabled, but unable to find Python. Disable BUILD_IFCPYTHON or fix Python paths to proceed.")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
|
||||
|
||||
@@ -70,7 +72,3 @@ INSTALL(FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/geom/__init__.py"
|
||||
DESTINATION "${python_package_dir}/ifcopenshell/geom")
|
||||
INSTALL(TARGETS _ifcopenshell_wrapper DESTINATION "${python_package_dir}/ifcopenshell")
|
||||
|
||||
ENDIF(PYTHONLIBS_FOUND)
|
||||
|
||||
ENDIF(SWIG_FOUND)
|
||||
|
||||
@@ -17,12 +17,6 @@
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
OPTION( QT_USE_QTVIEWER "IfcOpenShell QT GUI Viewer, QT environment required" OFF )
|
||||
|
||||
|
||||
IF (QT_USE_QTVIEWER)
|
||||
|
||||
|
||||
# Find QT header files
|
||||
SET(QT_MIN_VERSION "4.5.0")
|
||||
FIND_PACKAGE(Qt4 REQUIRED)
|
||||
@@ -59,6 +53,3 @@ ADD_EXECUTABLE( QTviewer ${QTviewer_SRCS} ${QTviewer_MOC_SRCS})
|
||||
#http://www.qtcentre.org/wiki/index.php?title=Compiling_Qt4_apps_with_CMake
|
||||
|
||||
TARGET_LINK_libRARIES (QTviewer IfcParse IfcGeom ${QT_LIBRARIES} ${OPENCASCADE_LIBRARIES})
|
||||
|
||||
|
||||
ENDIF (QT_USE_QTVIEWER)
|
||||
|
||||
Reference in New Issue
Block a user