Skip to content

Commit 478bda3

Browse files
committed
Install both libraries. Force IfcGeom to static on Windows. Correct IfcParse linkage. Update IfcMax
1 parent ea6fbc7 commit 478bda3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

cmake/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ endforeach()
452452

453453
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
454454

455-
add_library(IfcParse STATIC ${IFCPARSE_FILES})
455+
add_library(IfcParse ${IFCPARSE_FILES})
456456
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIfcParse_EXPORTS)
457457

458458
IF(UNICODE_SUPPORT)
@@ -463,13 +463,17 @@ ENDIF()
463463
file(GLOB IFCGEOM_H_FILES ../src/ifcgeom/*.h)
464464
file(GLOB IFCGEOM_CPP_FILES ../src/ifcgeom/*.cpp)
465465
set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES})
466+
466467
IF(BUILD_SHARED_LIBS)
467-
message(WARNING "Building IfcGeom as shared library not currently supported")
468-
add_library(IfcGeom SHARED ${IFCGEOM_FILES})
469-
ELSE()
470-
add_library(IfcGeom ${IFCGEOM_FILES})
468+
message(WARNING "Building IfcGeom as shared library currently not supported depending on platform and compiler options")
471469
ENDIF()
472470

471+
if(WIN32)
472+
add_library(IfcGeom STATIC ${IFCGEOM_FILES})
473+
else()
474+
add_library(IfcGeom ${IFCGEOM_FILES})
475+
endif()
476+
473477
TARGET_LINK_LIBRARIES(IfcGeom IfcParse)
474478

475479
# IfcConvert
@@ -528,7 +532,7 @@ INSTALL(FILES ${IFCGEOM_H_FILES}
528532
DESTINATION ${INCLUDEDIR}/ifcgeom
529533
)
530534

531-
INSTALL(TARGETS ${IFCOPENSHELL_LIBRARIES} IfcConvert IfcGeomServer
535+
INSTALL(TARGETS IfcParse IfcGeom IfcConvert IfcGeomServer
532536
ARCHIVE DESTINATION ${LIBDIR}
533537
LIBRARY DESTINATION ${LIBDIR}
534538
RUNTIME DESTINATION ${BINDIR}

src/ifcmax/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DI
2828

2929
ADD_LIBRARY(IfcMax SHARED IfcMax.h IfcMax.cpp)
3030

31-
TARGET_LINK_LIBRARIES(IfcMax ${IFCLIBS} Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
31+
# TODO: find the minimal subset of 3dsmax libraries to reference
32+
TARGET_LINK_LIBRARIES(IfcMax ${IFCOPENSHELL_LIBRARIES} Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
3233
flt.lib geom.lib gfx.lib gup.lib imageViewers.lib ManipSys.lib maxnet.lib Maxscrpt.lib
3334
maxutil.lib MenuMan.lib menus.lib mesh.lib MNMath.lib Paramblk2.lib particle.lib Poly.lib RenderUtil.lib
3435
tessint.lib viewfile.lib ${OPENCASCADE_LIBRARIES}

0 commit comments

Comments
 (0)