mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 04:08:04 +00:00
Add Options on Cmake to selectively compile IFCConvert and IFCGeomServer
This commit is contained in:
+18
-1
@@ -27,6 +27,8 @@ OPTION(ENABLE_BUILD_OPTIMIZATIONS "Enable certain compiler and linker optimizati
|
|||||||
OPTION(IFCCONVERT_DOUBLE_PRECISION "IfcConvert: Use double precision floating-point numbers." ON)
|
OPTION(IFCCONVERT_DOUBLE_PRECISION "IfcConvert: Use double precision floating-point numbers." ON)
|
||||||
OPTION(BUILD_IFCPYTHON "Build IfcPython." ON)
|
OPTION(BUILD_IFCPYTHON "Build IfcPython." ON)
|
||||||
OPTION(BUILD_EXAMPLES "Build example applications." ON)
|
OPTION(BUILD_EXAMPLES "Build example applications." ON)
|
||||||
|
OPTION(BUILD_GEOMSERVER "Build IfcGeomServer executable." ON)
|
||||||
|
OPTION(BUILD_CONVERT "Build IfcConvert executable." ON)
|
||||||
OPTION(USE_VLD "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF)
|
OPTION(USE_VLD "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF)
|
||||||
OPTION(USE_MMAP "Adds a command line options to parse IFC files from memory mapped files using Boost.Iostreams" OFF)
|
OPTION(USE_MMAP "Adds a command line options to parse IFC files from memory mapped files using Boost.Iostreams" OFF)
|
||||||
OPTION(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." OFF)
|
OPTION(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." OFF)
|
||||||
@@ -582,6 +584,7 @@ set_target_properties(IfcGeom PROPERTIES COMPILE_FLAGS -DIFC_GEOM_EXPORTS)
|
|||||||
TARGET_LINK_LIBRARIES(IfcGeom IfcGeom_ifc2x3 IfcGeom_ifc4)
|
TARGET_LINK_LIBRARIES(IfcGeom IfcGeom_ifc2x3 IfcGeom_ifc4)
|
||||||
|
|
||||||
# IfcConvert
|
# IfcConvert
|
||||||
|
if(BUILD_CONVERT)
|
||||||
file(GLOB IFCCONVERT_CPP_FILES ../src/ifcconvert/*.cpp)
|
file(GLOB IFCCONVERT_CPP_FILES ../src/ifcconvert/*.cpp)
|
||||||
file(GLOB IFCCONVERT_H_FILES ../src/ifcconvert/*.h)
|
file(GLOB IFCCONVERT_H_FILES ../src/ifcconvert/*.h)
|
||||||
set(IFCCONVERT_FILES ${IFCCONVERT_CPP_FILES} ${IFCCONVERT_H_FILES})
|
set(IFCCONVERT_FILES ${IFCCONVERT_CPP_FILES} ${IFCCONVERT_H_FILES})
|
||||||
@@ -597,8 +600,16 @@ if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
|||||||
# but probably a good indication of whether RPATHs are necessary.
|
# but probably a good indication of whether RPATHs are necessary.
|
||||||
SET_INSTALL_RPATHS(IfcConvert "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS};${OPENCOLLADA_LIBRARY_DIR};${ICU_LIBRARY_DIR}")
|
SET_INSTALL_RPATHS(IfcConvert "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS};${OPENCOLLADA_LIBRARY_DIR};${ICU_LIBRARY_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
INSTALL(TARGETS IfcConvert
|
||||||
|
ARCHIVE DESTINATION ${LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${BINDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
# IfcGeomServer
|
# IfcGeomServer
|
||||||
|
if(BUILD_GEOMSERVER)
|
||||||
file(GLOB CPP_FILES ../src/ifcgeomserver/*.cpp)
|
file(GLOB CPP_FILES ../src/ifcgeomserver/*.cpp)
|
||||||
file(GLOB H_FILES ../src/ifcgeomserver/*.h)
|
file(GLOB H_FILES ../src/ifcgeomserver/*.h)
|
||||||
set(SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
set(SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
||||||
@@ -606,6 +617,12 @@ ADD_EXECUTABLE(IfcGeomServer ${SOURCE_FILES})
|
|||||||
TARGET_LINK_LIBRARIES(IfcGeomServer ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${ICU_LIBRARIES})
|
TARGET_LINK_LIBRARIES(IfcGeomServer ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${ICU_LIBRARIES})
|
||||||
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
||||||
SET_INSTALL_RPATHS(IfcGeomServer "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS};${ICU_LIBRARY_DIR}")
|
SET_INSTALL_RPATHS(IfcGeomServer "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS};${ICU_LIBRARY_DIR}")
|
||||||
|
INSTALL(TARGETS IfcGeomServer
|
||||||
|
ARCHIVE DESTINATION ${LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${BINDIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF(BUILD_IFCPYTHON)
|
IF(BUILD_IFCPYTHON)
|
||||||
@@ -629,7 +646,7 @@ INSTALL(FILES ${IFCGEOM_H_FILES}
|
|||||||
DESTINATION ${INCLUDEDIR}/ifcgeom
|
DESTINATION ${INCLUDEDIR}/ifcgeom
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL(TARGETS IfcParse IfcGeom_ifc2x3 IfcGeom_ifc4 IfcConvert IfcGeomServer
|
INSTALL(TARGETS IfcParse IfcGeom_ifc2x3 IfcGeom_ifc4
|
||||||
ARCHIVE DESTINATION ${LIBDIR}
|
ARCHIVE DESTINATION ${LIBDIR}
|
||||||
LIBRARY DESTINATION ${LIBDIR}
|
LIBRARY DESTINATION ${LIBDIR}
|
||||||
RUNTIME DESTINATION ${BINDIR}
|
RUNTIME DESTINATION ${BINDIR}
|
||||||
|
|||||||
Reference in New Issue
Block a user