mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
Require SWIG 4.1 in CMake
Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -70,12 +70,12 @@ if(IFCOPENSHELL_IFCWRAP_STANDALONE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(SWIG)
|
find_package(SWIG 4.1)
|
||||||
if(NOT SWIG_FOUND)
|
if(NOT SWIG_FOUND)
|
||||||
message(
|
message(
|
||||||
FATAL_ERROR
|
FATAL_ERROR
|
||||||
"BUILD_IFCPYTHON enabled, but unable to find SWIG. Disable BUILD_IFCPYTHON or fix SWIG paths to proceed. "
|
"BUILD_IFCPYTHON requires SWIG 4.1 or newer. Disable BUILD_IFCPYTHON or fix SWIG paths to proceed. "
|
||||||
"Likely SWIG_EXECUTABLE is missing (current value - '${SWIG_EXECUTABLE}')."
|
"Found version '${SWIG_VERSION}' at '${SWIG_EXECUTABLE}'."
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
@@ -108,14 +108,6 @@ ENDIF()
|
|||||||
set(_python_libs_version "${Python_VERSION_MAJOR}${Python_VERSION_MINOR}")
|
set(_python_libs_version "${Python_VERSION_MAJOR}${Python_VERSION_MINOR}")
|
||||||
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
#`%feature("python:abc")` is a feature we use in swig template.
|
|
||||||
# Nn swig < 4.1 it works only if `-py3` is set explictily,
|
|
||||||
# in swig 4.1+ `-py3` is no-op.
|
|
||||||
# E.g. Ubuntu 22.04 is still using swig 4.0.2.
|
|
||||||
if(SWIG_VERSION VERSION_LESS "4.1")
|
|
||||||
list(APPEND SWIG_DEFINES -py3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
SET(CMAKE_SWIG_FLAGS ${SWIG_DEFINES})
|
SET(CMAKE_SWIG_FLAGS ${SWIG_DEFINES})
|
||||||
|
|
||||||
if(WITH_CGAL)
|
if(WITH_CGAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user