Skip to content

Commit

Permalink
#noissue chore(deps): upgrade opencascade to 7.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbuechner committed Sep 26, 2023
1 parent 40985b9 commit 15a0688
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 82 deletions.
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"name": "opencascade",
"version>=": "7.7.1"
"version>=": "7.7.2"
}
],
"features": {
Expand Down
15 changes: 15 additions & 0 deletions vcpkg/ports/opencascade/fix-depend-freetype.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbcede5..66b127d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -563,7 +563,9 @@ if (CAN_USE_FREETYPE)
if (USE_FREETYPE)
message (STATUS "Info: FreeType is used by OCCT")
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)
+ list (APPEND 3RDPARTY_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR}")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
30 changes: 30 additions & 0 deletions vcpkg/ports/opencascade/fix-dependence.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in
index c926c49..a0502cc 100644
--- a/adm/templates/OpenCASCADEConfig.cmake.in
+++ b/adm/templates/OpenCASCADEConfig.cmake.in
@@ -5,6 +5,8 @@
# This file is configured by OpenCASCADE.
#

+include(CMakeFindDependencyMacro)
+
if(OpenCASCADE_ALREADY_INCLUDED)
return()
endif()
@@ -71,6 +73,16 @@ 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)
+
+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")
foreach(f ${CONFIG_FILES})
48 changes: 0 additions & 48 deletions vcpkg/ports/opencascade/fix-feature-depend.patch

This file was deleted.

41 changes: 41 additions & 0 deletions vcpkg/ports/opencascade/fix-find-tbb.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1bacca1a..ad3a390d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -731,7 +731,7 @@ endif()
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
if (USE_TBB)
add_definitions (-DHAVE_TBB)
- OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
+ find_package(TBB CONFIG REQUIRED)
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
@@ -875,6 +875,14 @@ if (3RDPARTY_LIBRARY_DIRS)
list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
message (STATUS "Info: The directories of 3rdparty libraries: \n\t${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ get_filename_component(LIB_BASE_PATH ${3RDPARTY_LIBRARY_DIRS} DIRECTORY)
+ list(APPEND 3RDPARTY_LIBRARY_DIRS_DEBUG "${LIB_BASE_PATH}/debug/lib")
+ message (STATUS "Info: The directories of 3rdparty libraries: \n\t${3RDPARTY_LIBRARY_DIRS_DEBUG}")
+ link_directories (${3RDPARTY_LIBRARY_DIRS} ${3RDPARTY_LIBRARY_DIRS_DEBUG})
+ endif()
+
link_directories (${3RDPARTY_LIBRARY_DIRS})
endif()

diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake
index bee8ba78..692f6232 100644
--- a/adm/cmake/occt_csf.cmake
+++ b/adm/cmake/occt_csf.cmake
@@ -12,7 +12,7 @@ endif()

# TBB
if (USE_TBB)
- set (CSF_TBB "tbb tbbmalloc")
+ set (CSF_TBB "tbb12 tbbmalloc")
else()
set (CSF_TBB)
endif()
12 changes: 6 additions & 6 deletions vcpkg/ports/opencascade/fix-pdb-find.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake
index acdca71..5fdab41 100644
index acdca71a..db66ff50 100644
--- a/adm/cmake/cotire.cmake
+++ b/adm/cmake/cotire.cmake
@@ -3291,6 +3291,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST
IOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE)
# copy Windows platform specific stuff
+ if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS)
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
GNUtoMS
COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
@@ -3307,6 +3308,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
@@ -3306,6 +3307,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS
DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE
VS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY)
+ endif()
# copy Android platform specific stuff
+ endif()
cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
ANDROID_API ANDROID_API_MIN ANDROID_GUI
ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES
diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake
index 132890b..48dc105 100644
index c9399159..ce74b918 100644
--- a/adm/cmake/occt_toolkit.cmake
+++ b/adm/cmake/occt_toolkit.cmake
@@ -278,7 +278,7 @@ else()
Expand Down
26 changes: 7 additions & 19 deletions vcpkg/ports/opencascade/install-include-dir.patch
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
From 32c4bdd88555309752215c53842d438cb51bcb62 Mon Sep 17 00:00:00 2001
From: bloess <[email protected]>
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

16 changes: 9 additions & 7 deletions vcpkg/ports/opencascade/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Open-Cascade-SAS/OCCT
REF ffce0d66bbaafe3a95984d0e61804c201b9995d2 #V7.7.1
SHA512 bf65ec9334e67e0d33cfd05c25e4ff1f454646a61b43fbbdce5cb38f9c433db421c90c4dc79bc401feeccb78b88be25615eb09b385636a243e75be3d3a9e1be4
REF cec1ecd0c9f3b3d2572c47035d11949e8dfa85e2 #V7_7_2
SHA512 2fe98eadd7f9b922729bf80b56f260729d1c257c41392e4be4f070667ee77e94e2b286a873430b41ea61076acf1388aee7ba8b91789aa6199db56066796bb2d3
HEAD_REF master
PATCHES
fix-pdb-find.patch
fix-install-prefix-path.patch
install-include-dir.patch
fix-feature-depend.patch
)
fix-depend-freetype.patch
fix-dependence.patch
fix-find-tbb.patch
)

# MinGW compiler does generate import libraries (.dll.a files) for DLLs on Windows.
# Suppresses Warning: Import libraries were not present (only looking for ".lib" files)
Expand Down Expand Up @@ -47,12 +49,10 @@ vcpkg_cmake_configure(
-DBUILD_SAMPLES_QT=OFF
-DBUILD_DOC_Overview=OFF
-DINSTALL_TEST_CASES=OFF
)
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/opencascade)
vcpkg_copy_tools(TOOL_NAMES ExpToCasExe AUTO_CLEAN)

#make occt includes relative to source_file
list(APPEND ADDITIONAL_HEADERS
Expand Down Expand Up @@ -117,6 +117,8 @@ if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
if (BATS)
file(REMOVE_RECURSE ${BATS})
endif ()

vcpkg_copy_tools(TOOL_NAMES ExpToCasExe AUTO_CLEAN)
else ()
# remove scripts in bin dir
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
Expand Down
2 changes: 1 addition & 1 deletion vcpkg/ports/opencascade/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opencascade",
"version": "7.7.1",
"version": "7.7.2",
"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

0 comments on commit 15a0688

Please sign in to comment.