OCCT VCPKG Extended Package Support Now Available

Hello OCCT Community,

We're excited to announce that starting from July 7th, 2025, OCCT master branch (not released version) now provides comprehensive support for VCPKG's extended package list, significantly simplifying the dependency management process for OCCT builds.

What's New

Enhanced VCPKG Integration

  • Complete dependency coverage: VCPKG can now handle ALL possible OCCT dependencies
  • TCLTK 8.6.16 support: Includes Tcl+Tk as an optional dependency
  • Custom TCL port: The TCL port is specifically overridden within the OCCT repository for optimal compatibility

Key Benefits

  • Simplified build process: No more manual dependency hunting and configuration
  • Consistent environments: Ensures reproducible builds across different development setups
  • Version management: VCPKG handles dependency versioning automatically
  • Cross-platform support: Works seamlessly on Windows, Linux, and macOS
  • Multiple package sources: Support for VCPKG, system packages (apt, yum), and MINGW repositories

Package Management Options

OCCT now supports multiple approaches for managing third-party dependencies:

Option 1: VCPKG (Recommended for cross-platform)

Best for consistent, reproducible builds across different platforms.

Option 2: System Package Managers

Use your system's native package manager for dependencies:

Linux (Ubuntu/Debian):

# Install dependencies via apt
sudo apt-get install libfreetype6-dev libfreeimage-dev \
  libffmpeg-dev libtbb-dev libgl1-mesa-dev libdraco-dev \
  rapidjson-dev libvtk9-dev tk-dev

Linux (CentOS/RHEL):

# Install dependencies via yum/dnf
sudo yum install freetype-devel freeimage-devel \
  ffmpeg-devel tbb-devel mesa-libGL-devel draco-devel \
  rapidjson-devel vtk-devel tk-devel

Windows (MINGW):

# Install dependencies via MINGW package manager
pacman -S mingw-w64-x86_64-freetype mingw-w64-x86_64-freeimage \
  mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-tbb \
  mingw-w64-x86_64-mesa mingw-w64-x86_64-rapidjson

Option 3: Manual Installation

Install dependencies manually (not recommended for complex setups).

How to Use VCPKG with OCCT

Prerequisites

  1. Install VCPKG on your system
  2. Ensure VCPKG is properly configured and integrated

Build Configuration

When compiling OCCT, you need to:

  1. Enable VCPKG support:

    -DBUILD_USE_VCPKG=ON
    
  2. Specify VCPKG root directory:

    -DVCPKG_ROOT=/path/to/your/vcpkg
    

Dependency Control

Use the USE_* pattern to enable or disable specific third-party dependencies:

# Graphics and Visualization
-DUSE_OPENGL=ON          # OpenGL support
-DUSE_GLES2=ON           # OpenGL ES 2.0 support
-DUSE_D3D=ON             # Direct3D support (Windows)
-DUSE_OPENVR=ON          # OpenVR support for VR applications

# Image Processing
-DUSE_FREEIMAGE=ON       # FreeImage library for image I/O
-DUSE_FREETYPE=ON        # FreeType for font rendering

# Audio/Video Processing
-DUSE_FFMPEG=ON          # FFmpeg for video/audio processing

# Performance and Threading
-DUSE_TBB=ON             # Threading Building Blocks

# Data Formats
-DUSE_DRACO=ON           # Draco geometry compression
-DUSE_RAPIDJSON=ON       # RapidJSON for JSON parsing
-DUSE_VTK=ON             # VTK integration

# User Interface
-DUSE_TK=ON              # Tk GUI toolkit

# Example: Disable specific dependencies
-DUSE_OPENVR=OFF         # Disable VR support
-DUSE_FFMPEG=OFF         # Disable video processing

Complete Build Example

cmake -S . -B build \
  -DBUILD_USE_VCPKG=ON \
  -DVCPKG_ROOT=/path/to/vcpkg \
  -DUSE_OPENGL=ON \
  -DUSE_FREEIMAGE=ON \
  -DUSE_FFMPEG=ON \
  -DUSE_TBB=ON \
  -DUSE_FREETYPE=ON \
  -DUSE_TK=ON \
  -DUSE_DRACO=ON \
  -DUSE_RAPIDJSON=ON

Working Examples

For practical implementation examples, you can refer to the OCCT GitHub Actions workflows:

VCPKG Setup Action

See the complete VCPKG setup configuration: - Repository: https://github.com/Open-Cascade-SAS/OCCT/blob/IR/.github/actions/vcpkg-setup/action.yml - This action demonstrates how to properly configure VCPKG for OCCT builds

OCCT Build Action

See the complete build process with VCPKG integration: - Repository: https://github.com/Open-Cascade-SAS/OCCT/blob/IR/.github/actions/build-occt/action.yml - This action shows the full build workflow using VCPKG dependencies

These GitHub Actions provide real-world examples of: - VCPKG installation and configuration - Environment setup for different platforms - CMake configuration with VCPKG flags - Dependency management strategies - Build optimization techniques

Supported Dependencies via VCPKG

The following dependencies are now available through VCPKG:

Graphics and Visualization

  • OpenGL - OpenGL graphics rendering
  • OpenGL ES 2.0 - OpenGL ES support for mobile/embedded
  • Direct3D - Direct3D support (Windows platforms)
  • OpenVR - Virtual reality applications support

Image and Font Processing

  • FreeImage - Comprehensive image I/O and processing
  • FreeType - Font rendering and typography

Audio/Video Processing

  • FFmpeg - Video and audio encoding/decoding

Performance Libraries

  • TBB - Threading Building Blocks for parallel processing

Data Formats and Serialization

  • Draco - 3D geometry compression
  • RapidJSON - High-performance JSON parsing
  • VTK - Visualization Toolkit integration

User Interface

  • Tk - GUI toolkit (part of TCLTK 8.6.16)

All these dependencies are automatically managed by VCPKG, ensuring consistent versions and proper integration with OCCT.

Migration Guide

For Existing Projects

If you're currently managing OCCT dependencies manually:

  1. Backup your current build configuration
  2. Install VCPKG if not already available
  3. Update your CMake configuration to use the new VCPKG flags
  4. Clean and rebuild your project

For New Projects

Simply follow the build configuration steps above from the start.

Troubleshooting

Common Issues

  • VCPKG_ROOT not found: Ensure the path is correct and VCPKG is properly installed
  • Dependency conflicts: Clean your build directory and rebuild from scratch
  • Missing dependencies: Verify that BUILD_USE_VCPKG=ON is set

Important Configuration Note

VCPKG can only be enabled with a clean configuration. It cannot be enabled during re-configuration of an existing build.

If you encounter configuration errors: 1. Remove the entire build folder: bash rm -rf build/ 2. Create a fresh configuration with VCPKG enabled from the start: bash cmake -S . -B build \ -DBUILD_USE_VCPKG=ON \ -DVCPKG_ROOT=/path/to/vcpkg \ [other options...]

This limitation means you must decide whether to use VCPKG before your initial configuration. Switching between VCPKG and non-VCPKG builds requires starting with a clean build directory.

Getting Help

  • Check the OCCT documentation for detailed build instructions
  • Visit our GitHub repository for the latest updates
  • Join our community forum for support and discussions

What's Next

This enhancement is part of our ongoing effort to improve the OCCT development experience. We're continuously working on: - Additional dependency integrations - Performance optimizations - Documentation improvements - Community feedback integration

Conclusion

The VCPKG extended package support represents a significant step forward in making OCCT more accessible and easier to build. We encourage all developers to try this new feature and share their feedback.

This change will particularly benefit: - New developers getting started with OCCT - CI/CD pipelines requiring consistent builds - Cross-platform development teams - Projects with complex dependency requirements


Best regards,
OCCT3D Team

For technical questions or feedback, please reach out through Forum or GitHub discussion.

Matteo Pellacani's picture

Hello Dmitrii,
I installed opencascade 7.9.1 using vcpkg, but couldn't find the DRAWEXE.exe tool, which was helpful for testing
Is there a way to get DRAWEXE using vcpkg?
So far i only noticed the experimental work-in-progress web-page.

Best regards

Dmitrii Pasukhin's picture

VCPKG official do not updated with TCL. It is not possible to port TCL officially.

That is why the vcpkg support require overrided port from OCCT. To have drawexe, please build manually using Cmake from the repo.

DRAWEXE is build and available with CMake + vcpkg, not pure cmake.

Best regards, Dmitrii.