examples - further simplify linking

This commit is contained in:
Andrej730
2025-12-12 18:58:04 +05:00
parent b237fac4b8
commit dd683d1115
5 changed files with 18 additions and 22 deletions
+6 -12
View File
@@ -39,6 +39,8 @@ if(STANDALONE_PROJECT)
find_package(IfcOpenShell CONFIG REQUIRED)
set(SCHEMA_VERSIONS ${IFCOPENSHELL_SCHEMA_VERSIONS})
set(WITH_OPENCASCADE ${IFCOPENSHELL_WITH_OPENCASCADE})
else()
include_directories("${CMAKE_SOURCE_DIR}/../src")
endif()
if(SCHEMA_VERSIONS MATCHES "2x3")
@@ -62,16 +64,10 @@ if(SCHEMA_VERSIONS MATCHES "2x3")
find_package(Eigen3 CONFIG REQUIRED)
find_package(CGAL CONFIG REQUIRED)
find_package(OpenCASCADE CONFIG REQUIRED)
add_library(CGAL::CGAL_INTERFACE INTERFACE IMPORTED)
target_link_libraries(CGAL::CGAL_INTERFACE INTERFACE CGAL::CGAL)
target_link_libraries(IfcHouseInterface
INTERFACE ${OpenCASCADE_LIBRARIES} RocksDB::rocksdb
IfcOpenShell::IfcParse IfcOpenShell::geometry_serializer
)
target_link_libraries(IfcHouseInterface INTERFACE IfcOpenShell::IfcParse IfcOpenShell::geometry_serializer)
else()
target_include_directories(IfcHouseInterface INTERFACE "${CMAKE_SOURCE_DIR}/../src")
target_link_libraries(IfcHouseInterface INTERFACE ${IFCOPENSHELL_LIBRARIES} ${OpenCASCADE_LIBRARIES})
target_link_libraries(IfcHouseInterface INTERFACE IfcParse geometry_serializer)
set_target_properties(IfcOpenHouse PROPERTIES FOLDER Examples)
set_target_properties(IfcAdvancedHouse PROPERTIES FOLDER Examples)
endif()
@@ -87,11 +83,9 @@ if(SCHEMA_VERSIONS MATCHES "4x3_add2")
add_library(IfcAlignmentInterface INTERFACE)
if(STANDALONE_PROJECT)
target_link_libraries(IfcAlignment PRIVATE IfcOpenShell::IfcParse)
target_link_libraries(IfcSimplifiedAlignment PRIVATE IfcOpenShell::IfcParse)
target_link_libraries(IfcAlignmentInterface INTERFACE IfcOpenShell::IfcParse)
else()
target_include_directories(IfcAlignmentInterface INTERFACE "${CMAKE_SOURCE_DIR}/../src")
target_link_libraries(IfcAlignmentInterface INTERFACE ${IFCOPENSHELL_LIBRARIES})
target_link_libraries(IfcAlignmentInterface INTERFACE IfcParse)
set_target_properties(IfcAlignment PROPERTIES FOLDER Examples)
set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples)
endif()