mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
examples - build IfcAlignment using cmake package
This commit is contained in:
@@ -212,6 +212,8 @@ jobs:
|
||||
./IfcParseExamples "../IfcParseExamples_test.ifc"
|
||||
./IfcOpenHouse
|
||||
./IfcAdvancedHouse
|
||||
./IfcAlignment
|
||||
./IfcSimplifiedAlignment
|
||||
|
||||
- name: Test ifcopenshell-python
|
||||
run: |
|
||||
|
||||
@@ -88,14 +88,26 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT STANDALONE_PROJECT AND SCHEMA_VERSIONS MATCHES "4x3_add2")
|
||||
if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "4x3_add2")
|
||||
add_executable(IfcAlignment IfcAlignment.cpp)
|
||||
target_link_libraries(IfcAlignment ${IFCOPENSHELL_LIBRARIES})
|
||||
set_target_properties(IfcAlignment PROPERTIES FOLDER Examples)
|
||||
|
||||
add_executable(IfcSimplifiedAlignment IfcSimplifiedAlignment.cpp)
|
||||
target_link_libraries(IfcSimplifiedAlignment ${IFCOPENSHELL_LIBRARIES})
|
||||
set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples)
|
||||
add_library(IfcAlignmentInterface INTERFACE)
|
||||
|
||||
if(STANDALONE_PROJECT)
|
||||
target_include_directories(IfcAlignmentInterface INTERFACE "${IfcOpenShell_DIR}/../../../include")
|
||||
target_include_directories(IfcAlignmentInterface INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_compile_definitions(IfcAlignmentInterface INTERFACE HAS_SCHEMA_4x3_add2 IFOPSH_WITH_ROCKSDB)
|
||||
target_link_libraries(IfcAlignment PRIVATE IfcOpenShell::IfcParse)
|
||||
target_link_libraries(IfcSimplifiedAlignment PRIVATE IfcOpenShell::IfcParse)
|
||||
else()
|
||||
target_include_directories(IfcAlignmentInterface INTERFACE "${CMAKE_SOURCE_DIR}/../src")
|
||||
target_link_libraries(IfcAlignmentInterface INTERFACE ${IFCOPENSHELL_LIBRARIES})
|
||||
set_target_properties(IfcAlignment PROPERTIES FOLDER Examples)
|
||||
set_target_properties(IfcSimplifiedAlignment PROPERTIES FOLDER Examples)
|
||||
endif()
|
||||
|
||||
target_link_libraries(IfcAlignment PRIVATE IfcAlignmentInterface)
|
||||
target_link_libraries(IfcSimplifiedAlignment PRIVATE IfcAlignmentInterface)
|
||||
|
||||
install(TARGETS IfcAlignment IfcSimplifiedAlignment)
|
||||
endif()
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// Disable warnings coming from IfcOpenShell
|
||||
#pragma warning(disable : 4018 4267 4250 4984 4985)
|
||||
|
||||
#include "../ifcparse/Ifc4x3_add2.h"
|
||||
#include "../ifcparse/IfcHierarchyHelper.h"
|
||||
#include "ifcparse/Ifc4x3_add2.h"
|
||||
#include "ifcparse/IfcHierarchyHelper.h"
|
||||
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <fstream>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// Disable warnings coming from IfcOpenShell
|
||||
#pragma warning(disable : 4018 4267 4250 4984 4985)
|
||||
|
||||
#include "../ifcparse/Ifc4x3_add2.h"
|
||||
#include "../ifcparse/IfcAlignmentHelper.h"
|
||||
#include "ifcparse/Ifc4x3_add2.h"
|
||||
#include "ifcparse/IfcAlignmentHelper.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Example of building IfcParseExamples outside of the IfcOpenShell build tree.
|
||||
Example of building examples outside of the IfcOpenShell build tree.
|
||||
|
||||
```powershell
|
||||
$IFCOPENSHELL_ROOT="L:\Projects\Github\IfcOpenShell"
|
||||
@@ -9,6 +9,13 @@ $PREFIX_PATH+=";$IFCOPENSHELL_ROOT\_deps-vs2022-x64-installed\rocksdb"
|
||||
$PREFIX_PATH+=";$IFCOPENSHELL_ROOT\_deps-vs2022-x64-installed\zstd"
|
||||
$PREFIX_PATH+=";L:\Software\usr\libxml2"
|
||||
|
||||
# + Support for IfcHouse and IfcAlignment examples.
|
||||
$PREFIX_PATH+=";L:\Software\usr\eigen-3.3.9"
|
||||
$PREFIX_PATH+=";L:\Projects\Github\IfcOpenShell\_deps-vs2022-x64-installed\cgal"
|
||||
$PREFIX_PATH+=";L:\Projects\Github\IfcOpenShell\_deps-vs2022-x64-installed\mpir"
|
||||
$PREFIX_PATH+=";L:\Projects\Github\IfcOpenShell\_deps-vs2022-x64-installed\mpfr"
|
||||
$PREFIX_PATH+=";L:\Projects\Github\IfcOpenShell\_deps-vs2022-x64-installed\opencascade-7.8.1-new-layout"
|
||||
|
||||
cmake .. -G Ninja -DCMAKE_PREFIX_PATH="$PREFIX_PATH" -DCMAKE_BUILD_TYPE=Release
|
||||
ninja -v
|
||||
./IfcParseExamples.exe "../IfcParseExamples_test.ifc"
|
||||
|
||||
Reference in New Issue
Block a user