early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

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

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,33 @@
diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake
index a63f3ce..aa77c20 100644
--- a/adm/cmake/cotire.cmake
+++ b/adm/cmake/cotire.cmake
@@ -3114,6 +3114,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST
IOS_INSTALL_COMBINED)
# copy Windows platform specific stuff
+ if (BUILD_SHARED_LIBS)
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
GNUtoMS
COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
@@ -3129,6 +3130,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)
+ endif()
# copy Android platform specific stuff
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
ANDROID_API ANDROID_API_MIN ANDROID_GUI
diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake
index 2f96c6f..78f15f0 100644
--- a/adm/cmake/occt_toolkit.cmake
+++ b/adm/cmake/occt_toolkit.cmake
@@ -235,7 +235,7 @@ if (EXECUTABLE_PROJECT)
else()
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
- if (MSVC)
+ if (MSVC AND BUILD_SHARED_LIBS)
if (BUILD_FORCE_RelWithDebInfo)
set (aReleasePdbConf "Release")
else()

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

@@ -0,0 +1,109 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Open-Cascade-SAS/OCCT
REF bb368e271e24f63078129283148ce83db6b9670a #V7.6.2
SHA512 500c7ff804eb6b202bef48e1be904fe43a3c0137e9a402affe128b3b75a1adbb20bfe383cee82503b13efc083a95eb97425f1afb1f66bae38543d29f871a91f9
HEAD_REF master
PATCHES
fix-pdb-find.patch
fix-install-prefix-path.patch
install-include-dir.patch
fix-depend-freetype.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(BUILD_TYPE "Shared")
else()
set(BUILD_TYPE "Static")
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"freeimage" USE_FREEIMAGE
"tbb" USE_TBB
"rapidjson" USE_RAPIDJSON
)
# VTK option in opencascade not currently supported because only 6.1.0 is supported but vcpkg has >= 9.0
# We turn off BUILD_MODULE_Draw as it requires TCL 8.6 and TK 8.6 specifically which conflicts with vcpkg only having TCL 9.0
# And pre-built ActiveTCL binaries are behind a marketing wall :(
# We use the Unix install layout for Windows as it matches vcpkg
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_LIBRARY_TYPE=${BUILD_TYPE}
-DBUILD_MODULE_Draw=OFF
-DINSTALL_DIR_LAYOUT=Unix
-DBUILD_SAMPLES_MFC=OFF
-DBUILD_SAMPLES_QT=OFF
-DBUILD_DOC_Overview=OFF
-DINSTALL_TEST_CASES=OFF
-DINSTALL_SAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(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 IN LISTS files)
file(READ "${file_name}" filedata)
string(REGEX REPLACE "# *include \<([a-zA-Z0-9_]*\.[hgl]xx)\>" "#include \"\\1\"" filedata "${filedata}")
foreach(extra_header IN LISTS 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")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/libd" "${CURRENT_PACKAGES_DIR}/debug/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
# debug creates libd and bind directories that need moving
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bind" "${CURRENT_PACKAGES_DIR}/debug/bin")
# fix paths in target files
list(APPEND TARGET_FILES
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEApplicationFrameworkTargets-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADECompileDefinitionsAndFlags-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEDataExchangeTargets-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEFoundationClassesTargets-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEModelingAlgorithmsTargets-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEModelingDataTargets-debug.cmake"
"${CURRENT_PACKAGES_DIR}/share/opencascade/OpenCASCADEVisualizationTargets-debug.cmake"
)
foreach(TARGET_FILE IN LISTS TARGET_FILES)
file(READ "${TARGET_FILE}" filedata)
string(REGEX REPLACE "libd" "lib" filedata "${filedata}")
string(REGEX REPLACE "bind" "bin" filedata "${filedata}")
file(WRITE "${TARGET_FILE}" "${filedata}")
endforeach()
# the bin directory ends up with bat files that are noise, let's clean that up
file(GLOB BATS "${CURRENT_PACKAGES_DIR}/bin/*.bat")
file(REMOVE_RECURSE ${BATS})
else()
# remove scripts in bin dir
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(INSTALL "${SOURCE_PATH}/OCCT_LGPL_EXCEPTION.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

39
externals/vcpkg/ports/opencascade/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,39 @@
{
"name": "opencascade",
"version": "7.6.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",
"supports": "!(uwp | osx | linux | arm)",
"dependencies": [
"freetype",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"freeimage": {
"description": "Enable optional usage of freeimage",
"dependencies": [
"freeimage"
]
},
"rapidjson": {
"description": "Enable optional usage of rapidjson",
"dependencies": [
"rapidjson"
]
},
"tbb": {
"description": "Enable optional usage of tbb",
"dependencies": [
"tbb"
]
}
}
}