1111 MESSAGE (STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR} " )
1212ENDIF ()
1313
14- FIND_FILE (gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc )
14+ FIND_FILE (gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc /usr/local/include/oce )
1515IF (gp_Pnt_hxx)
1616 MESSAGE (STATUS "Header files found" )
1717ELSE ()
@@ -41,7 +41,7 @@ FIND_LIBRARY(icu "icuuc" /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
4141IF (icu)
4242 MESSAGE (STATUS "ICU libraries found" )
4343ELSE ()
44- MESSAGE (STATUS "Unable to find ICU library files, aborting " )
44+ MESSAGE (STATUS "Unable to find ICU library files, continuing " )
4545 ADD_DEFINITIONS (-DHAVE_ICU )
4646ENDIF ()
4747
@@ -72,7 +72,7 @@ IF(NOT CMAKE_BUILD_TYPE)
7272ENDIF (NOT CMAKE_BUILD_TYPE )
7373ADD_DEFINITIONS (-fPIC -Wno-non-virtual-dtor )
7474
75- INCLUDE_DIRECTORIES (${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc )
75+ INCLUDE_DIRECTORIES (${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc /usr/local/include/oce )
7676ADD_LIBRARY (IfcParse STATIC
7777 ../src/ifcparse/Ifc2x3.cpp
7878 ../src/ifcparse/IfcUtil.cpp
@@ -91,7 +91,10 @@ ADD_LIBRARY(IfcGeom STATIC
9191 ../src/ifcgeom/IfcRegister.cpp
9292)
9393
94- TARGET_LINK_LIBRARIES (IfcParse icuuc )
94+ IF (icu)
95+ TARGET_LINK_LIBRARIES (IfcParse icuuc )
96+ ENDIF ()
97+
9598TARGET_LINK_LIBRARIES (IfcGeom IfcParse )
9699
97100LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 )
@@ -103,3 +106,36 @@ ADD_SUBDIRECTORY(../src/ifcwrap ifcwrap)
103106
104107# Build IfcParseExamples using separate CMakeLists.txt
105108ADD_SUBDIRECTORY (../src/examples examples )
109+
110+ # CMake installation targets
111+ SET (include_files_geom
112+ ../src/ifcgeom/IfcGeom.h
113+ ../src/ifcgeom/IfcGeomObjects.h
114+ ../src/ifcgeom/IfcRegister.h
115+ ../src/ifcgeom/IfcRegisterConvertCurve.h
116+ ../src/ifcgeom/IfcRegisterConvertFace.h
117+ ../src/ifcgeom/IfcRegisterConvertShape.h
118+ ../src/ifcgeom/IfcRegisterConvertShapes.h
119+ ../src/ifcgeom/IfcRegisterConvertWire.h
120+ ../src/ifcgeom/IfcRegisterCreateCache.h
121+ ../src/ifcgeom/IfcRegisterDef.h
122+ ../src/ifcgeom/IfcRegisterGeomHeader.h
123+ ../src/ifcgeom/IfcRegisterIsShapeCollection.h
124+ ../src/ifcgeom/IfcRegisterPurgeCache.h
125+ ../src/ifcgeom/IfcRegisterUndef.h
126+ ../src/ifcgeom/IfcShapeList.h
127+ )
128+ SET (include_files_parse
129+ ../src/ifcparse/Ifc2x3.h
130+ ../src/ifcparse/Ifc2x3enum.h
131+ ../src/ifcparse/IfcCharacterDecoder.h
132+ ../src/ifcparse/IfcException.h
133+ ../src/ifcparse/IfcFile.h
134+ ../src/ifcparse/IfcParse.h
135+ ../src/ifcparse/IfcUtil.h
136+ ../src/ifcparse/SharedPointer.h
137+ )
138+ INSTALL (FILES ${include_files_geom} DESTINATION include/ifcgeom)
139+ INSTALL (FILES ${include_files_parse} DESTINATION include/ifcparse)
140+ INSTALL (TARGETS IfcObj DESTINATION bin)
141+ INSTALL (TARGETS IfcParse IfcGeom DESTINATION lib)
0 commit comments