Skip to content

Commit

Permalink
[opencascade] Fix find_dependency missing (#30853)
Browse files Browse the repository at this point in the history
* [opencascade] Fix feature dependence

* update version

* update version

* Apply suggesstion

* update version

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Zhao Liu <v-zhli17@microsoft.com>
  • Loading branch information
3 people committed Jun 22, 2023
1 parent 6507e8c commit b8d272a
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
26 changes: 26 additions & 0 deletions ports/opencascade/fix-dependence.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in
index c926c499..2fbc4023 100644
--- a/adm/templates/OpenCASCADEConfig.cmake.in
+++ b/adm/templates/OpenCASCADEConfig.cmake.in
@@ -4,6 +4,7 @@
#
# This file is configured by OpenCASCADE.
#
+include(CMakeFindDependencyMacro)

if(OpenCASCADE_ALREADY_INCLUDED)
return()
@@ -71,6 +72,13 @@ set (OpenCASCADE_WITH_GLES2 @USE_GLES2@)
@SET_OpenCASCADE_WITH_D3D@
@SET_OpenCASCADE_WITH_GLX@

+if(@USE_FREETYPE@)
+ find_dependency(freetype CONFIG)
+endif()
+
+find_dependency(OpenGL)
+find_dependency(Eigen3 REQUIRED)
+
# Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
foreach(f ${CONFIG_FILES})
1 change: 1 addition & 0 deletions ports/opencascade/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_github(
fix-install-prefix-path.patch
install-include-dir.patch
fix-depend-freetype.patch
fix-dependence.patch
)

if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Expand Down
2 changes: 1 addition & 1 deletion ports/opencascade/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencascade",
"version": "7.6.2",
"port-version": 5,
"port-version": 6,
"description": "Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE.",
"homepage": "https://github.com/Open-Cascade-SAS/OCCT",
"license": "LGPL-2.1",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5898,7 +5898,7 @@
},
"opencascade": {
"baseline": "7.6.2",
"port-version": 5
"port-version": 6
},
"opencc": {
"baseline": "1.1.6",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencascade.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3a62400394101d54a0bea8a45ac0c1f68cf27b68",
"version": "7.6.2",
"port-version": 6
},
{
"git-tree": "c368cdc0775dea309e247518b3931795487cb5f0",
"version": "7.6.2",
Expand Down

0 comments on commit b8d272a

Please sign in to comment.