From 250ea54a8c9c730cc0bc8e2fe9c0dbc1de77fac0 Mon Sep 17 00:00:00 2001 From: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> Date: Sat, 26 Aug 2023 03:07:42 +0800 Subject: [PATCH] [opencascade] Fix usage issue (#33252) * [opencascade] Fix usage issue * Apply suggestion --- ports/opencascade/fix-depend-freetype.patch | 2 +- ports/opencascade/fix-dependence.patch | 16 ++++++++----- ports/opencascade/install-include-dir.patch | 26 ++++++--------------- ports/opencascade/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/o-/opencascade.json | 5 ++++ 6 files changed, 25 insertions(+), 28 deletions(-) diff --git a/ports/opencascade/fix-depend-freetype.patch b/ports/opencascade/fix-depend-freetype.patch index b37b7ee4e0..4abcddf6db 100644 --- a/ports/opencascade/fix-depend-freetype.patch +++ b/ports/opencascade/fix-depend-freetype.patch @@ -8,7 +8,7 @@ index fbcede5..66b127d 100644 add_definitions (-DHAVE_FREETYPE) - OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype") + find_package(freetype CONFIG REQUIRED) -+ get_target_property(FREETYPE_INCLUDE_DIR freetype INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FREETYPE_INCLUDE_DIR freetype INTERFACE_INCLUDE_DIRECTORIES) + list (APPEND 3RDPARTY_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR}") else() OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE") diff --git a/ports/opencascade/fix-dependence.patch b/ports/opencascade/fix-dependence.patch index d539016327..d44ce2961d 100644 --- a/ports/opencascade/fix-dependence.patch +++ b/ports/opencascade/fix-dependence.patch @@ -1,16 +1,17 @@ diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in -index c926c499..2fbc4023 100644 +index c926c49..a0502cc 100644 --- a/adm/templates/OpenCASCADEConfig.cmake.in +++ b/adm/templates/OpenCASCADEConfig.cmake.in -@@ -4,6 +4,7 @@ - # +@@ -5,6 +5,8 @@ # This file is configured by OpenCASCADE. # -+include(CMakeFindDependencyMacro) ++include(CMakeFindDependencyMacro) ++ if(OpenCASCADE_ALREADY_INCLUDED) return() -@@ -71,6 +72,13 @@ set (OpenCASCADE_WITH_GLES2 @USE_GLES2@) + endif() +@@ -71,6 +73,16 @@ set (OpenCASCADE_WITH_GLES2 @USE_GLES2@) @SET_OpenCASCADE_WITH_D3D@ @SET_OpenCASCADE_WITH_GLX@ @@ -19,7 +20,10 @@ index c926c499..2fbc4023 100644 +endif() + +find_dependency(OpenGL) -+find_dependency(Eigen3 REQUIRED) ++ ++if(@USE_EIGEN@) ++ find_dependency(Eigen3) ++endif() + # Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration. file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake") diff --git a/ports/opencascade/install-include-dir.patch b/ports/opencascade/install-include-dir.patch index 85ab582bd3..a568ce8aee 100644 --- a/ports/opencascade/install-include-dir.patch +++ b/ports/opencascade/install-include-dir.patch @@ -1,31 +1,19 @@ -From 32c4bdd88555309752215c53842d438cb51bcb62 Mon Sep 17 00:00:00 2001 -From: bloess -Date: Mon, 15 Feb 2021 16:26:36 +0100 -Subject: [PATCH] install include-dir - ---- - CMakeLists.txt | 9 +++++++++ - 1 file changed, 9 insertions(+) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 100d613..464f95a 100644 +index f4ec871..59e5134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1171,6 +1171,14 @@ foreach (OCCT_MODULE ${OCCT_MODULES}) +@@ -1246,6 +1246,14 @@ foreach (OCCT_MODULE ${OCCT_MODULES}) endforeach() set (OCCT_MODULES_ENABLED ${OCCT_MODULES_ENABLED_SORTED}) +foreach (OCCT_LIBRARY ${OCCT_LIBRARIES}) -+ target_include_directories( -+ ${OCCT_LIBRARY} -+ INTERFACE -+ $) -+ ++ target_include_directories( ++ ${OCCT_LIBRARY} ++ INTERFACE ++ $ ++ $) +endforeach() + # Add all targets to the build-tree export set export (TARGETS ${OCCT_LIBRARIES} FILE "${CMAKE_BINARY_DIR}/OpenCASCADETargets.cmake") --- -2.14.3.windows.1 - diff --git a/ports/opencascade/vcpkg.json b/ports/opencascade/vcpkg.json index a1c81c8ee4..4ff5660b1a 100644 --- a/ports/opencascade/vcpkg.json +++ b/ports/opencascade/vcpkg.json @@ -1,7 +1,7 @@ { "name": "opencascade", "version": "7.6.2", - "port-version": 6, + "port-version": 7, "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", diff --git a/versions/baseline.json b/versions/baseline.json index 9277889b44..fa467baae0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5974,7 +5974,7 @@ }, "opencascade": { "baseline": "7.6.2", - "port-version": 6 + "port-version": 7 }, "opencc": { "baseline": "1.1.6", diff --git a/versions/o-/opencascade.json b/versions/o-/opencascade.json index c6aea22191..711c3994e3 100644 --- a/versions/o-/opencascade.json +++ b/versions/o-/opencascade.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "23b7ba4d766b45ff9e93dae282a3f8e461a57dcc", + "version": "7.6.2", + "port-version": 7 + }, { "git-tree": "3a62400394101d54a0bea8a45ac0c1f68cf27b68", "version": "7.6.2",