[opencascade] fix #16252 (#16513)

* [opencascade] fix #16252 by exporting includ directories with the targets and replacing internal includes from #include "..." to #include<...> post installation

* [opencascade] added port version

* [opencascade] update SHA of versions/o-/opencascade.json

* Update ports/opencascade/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/opencascade/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/opencascade/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* remove commented line for BUILD_INTERFACE

* updated version

* remove replacement of includes form #include <...> to #include "..."

* update port version

* added fix-install-prefix-path.patch, which was removed by #15997

* fix fix-install-prefix-path.patch

* update port version

* Update ports/opencascade/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* update port version

* [opencascade]Revert "remove replacement of includes form #include <...> to #include "...""
also refined regex to allow white spaces between # and 'include'
This reverts commit 4b362739f5.

* [opencascade] update port version

* [opencascade] change exported include directory from include/opencascade to include

* [opencascade] update port version

Co-authored-by: bloess <josua.bloess@uni-bayreuth.de>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
Dejauxvue 2021-03-22 23:19:06 +01:00 committed by GitHub
parent 7524d9d4c4
commit c8021b4675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 77 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Source: opencascade
Version: 7.5.0
Port-Version: 1
Build-Depends: freetype
Description: Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE.
Supports: !(uwp|osx|linux|arm)

View File

@ -0,0 +1,15 @@
diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in
index e391ddf..c926c49 100644
--- a/adm/templates/OpenCASCADEConfig.cmake.in
+++ b/adm/templates/OpenCASCADEConfig.cmake.in
@@ -24,6 +24,7 @@ set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
+get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
--
2.14.3.windows.1

View File

@ -0,0 +1,31 @@
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
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1171,6 +1171,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>)
+
+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

@ -8,6 +8,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-pdb-find.patch
fix-install-prefix-path.patch
install-include-dir.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@ -43,7 +45,28 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade TARGET_PATH share/opencascade)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade)
#make occt includes relative to source_file
list(APPEND ADDITIONAL_HEADERS
"ExprIntrp.tab.h"
"FlexLexer.h"
"glext.h"
"igesread.h"
"NCollection_Haft.h"
"OSD_PerfMeter.h"
"Standard_values.h"
)
file(GLOB files "${CURRENT_PACKAGES_DIR}/include/opencascade/[a-zA-Z0-9_]*\.[hgl]xx")
foreach(file_name ${files})
file(READ ${file_name} filedata)
string(REGEX REPLACE "# *include \<([a-zA-Z0-9_]*\.[hgl]xx)\>" "#include \"\\1\"" filedata "${filedata}")
foreach(extra_header ${ADDITIONAL_HEADERS})
string(REGEX REPLACE "# *include \<${extra_header}\>" "#include \"${extra_header}\"" filedata "${filedata}")
endforeach()
file(WRITE ${file_name} "${filedata}")
endforeach()
# Remove libd to lib, libd just has cmake files we dont want too
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)

View File

@ -4302,7 +4302,7 @@
},
"opencascade": {
"baseline": "7.5.0",
"port-version": 0
"port-version": 1
},
"opencc": {
"baseline": "2020-04-26",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1afbbcf0d6d85963a334b8ae8e95b4fe16a9ff5b",
"version-string": "7.5.0",
"port-version": 1
},
{
"git-tree": "0d003408ab69f77a4ca2c02de115087c87a46b27",
"version-string": "7.5.0",