Vcpkg: Add OpenCASCADE

Created on 13 Dec 2018  路  18Comments  路  Source: microsoft/vcpkg

It would be great to have a port of the Open CASCADE library ( https://dev.opencascade.org/ ).

It is interesting to note that there is both the official code release of Open CASCADE, available at https://dev.opencascade.org/ and a community mantained version at https://github.com/tpaviot/oce .
Debian currently packages both, while Homebrew packages the official one.

Build instructions:

Debian package :

Homebrew formula :

Repology page:

new-port good-first-issue

Most helpful comment

this issue was opend almost one year ago, I can compile it by myself, but I still hope to have an easy pkg manager system to manage it

at first, its shorten name was OCC, several years before, there were many bugs in official version, so the community developed another branch to fix the bugs, the community version is called "opencascade community edition" which is shorten to OCE, from then on the official version shorten name became OCCT which means opencascade technology

official version is good, and it bumps to new and new, now the newest version is 7.4.0

the community version is also good, but it seems not good not, because the formal release of community version was released 3 years ago, that version is based on official version 6.9.0

so personally I prefer official version

All 18 comments

v7.0 build ok
https://github.com/3drepo/occt
https://www.opencascade.com/content/3rd-party-components

example static

-DBUILD_LIBRARY_TYPE=Static
-DBUILD_YACCLEX=OFF
-DUSE_D3D=ON
-DUSE_FREEIMAGE:BOOL=ON
-DUSE_GL2PS:BOOL=ON
-DUSE_TBB:BOOL=OFF
-DUSE_VTK:BOOL=OFF

"C:\Program Files\cmake\bin\cmake.exe" .. -LA -DCMAKE_INSTALL_PREFIX:PATH="../Rel" -DVCPKG_TARGET_TRIPLET=x64-windows-static -Ax64 -Wno-dev -DCMAKE_PREFIX_PATH="E:/tools/vcpkg/installed/x64-windows-static" -DCMAKE_TOOLCHAIN_FILE="E:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_CL_64=1 -DCMAKE_CONFIGURATION_TYPES=Debug;Release -DBUILD_TEST=OFF -DBUILD_TESTING=OFF -DBUILD_CLI_EXECUTABLES:BOOL=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_BOTH_STATIC_SHARED_LIB=ON -DCMAKE_VERBOSE_MAKEFILE=TRUE -G"Visual Studio 15 2017" -DBUILD_LIBRARY_TYPE=Static -DBUILD_YACCLEX=OFF -DUSE_D3D=ON -DUSE_FREEIMAGE:BOOL=ON -DUSE_GL2PS:BOOL=ON -DUSE_TBB:BOOL=OFF -DUSE_VTK:BOOL=OFF

3RDPARTY_DIR:PATH=
3RDPARTY_FREEIMAGEPLUS_DIR:PATH=
3RDPARTY_FREEIMAGEPLUS_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/FreeImagePlus.dll
3RDPARTY_FREEIMAGEPLUS_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_FREEIMAGEPLUS_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREEIMAGEPLUS_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/FreeImagePlus.lib
3RDPARTY_FREEIMAGEPLUS_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_FREEIMAGE_DIR:PATH=
3RDPARTY_FREEIMAGE_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/FreeImage.dll
3RDPARTY_FREEIMAGE_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_FREEIMAGE_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/FreeImage.lib
3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_FREETYPE_DIR:PATH=
3RDPARTY_FREETYPE_DLL:FILEPATH=C:/Windows/System32/freetype.dll
3RDPARTY_FREETYPE_DLL_DIR:PATH=C:/Windows/System32
3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREETYPE_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/freetype.lib
3RDPARTY_FREETYPE_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_GL2PS_DIR:PATH=
3RDPARTY_GL2PS_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/gl2ps.dll
3RDPARTY_GL2PS_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_GL2PS_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_GL2PS_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/gl2ps.lib
3RDPARTY_GL2PS_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib
3RDPARTY_TCL_DIR:PATH=
3RDPARTY_TCL_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/tcl86.dll
3RDPARTY_TCL_DLL_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_TCL_INCLUDE_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_TCL_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/tcl86.lib
3RDPARTY_TCL_LIBRARY_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_TK_DIR:PATH=
3RDPARTY_TK_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/tk86.dll
3RDPARTY_TK_DLL_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_TK_INCLUDE_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_TK_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/tk86.lib
3RDPARTY_TK_LIBRARY_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib
BUILD_ADDITIONAL_TOOLKITS:STRING=
BUILD_CLI_EXECUTABLES:BOOL=OFF
BUILD_DOC_Overview:BOOL=OFF
BUILD_MODULE_ApplicationFramework:BOOL=ON
BUILD_MODULE_DataExchange:BOOL=ON
BUILD_MODULE_Draw:BOOL=ON
BUILD_MODULE_FoundationClasses:BOOL=ON
BUILD_MODULE_MfcSamples:BOOL=OFF
BUILD_MODULE_ModelingAlgorithms:BOOL=ON
BUILD_MODULE_ModelingData:BOOL=ON
BUILD_MODULE_Visualization:BOOL=ON
BUILD_PATCH:PATH=
BUILD_WITH_DEBUG:BOOL=OFF
BUILD_YACCLEX:BOOL=OFF
BZIP2_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
BZIP2_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/bz2d.lib
BZIP2_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/bz2.lib
CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc
CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG
CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3
CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/link.exe
CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_RC_COMPILER:FILEPATH=rc
CMAKE_RC_FLAGS:STRING=/DWIN32
CMAKE_RC_FLAGS_DEBUG:STRING=/D_DEBUG
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
CMAKE_RC_FLAGS_RELEASE:STRING=
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
FREETYPE_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/freetyped.lib
FREETYPE_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/freetype.lib
INSTALL_DIR:PATH=../Rel
INSTALL_DIR_BIN:PATH=win64/vc14/bin
INSTALL_DIR_CMAKE:PATH=cmake
INSTALL_DIR_DATA:PATH=data
INSTALL_DIR_DOC:PATH=doc
INSTALL_DIR_INCLUDE:PATH=inc
INSTALL_DIR_LAYOUT:STRING=Windows
INSTALL_DIR_LIB:PATH=win64/vc14/lib
INSTALL_DIR_RESOURCE:PATH=src
INSTALL_DIR_SAMPLES:PATH=samples
INSTALL_DIR_SCRIPT:PATH=.
INSTALL_DIR_TESTS:PATH=tests
INSTALL_FREEIMAGE:BOOL=OFF
INSTALL_FREEIMAGEPLUS:BOOL=OFF
INSTALL_FREETYPE:BOOL=OFF
INSTALL_GL2PS:BOOL=OFF
INSTALL_SAMPLES:BOOL=OFF
INSTALL_TCL:BOOL=OFF
INSTALL_TEST_CASES:BOOL=OFF
INSTALL_TK:BOOL=OFF
PNG_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/libpng16d.lib
PNG_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/libpng.lib
PNG_PNG_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
USE_D3D:BOOL=ON
USE_FREEIMAGE:BOOL=ON
USE_GL2PS:BOOL=ON
USE_TBB:BOOL=OFF
USE_VTK:BOOL=OFF
VCPKG_APPLOCAL_DEPS:BOOL=ON
VCPKG_TARGET_TRIPLET:STRING=x64-windows-static
ZLIB_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
ZLIB_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/zlibd.lib
ZLIB_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/zlib.lib

dependencies

FreeImage.all or other DLL dependencies and the executable TCL

build

cmake --build . --config Release --target install -- /target:Clean;ReBuild /p:Configuration=Release /p:Platform=x64 /p:VcpkgTriplet=x64-windows-static

we are making a distinction between OCC and OCCT, correct ?

we are making a distinction between OCC and OCCT, correct ?

When I originally opened the issue, I was not aware of the difference. I personally think it make sense to have two separate ports for each of them. If they are side-by-side installable, this is trivial, while if they conflict I think we can handle the conflict as done for the libmariadb/libmsql conflict:

When I originally opened the issue, I was not aware of the difference. I personally think it make sense to have two separate ports for each of them.

I agree

USE_VTK should be on to support the popular visualization module of OpenCASCADE, however VTK would need tk, which is currently bypassed in that build. I requested a new port for tk here https://github.com/microsoft/vcpkg/issues/7648, which is needed to get VTK ready to support this port.

Is there any update regarding the integration of OpenCASCADE into vcpkg?

@christianlandgraf OpenCASCADE requires tcl, tk, and freetype2 and optionally requires DirectX, FFMPEG, freeimage, GLES2, rapidJSON, TBB, and VTK (with tk).

I added x86 and x64 windows support for tcl here https://github.com/microsoft/vcpkg/pull/8026 . Which was a big blocker for tk. VCPKG has ports for freetype, FFMPEG, freeimage, TBB.

I am not sure any action is required for USE_D3D or USE_GLES2 .

This leaves the remaining blockers as a tk port and updating the VTK port to use the tk port (for USE_VTK)

this issue was opend almost one year ago, I can compile it by myself, but I still hope to have an easy pkg manager system to manage it

at first, its shorten name was OCC, several years before, there were many bugs in official version, so the community developed another branch to fix the bugs, the community version is called "opencascade community edition" which is shorten to OCE, from then on the official version shorten name became OCCT which means opencascade technology

official version is good, and it bumps to new and new, now the newest version is 7.4.0

the community version is also good, but it seems not good not, because the formal release of community version was released 3 years ago, that version is based on official version 6.9.0

so personally I prefer official version

@silentmissile Thanks for notice.

Official version is indeed 7.4.0 (October 2019). They do not have a public repo but regularly publish releases here:

https://www.opencascade.com/content/latest-release

However, downloading the source code from the link:

https://www.opencascade.com/sites/default/files/private/occt/OCC_7.4.0_release/opencascade-7.4.0.tgz

Requires you to log in with your account!

What can we do? Copy the .tgz to a mirror somewhere? Make a github repo with a copy of the code? (not even sure Vcpkg supports .tgz archives).

I've compiled OCCT many times, I can try to add it here if I have the time... and if I solve the above issue.

EDIT

I just found out they do have a public repo:

https://git.dev.opencascade.org/gitweb/?p=occt.git;a=summary

You can clone it or download a snapshot for a tag. E.g (7.4.0patch1):

https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_4_0p1;sf=tgz

They now have an official mirror : https://github.com/Open-Cascade-SAS/OCCT

Hi guys, does anyone want to open a PR to add this port?

I'm curious : would it support different configurations ? because I see that it is optionally using VTK, TCL-TK and so on. Some of us might want the strict necessary

I'm going to be adding a OCCT port as its on our critical path to dumpster msys among other dependencies

@marekr any news on the PR ? did you solve the TCL-TK port ?

Well, I put occt in vcpkg on hold for now
The problem with OCCT, is it requries specifically, tcl and tk 8.6.
TCL in vcpkg is already 9.0 :/ The only alternative is to download and build tcl/tk 8.6 within the OCCT port and use it only inside.

We can also have it with BUILD_MODULE_Draw=False for now, and update it later on ?

Hmm, yes looks like that will work. Let me see what I can knock out quickly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pakdel picture pakdel  路  3Comments

oahzuw picture oahzuw  路  3Comments

jack17529 picture jack17529  路  3Comments

spindensity picture spindensity  路  3Comments

LilyWangL picture LilyWangL  路  3Comments