[opencascade] Fix usage issue (#33252)

* [opencascade] Fix usage issue

* Apply suggestion
This commit is contained in:
Cheney Wang 2023-08-26 03:07:42 +08:00 committed by GitHub
parent 80f8da23a8
commit 250ea54a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 28 deletions

View File

@ -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")

View File

@ -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")

View File

@ -1,31 +1,19 @@
From 32c4bdd88555309752215c53842d438cb51bcb62 Mon Sep 17 00:00:00 2001
From: bloess <josua.bloess@uni-bayreuth.de>
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
+ $<INSTALL_INTERFACE:include>)
+
+ target_include_directories(
+ ${OCCT_LIBRARY}
+ INTERFACE
+ $<INSTALL_INTERFACE:include>
+ $<INSTALL_INTERFACE:include/opencascade>)
+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

View File

@ -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",

View File

@ -5974,7 +5974,7 @@
},
"opencascade": {
"baseline": "7.6.2",
"port-version": 6
"port-version": 7
},
"opencc": {
"baseline": "1.1.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "23b7ba4d766b45ff9e93dae282a3f8e461a57dcc",
"version": "7.6.2",
"port-version": 7
},
{
"git-tree": "3a62400394101d54a0bea8a45ac0c1f68cf27b68",
"version": "7.6.2",