Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cad/librepcb: add support of OpenCascade
Patch from upstream, slightly modified because cad/opencascade has been fixed against the reported crash. PR: 277312 Approved by: yuri (maintainer)
- Loading branch information
1 parent
7632031
commit b7bc96c
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- cmake/FindOpenCascade.cmake.orig 2023-09-24 10:47:05 UTC | ||
+++ cmake/FindOpenCascade.cmake | ||
@@ -1,6 +1,3 @@ | ||
-# Specify OpenCascade libraries needed for LibrePCB | ||
-set(OCC_LIBRARIES TKXCAF TKXDESTEP) | ||
- | ||
# Add library | ||
add_library(open_cascade INTERFACE) | ||
add_library(OpenCascade::OpenCascade ALIAS open_cascade) | ||
@@ -15,8 +12,16 @@ if(OpenCASCADE_FOUND) | ||
# Try to find OCCT shared library on the system | ||
find_package(OpenCASCADE CONFIG QUIET) | ||
if(OpenCASCADE_FOUND) | ||
- message(STATUS "Using system OpenCASCADE (OCCT)") | ||
+ message(STATUS "Using system OpenCASCADE (OCCT ${OpenCASCADE_VERSION})") | ||
|
||
+ # Specify OpenCascade libraries needed for LibrePCB | ||
+ # https://github.com/LibrePCB/LibrePCB/issues/1315 | ||
+ if(OpenCASCADE_VERSION VERSION_GREATER_EQUAL 7.8.0) | ||
+ set(OCC_LIBRARIES TKCAF TKDESTEP) | ||
+ else() | ||
+ set(OCC_LIBRARIES TKXCAF TKXDESTEP) | ||
+ endif() | ||
+ | ||
# Populate target | ||
target_include_directories( | ||
open_cascade SYSTEM INTERFACE "${OpenCASCADE_INCLUDE_DIR}" | ||
@@ -32,7 +37,10 @@ if(OCE_FOUND) | ||
# Try to find OCE shared library on the system | ||
find_package(OCE CONFIG QUIET) | ||
if(OCE_FOUND) | ||
- message(STATUS "Using system OpenCASCADE (OCE)") | ||
+ message(STATUS "Using system OpenCASCADE (OCE ${OCE_VERSION})") | ||
+ | ||
+ # Specify OpenCascade libraries needed for LibrePCB | ||
+ set(OCC_LIBRARIES TKXCAF TKXDESTEP) | ||
|
||
# Populate target | ||
target_include_directories( |