mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 04:16:25 +00:00
Fixes to build on openSUSE/Packman. (#67)
- Support different BINDIR, INCLUDEDIR and LIBDIR on install - Take right python dir on x86_64 arch - Fix build against Boost >= 1.58 - Make it possible to build libIfcGeom shared to reduce size of dependent binaries - Fix INSTALL_RPATH - Fix some more compiler warnings
This commit is contained in:
committed by
Thomas Krijnen
parent
414d7bb810
commit
42188904af
@@ -52,14 +52,15 @@ ENDIF()
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(IfcPython.i PROPERTIES CPLUSPLUS ON)
|
||||
SWIG_ADD_MODULE(ifcopenshell_wrapper python IfcPython.i)
|
||||
SWIG_LINK_LIBRARIES(ifcopenshell_wrapper IfcParse IfcGeom ${PYTHON_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${ICU_LIBRARIES})
|
||||
SWIG_LINK_LIBRARIES(ifcopenshell_wrapper ${IFCLIBS} ${PYTHON_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${ICU_LIBRARIES})
|
||||
SET_INSTALL_RPATHS(${SWIG_MODULE_ifcopenshell_wrapper_REAL_NAME} "${IFCDIRS};${OCC_LIBRARY_DIR};${ICU_LIBRARY_DIR}")
|
||||
|
||||
# Try to find the Python interpreter to get the site-packages
|
||||
# directory in which the wrapper can be installed.
|
||||
FIND_PACKAGE(PythonInterp)
|
||||
IF(PYTHONINTERP_FOUND)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib())"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib(1))"
|
||||
OUTPUT_VARIABLE python_package_dir
|
||||
)
|
||||
|
||||
|
||||
@@ -387,6 +387,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
throw IfcParse::IfcException("Invalid additional representation specified");
|
||||
}
|
||||
}
|
||||
return boost::variant<IfcGeom::Element<double>*, IfcGeom::Representation::Representation*>();
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user