From 6a7ecf7f58822c7b442cb05e9251beec277ef0a1 Mon Sep 17 00:00:00 2001 From: Esteban DUGUEPEROUX Date: Mon, 10 Nov 2025 21:21:52 +0100 Subject: [PATCH] cmake: Have a dedicated CMakeLists.txt for IfcGeomServer --- cmake/CMakeLists.txt | 21 +-------------------- src/ifcgeomserver/CMakeLists.txt | 9 +++++++++ 2 files changed, 10 insertions(+), 20 deletions(-) create mode 100644 src/ifcgeomserver/CMakeLists.txt diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0deeb512fe..5792954570 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1174,26 +1174,7 @@ endif(BUILD_CONVERT) # IfcGeomServer if(BUILD_GEOMSERVER) - - if(NOT WITH_OPENCASCADE) - message(FATAL_ERROR "Open CASCADE is required to build IfcGeomServer.") - endif() - - file(GLOB CPP_FILES ../src/ifcgeomserver/*.cpp) - file(GLOB H_FILES ../src/ifcgeomserver/*.h) - set(SOURCE_FILES ${CPP_FILES} ${H_FILES}) - add_executable(IfcGeomServer ${SOURCE_FILES}) - target_link_libraries(IfcGeomServer IfcGeom IfcParse ${kernel_libraries} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES}) - - if((NOT WIN32) AND BUILD_SHARED_LIBS) - SET_INSTALL_RPATHS(IfcGeomServer "${IFCOPENSHELL_LIBRARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS}") - endif() - - install(TARGETS IfcGeomServer - ARCHIVE DESTINATION ${LIBDIR} - LIBRARY DESTINATION ${LIBDIR} - RUNTIME DESTINATION ${BINDIR} - ) + add_subdirectory(../src/ifcgeomserver ifcgeomserver) endif(BUILD_GEOMSERVER) if(ADD_COMMIT_SHA) diff --git a/src/ifcgeomserver/CMakeLists.txt b/src/ifcgeomserver/CMakeLists.txt new file mode 100644 index 0000000000..429d56c056 --- /dev/null +++ b/src/ifcgeomserver/CMakeLists.txt @@ -0,0 +1,9 @@ +find_package(Boost COMPONENTS chrono REQUIRED) + +file(GLOB CPP_FILES *.cpp) +file(GLOB H_FILES *.h) +set(SOURCE_FILES ${CPP_FILES} ${H_FILES}) +add_executable(IfcGeomServer ${SOURCE_FILES}) +target_link_libraries(IfcGeomServer IfcGeom ${kernel_libraries} ${OPENCASCADE_LIBRARIES}) + +install(TARGETS IfcGeomServer) \ No newline at end of file