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:
Johannes Obermayr
2016-05-15 15:47:21 +02:00
committed by Thomas Krijnen
parent 414d7bb810
commit 42188904af
13 changed files with 97 additions and 38 deletions
+3 -2
View File
@@ -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
)
+1
View File
@@ -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*>();
}
%}