mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
44 Commits
CR0-gltfpa
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
783c3440b2 | ||
|
7d2cce09cc | ||
|
9f761b12ec | ||
|
3175e001b1 | ||
|
9134c601a4 | ||
|
0eb86fb05a | ||
|
1434cd7da3 | ||
|
e42a043abe | ||
|
f41a5a91e4 | ||
|
134afb1b7a | ||
|
b5e7a7d2aa | ||
|
efd12a15aa | ||
|
6fb9ee594b | ||
|
9219a3162e | ||
|
068aa6ae9f | ||
|
3c2774ea5d | ||
|
e837ec8486 | ||
|
59738836c0 | ||
|
45f4afb8c7 | ||
|
0322620c85 | ||
|
589960b20a | ||
|
afdcc4734d | ||
|
468bcd0c27 | ||
|
90b0e1d590 | ||
|
4365b63531 | ||
|
413c08272b | ||
|
2e2dc8d3e5 | ||
|
ef187e7b20 | ||
|
06f6a5afec | ||
|
0947067ed5 | ||
|
d04384f9d4 | ||
|
ceafdb0436 | ||
|
878cd2f6d6 | ||
|
313630c282 | ||
|
08f6de3aff | ||
|
3d3a47a33a | ||
|
5643d5c34a | ||
|
675d75d134 | ||
|
9707a155c0 | ||
|
508700117c | ||
|
29616ca8ff | ||
|
d9684743dc | ||
|
c0a6aee75d | ||
|
bdbd5ac589 |
95
.github/actions/ascii-check/action.yml
vendored
Normal file
95
.github/actions/ascii-check/action.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
name: 'ASCII Code Check'
|
||||
description: 'Check for non-ASCII characters in changed code files'
|
||||
inputs:
|
||||
base-ref:
|
||||
description: 'Base reference to compare changes against'
|
||||
required: true
|
||||
default: 'master'
|
||||
file-pattern:
|
||||
description: 'Pattern to match files for ASCII check'
|
||||
required: false
|
||||
default: '^(src)/.*\.(cpp|hxx|cxx|lxx|h|pxx|hpp)$'
|
||||
|
||||
outputs:
|
||||
has-non-ascii:
|
||||
description: 'Whether any files contained non-ASCII characters'
|
||||
value: ${{ steps.ascii-check.outputs.has_non_ascii }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
shell: pwsh
|
||||
run: |
|
||||
$changedFiles = git diff --name-only origin/${{ inputs.base-ref }} HEAD |
|
||||
Where-Object { $_ -match '${{ inputs.file-pattern }}' } |
|
||||
Where-Object { Test-Path $_ }
|
||||
|
||||
$changedFiles | Set-Content "changed_files.txt"
|
||||
if ($changedFiles.Count -gt 0) {
|
||||
echo "has_files=true" >> $env:GITHUB_OUTPUT
|
||||
}
|
||||
|
||||
- name: Check for non-ASCII characters
|
||||
id: ascii-check
|
||||
if: steps.changed-files.outputs.has_files == 'true'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$hasNonAscii = $false
|
||||
$nonAsciiLogs = @()
|
||||
|
||||
$files = Get-Content "changed_files.txt" | Where-Object { Test-Path $_ }
|
||||
foreach ($file in $files) {
|
||||
Write-Output "Checking file: $file"
|
||||
$fileContent = Get-Content -Path $file -Raw
|
||||
$lineNumber = 1
|
||||
$nonAsciiInFile = $false
|
||||
|
||||
foreach ($line in ($fileContent -split "`n")) {
|
||||
# Find non-ASCII characters (char code > 127)
|
||||
$nonAsciiMatches = [regex]::Matches($line, "[^\x00-\x7F]")
|
||||
if ($nonAsciiMatches.Count -gt 0) {
|
||||
$nonAsciiInFile = $true
|
||||
$hasNonAscii = $true
|
||||
|
||||
foreach ($match in $nonAsciiMatches) {
|
||||
$charCode = [int][char]$match.Value
|
||||
$hexCode = "0x{0:X}" -f $charCode
|
||||
$positionInLine = $match.Index + 1
|
||||
|
||||
$message = "Non-ASCII character found in '$file' at line $lineNumber, position $($positionInLine): '$($match.Value)' (Unicode: $hexCode)"
|
||||
$nonAsciiLogs += $message
|
||||
Write-Output $message
|
||||
}
|
||||
}
|
||||
$lineNumber++
|
||||
}
|
||||
|
||||
if ($nonAsciiInFile) {
|
||||
Write-Output "::warning file=$file::File contains non-ASCII characters"
|
||||
}
|
||||
}
|
||||
|
||||
$nonAsciiLogs | Set-Content "non_ascii_report.txt"
|
||||
if ($hasNonAscii) {
|
||||
echo "has_non_ascii=true" >> $env:GITHUB_OUTPUT
|
||||
}
|
||||
|
||||
- name: Upload non-ASCII report
|
||||
if: steps.ascii-check.outputs.has_non_ascii == 'true'
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: non-ascii-report
|
||||
path: non_ascii_report.txt
|
||||
|
||||
- name: Failing step for non-ASCII issues
|
||||
if: steps.ascii-check.outputs.has_non_ascii == 'true'
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Output "::error::Files contain non-ASCII characters. See the non-ascii-report artifact for details."
|
||||
exit 1
|
||||
|
||||
branding:
|
||||
icon: 'alert-circle'
|
||||
color: 'red'
|
39
.github/actions/build-docs/action.yml
vendored
39
.github/actions/build-docs/action.yml
vendored
@@ -10,38 +10,31 @@ runs:
|
||||
choco install -y doxygen.install
|
||||
shell: pwsh
|
||||
|
||||
- name: Download and extract 3rdparty dependencies
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T host=x64 `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=OFF `
|
||||
-D BUILD_USE_PCH=ON `
|
||||
-D BUILD_OPT_PROFILE=Production `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=Release `
|
||||
-D BUILD_DOC_Overview=ON `
|
||||
-D BUILD_DOC_RefMan=ON `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=ON `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_MODULE_Draw=OFF `
|
||||
-D USE_D3D=OFF `
|
||||
-D USE_DRACO=OFF `
|
||||
-D USE_FFMPEG=OFF `
|
||||
-D USE_FREEIMAGE=OFF `
|
||||
-D USE_GLES2=OFF `
|
||||
-D USE_OPENVR=OFF `
|
||||
-D USE_VTK=OFF `
|
||||
-D USE_TBB=OFF `
|
||||
-D USE_RAPIDJSON=OFF `
|
||||
-D USE_OPENGL=OFF `
|
||||
-D USE_FREETYPE=OFF `
|
||||
-D USE_TK=OFF `
|
||||
-D USE_TCL=OFF `
|
||||
-D CMAKE_CXX_FLAGS="/W4 /WX" `
|
||||
-D CMAKE_C_FLAGS="/W4 /WX" ..
|
||||
shell: pwsh
|
||||
@@ -54,14 +47,14 @@ runs:
|
||||
shell: cmd
|
||||
|
||||
- name: Upload refman documentation
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: refman-doc
|
||||
path: build/doc/refman
|
||||
retention-days: 90
|
||||
|
||||
- name: Upload overview documentation
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: overview-doc
|
||||
path: build/doc/overview
|
||||
|
189
.github/actions/build-occt/action.yml
vendored
189
.github/actions/build-occt/action.yml
vendored
@@ -31,179 +31,30 @@ inputs:
|
||||
description: 'CMake build type (Release, Debug, etc)'
|
||||
required: false
|
||||
default: 'Release'
|
||||
github-token:
|
||||
description: 'GitHub token for vcpkg NuGet package access'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download and extract 3rdparty dependencies (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
shell: pwsh
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
compiler: ${{ inputs.compiler }}
|
||||
additional-cmake-flags: ${{ inputs.additional-cmake-flags }}
|
||||
use-vtk: ${{ inputs.use-vtk }}
|
||||
build-use-pch: ${{ inputs.build-use-pch }}
|
||||
build-opt-profile: ${{ inputs.build-opt-profile }}
|
||||
cmake-build-type: ${{ inputs.cmake-build-type }}
|
||||
github-token: ${{ inputs.github-token }}
|
||||
|
||||
- name: Download and extract Mesa3D (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
|
||||
7z x mesa3d.7z -omesa3d
|
||||
shell: pwsh
|
||||
|
||||
- name: Run system-wide deployment (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
||||
|
||||
- name: Install Ninja (Windows Clang)
|
||||
if: ${{ inputs.platform == 'windows' && inputs.compiler == 'clang' }}
|
||||
run: |
|
||||
choco install ninja -y
|
||||
ninja --version
|
||||
shell: pwsh
|
||||
|
||||
- name: Install dependencies (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
brew update
|
||||
brew install tcl-tk tbb gl2ps xerces-c \
|
||||
libxmu libxi libxft libxpm \
|
||||
glew freeimage draco glfw
|
||||
shell: bash
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev
|
||||
shell: bash
|
||||
|
||||
- name: Install rapidjson (macOS/Linux)
|
||||
if: ${{ inputs.platform == 'macos' || inputs.platform == 'linux' }}
|
||||
run: |
|
||||
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
|
||||
unzip rapidjson.zip
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Windows MSVC)
|
||||
if: ${{ inputs.platform == 'windows' && inputs.compiler == 'msvc' }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T host=x64 `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=OFF `
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_GTEST=ON `
|
||||
-D BUILD_CPP_STANDARD=C++17 `
|
||||
-D INSTALL_GTEST=ON `
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT (Windows Clang)
|
||||
if: ${{ inputs.platform == 'windows' && inputs.compiler == 'clang' }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Ninja" `
|
||||
-D CMAKE_C_COMPILER=clang `
|
||||
-D CMAKE_CXX_COMPILER=clang++ `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=OFF `
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_GTEST=ON `
|
||||
-D BUILD_CPP_STANDARD=C++17 `
|
||||
-D INSTALL_GTEST=ON `
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D USE_TK=OFF \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=${{ inputs.use-vtk }} \
|
||||
-D USE_TBB=OFF \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: bash
|
||||
- name: Upload vcpkg cache
|
||||
uses: ./.github/actions/upload-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.artifact-name }}-cache
|
||||
build-directory: build
|
||||
|
||||
- name: Build OCCT (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
@@ -227,7 +78,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload install directory
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: install
|
||||
|
@@ -13,7 +13,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
@@ -50,7 +50,7 @@ runs:
|
||||
msbuild.exe CSharp_D3D.sln /p:Configuration=Release /p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build_d3d.log;Verbosity=detailed /m
|
||||
|
||||
- name: Upload CSharp Sample
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: csharp-sample-${{ inputs.platform }}-x64
|
||||
path: samples/CSharp
|
||||
|
4
.github/actions/build-sample-mfc/action.yml
vendored
4
.github/actions/build-sample-mfc/action.yml
vendored
@@ -13,7 +13,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
@@ -47,7 +47,7 @@ runs:
|
||||
)
|
||||
|
||||
- name: Upload MFC Sample
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: mfc-sample-${{ inputs.platform }}-x64
|
||||
path: samples/mfc/
|
||||
|
23
.github/actions/build-sample-qt/action.yml
vendored
23
.github/actions/build-sample-qt/action.yml
vendored
@@ -17,11 +17,16 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
|
||||
- name: Download vcpkg cache
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
||||
|
||||
- name: Install Windows dependencies
|
||||
if: inputs.platform == 'windows'
|
||||
shell: pwsh
|
||||
@@ -84,6 +89,12 @@ runs:
|
||||
run: |
|
||||
cd ${{ github.workspace }}/occt-install/bin
|
||||
source env.sh
|
||||
|
||||
# Set library paths for vcpkg dependencies
|
||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
||||
export LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LIBRARY_PATH"
|
||||
export PKG_CONFIG_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
cd ${{ github.workspace }}/samples/qt
|
||||
|
||||
for sample in IESample Tutorial FuncDemo; do
|
||||
@@ -92,14 +103,20 @@ runs:
|
||||
host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR="${{ github.workspace }}/samples/qt/${sample}/result"
|
||||
qmake $sample.pro
|
||||
|
||||
# Configure qmake with vcpkg paths
|
||||
qmake $sample.pro \
|
||||
"LIBS += -L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
||||
"LIBS += -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
||||
"INCLUDEPATH += ${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/include"
|
||||
|
||||
aNbJobs="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j$aNbJobs release
|
||||
cd ..
|
||||
done
|
||||
|
||||
- name: Upload Qt Samples
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: qt-samples-${{ inputs.platform }}-x64
|
||||
path: |
|
||||
|
20
.github/actions/build-tinspector/action.yml
vendored
20
.github/actions/build-tinspector/action.yml
vendored
@@ -17,11 +17,16 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
|
||||
- name: Download vcpkg cache
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
||||
|
||||
- name: Install Windows dependencies
|
||||
if: inputs.platform == 'windows'
|
||||
shell: pwsh
|
||||
@@ -40,7 +45,7 @@ runs:
|
||||
run: |
|
||||
git clone https://github.com/Open-Cascade-SAS/Inspector.git inspector
|
||||
cd inspector
|
||||
git checkout 6da9ba776ef72a17dca3331974df4200024c7f34
|
||||
git checkout 0757c9bbe4d856a9cd26a62a453fc31879d9d054
|
||||
|
||||
- name: Configure TInspector - Windows
|
||||
if: inputs.platform == 'windows'
|
||||
@@ -65,12 +70,17 @@ runs:
|
||||
cd inspector
|
||||
mkdir build
|
||||
cd build
|
||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D BUILD_SHARED_LIBS=ON \
|
||||
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/inspector/install \
|
||||
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||
-D CMAKE_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
||||
-D CMAKE_INCLUDE_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/include" \
|
||||
-D CMAKE_EXE_LINKER_FLAGS="-L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
||||
-D CMAKE_SHARED_LINKER_FLAGS="-L${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib" \
|
||||
..
|
||||
|
||||
- name: Build TInspector - Windows
|
||||
@@ -85,10 +95,14 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd inspector/build
|
||||
# Set library paths for build and runtime
|
||||
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LD_LIBRARY_PATH"
|
||||
export LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib:${{ github.workspace }}/occt-install/lib:$LIBRARY_PATH"
|
||||
export PKG_CONFIG_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux-dynamic/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
make install -j$(nproc)
|
||||
|
||||
- name: Upload TInspector installation
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: inspector-${{ inputs.platform }}-x64
|
||||
path: inspector/install
|
||||
|
@@ -68,7 +68,7 @@ runs:
|
||||
|
||||
- name: Upload patch
|
||||
if: steps.git-check.outputs.has_changes == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: format-patch
|
||||
path: format.patch
|
||||
|
83
.github/actions/cmake-build-basic/action.yml
vendored
Normal file
83
.github/actions/cmake-build-basic/action.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
name: 'CMake Basic Build'
|
||||
description: 'Configure and build OCCT with basic configuration'
|
||||
|
||||
inputs:
|
||||
generator:
|
||||
description: 'CMake generator'
|
||||
required: true
|
||||
default: 'Ninja'
|
||||
cc:
|
||||
description: 'C compiler'
|
||||
required: true
|
||||
cxx:
|
||||
description: 'C++ compiler'
|
||||
required: true
|
||||
build-type:
|
||||
description: 'Build type (Debug, Release)'
|
||||
required: false
|
||||
default: 'Release'
|
||||
compiler-flags:
|
||||
description: 'Additional compiler flags'
|
||||
required: false
|
||||
default: ''
|
||||
thirdparty-dir:
|
||||
description: '3rd party directory'
|
||||
required: false
|
||||
default: ''
|
||||
shell-type:
|
||||
description: 'Shell type to use (powershell, msys2, bash)'
|
||||
required: false
|
||||
default: 'auto'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure basic build (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "${{ inputs.generator }}" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }} \
|
||||
${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
|
||||
${{ inputs.compiler-flags }} ..
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Configure basic build (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ inputs.generator }}" `
|
||||
-D CMAKE_C_COMPILER=${{ inputs.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }} `
|
||||
${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.build-type }} `
|
||||
${{ inputs.compiler-flags }} ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build basic (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config ${{ inputs.build-type }} -- -j 4
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Build basic (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config ${{ inputs.build-type }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Clean up build (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: rm -rf build
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Clean up build (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: Remove-Item -Recurse -Force build
|
||||
shell: pwsh
|
149
.github/actions/cmake-build-full/action.yml
vendored
Normal file
149
.github/actions/cmake-build-full/action.yml
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
name: 'CMake Full Build'
|
||||
description: 'Configure and build OCCT with full configuration (shared/static)'
|
||||
|
||||
inputs:
|
||||
generator:
|
||||
description: 'CMake generator'
|
||||
required: true
|
||||
default: 'Ninja'
|
||||
cc:
|
||||
description: 'C compiler'
|
||||
required: true
|
||||
cxx:
|
||||
description: 'C++ compiler'
|
||||
required: true
|
||||
build-type:
|
||||
description: 'Build type (Debug, Release)'
|
||||
required: false
|
||||
default: 'Release'
|
||||
library-type:
|
||||
description: 'Library type (Shared, Static)'
|
||||
required: false
|
||||
default: 'Shared'
|
||||
opt-profile:
|
||||
description: 'Optimization profile (Production, Default)'
|
||||
required: false
|
||||
default: 'Production'
|
||||
compiler-flags:
|
||||
description: 'Additional compiler flags'
|
||||
required: false
|
||||
default: ''
|
||||
thirdparty-dir:
|
||||
description: '3rd party directory'
|
||||
required: false
|
||||
default: ''
|
||||
rapidjson-dir:
|
||||
description: 'RapidJSON directory'
|
||||
required: false
|
||||
default: ''
|
||||
use-vtk:
|
||||
description: 'Enable VTK'
|
||||
required: false
|
||||
default: 'ON'
|
||||
use-tbb:
|
||||
description: 'Enable TBB'
|
||||
required: false
|
||||
default: 'ON'
|
||||
with-debug:
|
||||
description: 'Enable BUILD_WITH_DEBUG'
|
||||
required: false
|
||||
default: 'OFF'
|
||||
shell-type:
|
||||
description: 'Shell type to use (powershell, msys2, bash)'
|
||||
required: false
|
||||
default: 'auto'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure full build (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "${{ inputs.generator }}" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }} \
|
||||
${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} \
|
||||
${{ inputs.rapidjson-dir != '' && format('-D 3RDPARTY_RAPIDJSON_DIR={0}', inputs.rapidjson-dir) || '' }} \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.opt-profile }} \
|
||||
-D BUILD_LIBRARY_TYPE=${{ inputs.library-type }} \
|
||||
${{ inputs.with-debug == 'ON' && '-D BUILD_WITH_DEBUG=ON' || '' }} \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
|
||||
-D USE_MMGR_TYPE=JEMALLOC \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install-${{ inputs.build-type }} \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=${{ inputs.use-vtk }} \
|
||||
-D USE_TBB=${{ inputs.use-tbb }} \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ inputs.compiler-flags }} ..
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Configure full build (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ inputs.generator }}" `
|
||||
-D CMAKE_C_COMPILER=${{ inputs.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }} `
|
||||
${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} `
|
||||
${{ inputs.rapidjson-dir != '' && format('-D 3RDPARTY_RAPIDJSON_DIR={0}', inputs.rapidjson-dir) || '' }} `
|
||||
-D BUILD_USE_PCH=OFF `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.opt-profile }} `
|
||||
-D BUILD_LIBRARY_TYPE=${{ inputs.library-type }} `
|
||||
${{ inputs.with-debug == 'ON' && '-D BUILD_WITH_DEBUG=ON' || '' }} `
|
||||
-D USE_TK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.build-type }} `
|
||||
-D USE_MMGR_TYPE=JEMALLOC `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install-${{ inputs.build-type }} `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=OFF `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=${{ inputs.use-tbb }} `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
${{ inputs.compiler-flags }} ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build full (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ inputs.build-type }} -- -j 4
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Build full (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ inputs.build-type }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Clean up build (Unix/MSYS2)
|
||||
if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
|
||||
run: |
|
||||
rm -rf build
|
||||
rm -rf ${{ github.workspace }}/install-${{ inputs.build-type }}
|
||||
shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
|
||||
|
||||
- name: Clean up build (Windows PowerShell)
|
||||
if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ inputs.build-type }}
|
||||
shell: pwsh
|
169
.github/actions/configure-occt/action.yml
vendored
Normal file
169
.github/actions/configure-occt/action.yml
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
name: 'Configure OCCT'
|
||||
description: 'Setup vcpkg and configure OCCT on a specific platform without building'
|
||||
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform (windows, macos, linux)'
|
||||
required: true
|
||||
compiler:
|
||||
description: 'Compiler (msvc, clang, gcc)'
|
||||
required: true
|
||||
additional-cmake-flags:
|
||||
description: 'Additional CMake flags'
|
||||
required: false
|
||||
default: ''
|
||||
use-vtk:
|
||||
description: 'Enable VTK'
|
||||
required: false
|
||||
default: 'true'
|
||||
build-use-pch:
|
||||
description: 'Enable precompiled headers'
|
||||
required: false
|
||||
default: 'true'
|
||||
build-opt-profile:
|
||||
description: 'Build optimization profile'
|
||||
required: false
|
||||
default: 'Production'
|
||||
cmake-build-type:
|
||||
description: 'CMake build type (Release, Debug, etc)'
|
||||
required: false
|
||||
default: 'Release'
|
||||
github-token:
|
||||
description: 'GitHub token for vcpkg NuGet package access'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/vcpkg-setup
|
||||
with:
|
||||
github-token: ${{ inputs.github-token }}
|
||||
|
||||
- name: Download and extract Mesa3D (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
|
||||
7z x mesa3d.7z -omesa3d
|
||||
shell: pwsh
|
||||
|
||||
- name: Run system-wide deployment (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
|
||||
shell: bash
|
||||
|
||||
- name: Install required packages (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
brew update || true
|
||||
# temporary workaround for missing tcl-tk
|
||||
brew install tcl-tk || true
|
||||
# Force link any conflicting packages
|
||||
brew link --overwrite python@3.12 || true
|
||||
brew link --overwrite python@3.13 || true
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T ${{ inputs.compiler == 'msvc' && 'host=x64' || 'ClangCL' }} `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=ON `
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D BUILD_USE_VCPKG=ON `
|
||||
-D VCPKG_TARGET_TRIPLET=x64-windows `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_GTEST=ON `
|
||||
-D BUILD_CPP_STANDARD=C++17 `
|
||||
-D INSTALL_GTEST=ON `
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for Windows"
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D VCPKG_TARGET_TRIPLET=arm64-osx-dynamic \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for macOS"
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
# Set environment to help vcpkg find system libraries
|
||||
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export CMAKE_PREFIX_PATH="/usr:/usr/local:$CMAKE_PREFIX_PATH"
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D VCPKG_TARGET_TRIPLET=x64-linux-dynamic \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=${{ inputs.use-vtk }} \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for Linux"
|
||||
shell: bash
|
79
.github/actions/download-vcpkg-cache/action.yml
vendored
Normal file
79
.github/actions/download-vcpkg-cache/action.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: 'Download vcpkg Cache'
|
||||
description: 'Download and restore vcpkg installed packages and cache'
|
||||
|
||||
inputs:
|
||||
artifact-name:
|
||||
description: 'Name of the artifact containing vcpkg cache'
|
||||
required: true
|
||||
build-directory:
|
||||
description: 'Build directory where vcpkg_installed should be restored'
|
||||
required: false
|
||||
default: 'build'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
- name: Download vcpkg tar archive
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: ${{ inputs.build-directory }}
|
||||
|
||||
- name: Extract vcpkg dependencies
|
||||
run: |
|
||||
cd ${{ inputs.build-directory }}
|
||||
tar -xzf vcpkg-dependencies.tar.gz
|
||||
rm vcpkg-dependencies.tar.gz
|
||||
shell: bash
|
||||
|
||||
- name: Copy manual-link libraries and set paths for Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
$vcpkg_bin = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/bin"
|
||||
$vcpkg_lib = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/lib"
|
||||
$vcpkg_manual = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/lib/manual-link"
|
||||
|
||||
# Copy manual-link DLLs to bin directory for runtime access
|
||||
if (Test-Path $vcpkg_manual) {
|
||||
Write-Host "Copying manual-link libraries to bin directory"
|
||||
Copy-Item "$vcpkg_manual\*" "$vcpkg_bin\" -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Set library search paths
|
||||
$current_path = $env:PATH
|
||||
echo "PATH=$vcpkg_bin;$vcpkg_lib;$vcpkg_manual;$current_path" >> $env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
|
||||
- name: Copy manual-link libraries and set paths for Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
vcpkg_lib="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/lib"
|
||||
vcpkg_manual="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/lib/manual-link"
|
||||
|
||||
# Copy manual-link libraries to main lib directory for runtime access
|
||||
if [ -d "$vcpkg_manual" ]; then
|
||||
echo "Copying manual-link libraries to main lib directory"
|
||||
cp -f "$vcpkg_manual"/* "$vcpkg_lib/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Set library search paths
|
||||
echo "LD_LIBRARY_PATH=$vcpkg_lib:$vcpkg_manual:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Copy manual-link libraries and set paths for macOS
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
vcpkg_lib="${{ inputs.build-directory }}/vcpkg_installed/arm64-osx-dynamic/lib"
|
||||
vcpkg_manual="${{ inputs.build-directory }}/vcpkg_installed/arm64-osx-dynamic/lib/manual-link"
|
||||
|
||||
# Copy manual-link libraries to main lib directory for runtime access
|
||||
if [ -d "$vcpkg_manual" ]; then
|
||||
echo "Copying manual-link libraries to main lib directory"
|
||||
cp -f "$vcpkg_manual"/* "$vcpkg_lib/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Set library search paths
|
||||
echo "DYLD_FALLBACK_LIBRARY_PATH=$vcpkg_lib:$vcpkg_manual:$DYLD_FALLBACK_LIBRARY_PATH" >> $GITHUB_ENV
|
||||
echo "DYLD_LIBRARY_PATH=$vcpkg_lib:$vcpkg_manual:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
|
||||
shell: bash
|
50
.github/actions/retest-failures/action.yml
vendored
50
.github/actions/retest-failures/action.yml
vendored
@@ -23,14 +23,14 @@ runs:
|
||||
steps:
|
||||
- name: Download previous test results (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.results-artifact-name }}
|
||||
path: install/results
|
||||
|
||||
- name: Download previous test results (macOS/Linux)
|
||||
if: ${{ inputs.platform != 'windows' }}
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.results-artifact-name }}
|
||||
path: install/bin/results
|
||||
@@ -84,27 +84,16 @@ runs:
|
||||
echo "failed_count={0}" >> $GITHUB_OUTPUT
|
||||
', steps.check_failures_unix.outputs.failed_count) }}
|
||||
|
||||
- name: Download and extract 3rdparty dependencies (Windows)
|
||||
if: ${{ inputs.platform == 'windows' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
|
||||
- name: Install dependencies (macOS)
|
||||
if: ${{ inputs.platform == 'macos' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
shell: bash
|
||||
run: |
|
||||
brew update
|
||||
brew install tcl-tk tbb gl2ps xerces-c \
|
||||
libxmu libxi libxft libxpm \
|
||||
glew freeimage draco glfw
|
||||
- name: Download vcpkg cache
|
||||
if: steps.check_failures.outputs.failed_count > 0
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
shell: bash
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core
|
||||
|
||||
- name: Setup Xvfb and Mesa (Linux)
|
||||
if: ${{ inputs.platform == 'linux' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
@@ -129,7 +118,7 @@ runs:
|
||||
|
||||
- name: Download and extract install directory
|
||||
if: steps.check_failures.outputs.failed_count > 0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
@@ -167,7 +156,7 @@ runs:
|
||||
shell: cmd
|
||||
run: |
|
||||
cd install
|
||||
call env.bat ${{ inputs.compiler == 'clang' && 'clang' || 'vc14' }} win64 release
|
||||
call env.bat vc14 win64 release
|
||||
DRAWEXE.exe -v -c testgrid -regress results/${{ inputs.test-directory-name }} -outdir results/${{ inputs.test-directory-name }}-retest -parallel 0
|
||||
env:
|
||||
LIBGL_ALWAYS_SOFTWARE: 1
|
||||
@@ -193,7 +182,7 @@ runs:
|
||||
shell: cmd
|
||||
run: |
|
||||
cd install
|
||||
call env.bat ${{ inputs.compiler == 'clang' && 'clang' || 'vc14' }} win64 release
|
||||
call env.bat vc14 win64 release
|
||||
# Repeat failed tests for 10 times
|
||||
for /l %%i in (1,1,10) do (
|
||||
DRAWEXE.exe -v -c testgrid -regress results/${{ inputs.test-directory-name }}-retest -outdir results/${{ inputs.test-directory-name }}-retest -parallel 0 -overwrite
|
||||
@@ -222,12 +211,21 @@ runs:
|
||||
CSF_TestScriptsPath: ${{ github.workspace }}/tests
|
||||
CSF_TestDataPath: ${{ github.workspace }}/data
|
||||
|
||||
- name: Upload regression test results
|
||||
if: steps.check_failures.outputs.failed_count > 0
|
||||
- name: Upload regression test results (Windows)
|
||||
if: ${{ inputs.platform == 'windows' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: ${{ inputs.results-artifact-name }}-retest
|
||||
path: install/${{ (inputs.platform == 'windows') && '' || 'bin/' }}results/${{ inputs.test-directory-name }}-retest
|
||||
path: install/results/${{ inputs.test-directory-name }}-retest
|
||||
retention-days: 15
|
||||
overwrite: true
|
||||
|
||||
- name: Upload regression test results (macOS/Linux)
|
||||
if: ${{ inputs.platform != 'windows' && steps.check_failures.outputs.failed_count > 0 }}
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: ${{ inputs.results-artifact-name }}-retest
|
||||
path: install/bin/results/${{ inputs.test-directory-name }}-retest
|
||||
retention-days: 15
|
||||
overwrite: true
|
||||
|
||||
@@ -239,7 +237,7 @@ runs:
|
||||
if exist "*" (
|
||||
xcopy /s /y /i . "..\${{ inputs.test-directory-name }}"
|
||||
cd ..\..
|
||||
call env.bat ${{ inputs.compiler == 'clang' && 'clang' || 'vc14' }} win64 release
|
||||
call env.bat vc14 win64 release
|
||||
DRAWEXE.exe -v -c "testsummarize results/${{ inputs.test-directory-name }}"
|
||||
) else (
|
||||
echo No retest results to copy - directory is empty
|
||||
|
33
.github/actions/run-gtest/action.yml
vendored
33
.github/actions/run-gtest/action.yml
vendored
@@ -25,27 +25,15 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
|
||||
- name: Download and extract 3rdparty dependencies for Windows
|
||||
if: inputs.platform == 'windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
|
||||
- name: Install macOS dependencies
|
||||
if: inputs.platform == 'macos'
|
||||
shell: bash
|
||||
run: |
|
||||
brew update
|
||||
brew install tcl-tk tbb gl2ps xerces-c \
|
||||
libxmu libxi libxft libxpm \
|
||||
glew freeimage draco glfw
|
||||
- name: Download vcpkg cache
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: inputs.platform == 'linux'
|
||||
@@ -69,8 +57,7 @@ runs:
|
||||
shell: cmd
|
||||
run: |
|
||||
cd install
|
||||
call env.bat ${{ inputs.compiler == 'msvc' && 'vc14' || 'clang' }} win64 release
|
||||
cd bin
|
||||
call env.bat vc14 win64 release
|
||||
set GTEST_OUTPUT=""
|
||||
OpenCascadeGTest.exe --gtest_output=xml:gtest_results.xml > gtest_output.log 2>&1
|
||||
type gtest_output.log
|
||||
@@ -90,12 +77,12 @@ runs:
|
||||
cat gtest_output.log
|
||||
|
||||
- name: Upload GTest results
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: gtest-results-${{ inputs.platform }}-${{ inputs.compiler }}-${{ inputs.artifact-suffix }}
|
||||
path: |
|
||||
install/bin/gtest_results.xml
|
||||
install/bin/gtest_output.log
|
||||
install/**/gtest_results.xml
|
||||
install/**/gtest_output.log
|
||||
retention-days: 15
|
||||
|
||||
- name: Check for test failures on Windows
|
||||
@@ -103,7 +90,7 @@ runs:
|
||||
id: check-failures-windows
|
||||
shell: pwsh
|
||||
run: |
|
||||
cd install/bin
|
||||
cd install
|
||||
$log = Get-Content "gtest_output.log" -Raw
|
||||
if ($log -match "\[\s+FAILED\s+\]") {
|
||||
Write-Error "GTest failures detected in the output."
|
||||
|
32
.github/actions/run-tests/action.yml
vendored
32
.github/actions/run-tests/action.yml
vendored
@@ -21,26 +21,14 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download and extract 3rdparty dependencies (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
shell: pwsh
|
||||
|
||||
- name: Install dependencies (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
brew update
|
||||
brew install tcl-tk tbb gl2ps xerces-c \
|
||||
libxmu libxi libxft libxpm \
|
||||
glew freeimage draco glfw
|
||||
shell: bash
|
||||
- name: Download vcpkg cache
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: ${{ inputs.install-artifact-name }}-cache
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake ${{ inputs.compiler == 'gcc' && 'gcc g++' || 'clang' }} make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake ${{ inputs.compiler == 'gcc' && 'gcc g++' || 'clang' }} make libglu1-mesa-dev libegl1-mesa-dev fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core
|
||||
shell: bash
|
||||
|
||||
- name: Setup Xvfb and Mesa (Linux)
|
||||
@@ -65,7 +53,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
@@ -107,7 +95,7 @@ runs:
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd install
|
||||
call env.bat ${{ inputs.compiler == 'msvc' && 'vc14' || 'clang' }} win64 release
|
||||
call env.bat vc14 win64 release
|
||||
DRAWEXE.exe -v -f ${{ github.workspace }}/${{ inputs.test-script }}
|
||||
shell: cmd
|
||||
env:
|
||||
@@ -133,7 +121,7 @@ runs:
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd install
|
||||
call env.bat ${{ inputs.compiler == 'msvc' && 'vc14' || 'clang' }} win64 release
|
||||
call env.bat vc14 win64 release
|
||||
DRAWEXE.exe -v -c cleanuptest results/${{ inputs.test-directory-name }}
|
||||
shell: cmd
|
||||
env:
|
||||
@@ -157,7 +145,7 @@ runs:
|
||||
|
||||
- name: Upload test results (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: results-${{ inputs.test-directory-name }}
|
||||
path: |
|
||||
@@ -168,7 +156,7 @@ runs:
|
||||
|
||||
- name: Upload test results (macOS/Linux)
|
||||
if: ${{ inputs.platform == 'macos' || inputs.platform == 'linux' }}
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: results-${{ inputs.test-directory-name }}
|
||||
path: |
|
||||
|
30
.github/actions/setup-msys2/action.yml
vendored
Normal file
30
.github/actions/setup-msys2/action.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: 'Setup MSYS2'
|
||||
description: 'Setup MSYS2 environment for MinGW builds'
|
||||
|
||||
inputs:
|
||||
msystem:
|
||||
description: 'MSYS2 subsystem (MINGW64, CLANG64, UCRT64)'
|
||||
required: true
|
||||
packages:
|
||||
description: 'Packages to install'
|
||||
required: true
|
||||
dependencies:
|
||||
description: 'Additional dependencies to install'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ inputs.msystem }}
|
||||
update: true
|
||||
install: ${{ inputs.packages }} ${{ inputs.dependencies }}
|
||||
|
||||
- name: Setup environment
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo "Setting up environment variables..."
|
||||
echo "$MSYSTEM_PREFIX/bin" >> $GITHUB_PATH
|
||||
echo "CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX" >> $GITHUB_ENV
|
15
.github/actions/setup-ubuntu-deps/action.yml
vendored
Normal file
15
.github/actions/setup-ubuntu-deps/action.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: 'Setup Ubuntu Dependencies'
|
||||
description: 'Install Ubuntu dependencies and rapidjson for OCCT builds'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev libjemalloc-dev
|
||||
shell: bash
|
||||
|
||||
- name: Install rapidjson
|
||||
run: |
|
||||
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
|
||||
unzip rapidjson.zip
|
||||
shell: bash
|
30
.github/actions/setup-windows-msvc-deps/action.yml
vendored
Normal file
30
.github/actions/setup-windows-msvc-deps/action.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: 'Setup Windows MSVC Dependencies'
|
||||
description: 'Download and setup 3rdparty dependencies and Mesa3D for Windows MSVC builds'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Download and extract 3rdparty dependencies
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
shell: pwsh
|
||||
|
||||
- name: Download and extract Mesa3D
|
||||
run: |
|
||||
curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
|
||||
7z x mesa3d.7z -omesa3d
|
||||
shell: pwsh
|
||||
|
||||
- name: Run system-wide deployment
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
52
.github/actions/test-summary/action.yml
vendored
52
.github/actions/test-summary/action.yml
vendored
@@ -4,8 +4,13 @@ description: 'Compare test results between current branch and master'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download vcpkg cache
|
||||
uses: ./.github/actions/download-vcpkg-cache
|
||||
with:
|
||||
artifact-name: install-linux-clang-x64-cache
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake clang g++ make libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
|
||||
shell: bash
|
||||
|
||||
- name: Setup Xvfb and Mesa
|
||||
@@ -18,9 +23,9 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
with:
|
||||
name: install-linux-gcc-x64
|
||||
name: install-linux-clang-x64
|
||||
path: install
|
||||
|
||||
- name: Set execute permissions on DRAWEXE
|
||||
@@ -43,7 +48,7 @@ runs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
for platform in windows-x64 windows-clang-x64 macos-x64 macos-gcc-x64 linux-clang-x64 linux-gcc-x64; do
|
||||
for platform in windows-x64 macos-x64 linux-clang-x64; do
|
||||
echo "Downloading results for $platform"
|
||||
gh run download ${{ env.latest_run_id }} -n "results-$platform" -D "install/bin/results/master/"
|
||||
done
|
||||
@@ -53,7 +58,7 @@ runs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
for platform in windows-x64 windows-clang-x64 macos-x64 macos-gcc-x64 linux-clang-x64 linux-gcc-x64; do
|
||||
for platform in windows-x64 macos-x64 linux-clang-x64; do
|
||||
echo "Downloading results for $platform"
|
||||
gh run download -n "results-$platform" -D "install/bin/results/current/"
|
||||
done
|
||||
@@ -64,7 +69,7 @@ runs:
|
||||
echo "Comparing test results..."
|
||||
cd install/bin
|
||||
source env.sh
|
||||
for platform in windows-x64 windows-clang-x64 macos-x64 macos-gcc-x64 linux-clang-x64 linux-gcc-x64; do
|
||||
for platform in windows-x64 macos-x64 linux-clang-x64; do
|
||||
./DRAWEXE -v -c testdiff "results/current/$platform" "results/master/$platform" &
|
||||
done
|
||||
wait
|
||||
@@ -83,7 +88,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload comparison results
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: test-compare-results
|
||||
retention-days: 15
|
||||
@@ -94,3 +99,36 @@ runs:
|
||||
install/bin/results/**/summary.html
|
||||
install/bin/results/**/tests.log
|
||||
install/bin/results/**/*.png
|
||||
|
||||
- name: Post performance summary to PR
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT' && github.head_ref == 'IR' && github.base_ref == 'master'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
COMMENT_FILE=$(mktemp)
|
||||
|
||||
# Get commit ID and commit header
|
||||
COMMIT_ID=$(git rev-parse HEAD)
|
||||
COMMIT_HEADER=$(git log -1 --pretty=%s)
|
||||
|
||||
echo -e "**Performance Test Summary**\n" > "$COMMENT_FILE"
|
||||
echo -e "**Commit**: \`${COMMIT_ID}\`\n" >> "$COMMENT_FILE"
|
||||
echo -e "**Title**: ${COMMIT_HEADER}\n" >> "$COMMENT_FILE"
|
||||
|
||||
LOG_FILES=$(find install/bin/results/current -name "diff-*.log")
|
||||
if [ -z "$LOG_FILES" ]; then
|
||||
echo "No diff logs found." >> "$COMMENT_FILE"
|
||||
else
|
||||
for log_file in $LOG_FILES; do
|
||||
PLATFORM=$(basename $(dirname "$log_file"))
|
||||
echo "**Platform: ${PLATFORM}**" >> "$COMMENT_FILE"
|
||||
echo '```' >> "$COMMENT_FILE"
|
||||
grep -E "Total (MEMORY|CPU|IMAGE) difference:" "$log_file" >> "$COMMENT_FILE" || echo "No performance summary found." >> "$COMMENT_FILE"
|
||||
echo '```' >> "$COMMENT_FILE"
|
||||
echo "" >> "$COMMENT_FILE"
|
||||
done
|
||||
fi
|
||||
gh pr comment ${PR_NUMBER} --body-file "$COMMENT_FILE"
|
||||
rm "$COMMENT_FILE"
|
||||
shell: bash
|
||||
|
8
.github/actions/testgrid/testwindows.tcl
vendored
8
.github/actions/testgrid/testwindows.tcl
vendored
@@ -17,7 +17,13 @@ set exclude_list [list \
|
||||
"chamfer dist_angle_complex A4" \
|
||||
"chamfer dist_angle_complex A5" \
|
||||
"chamfer dist_angle_sequence A1" \
|
||||
"chamfer dist_angle_sequence A4"
|
||||
"chamfer dist_angle_sequence A4" \
|
||||
"caf basic W12" \
|
||||
"opengles3 general msaa" \
|
||||
"opengles3 geom interior1" \
|
||||
"opengles3 geom interior2" \
|
||||
"opengles3 shadows dir2" \
|
||||
"opengles3 textures alpha_mask"
|
||||
]
|
||||
|
||||
set exclude_str [join $exclude_list ,]
|
||||
|
@@ -18,7 +18,14 @@ set exclude_list [list \
|
||||
"chamfer dist_angle_complex A4" \
|
||||
"chamfer dist_angle_complex A5" \
|
||||
"chamfer dist_angle_sequence A1" \
|
||||
"chamfer dist_angle_sequence A4"
|
||||
"chamfer dist_angle_sequence A4" \
|
||||
"bugs fclasses bug30775" \
|
||||
"caf basic W12" \
|
||||
"opengles3 general msaa" \
|
||||
"opengles3 geom interior1" \
|
||||
"opengles3 geom interior2" \
|
||||
"opengles3 shadows dir2" \
|
||||
"opengles3 textures alpha_mask"
|
||||
]
|
||||
|
||||
set exclude_str [join $exclude_list ,]
|
||||
|
33
.github/actions/upload-vcpkg-cache/action.yml
vendored
Normal file
33
.github/actions/upload-vcpkg-cache/action.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: 'Upload vcpkg Cache'
|
||||
description: 'Upload vcpkg installed packages and cache for reuse'
|
||||
|
||||
inputs:
|
||||
artifact-name:
|
||||
description: 'Name of the artifact to store vcpkg cache'
|
||||
required: true
|
||||
build-directory:
|
||||
description: 'Build directory containing vcpkg_installed'
|
||||
required: false
|
||||
default: 'build'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
- name: Create vcpkg tar archive
|
||||
run: |
|
||||
cd ${{ inputs.build-directory }}
|
||||
tar -czf vcpkg-dependencies.tar.gz \
|
||||
--exclude='vcpkg_installed/*/debug' \
|
||||
--exclude='vcpkg_installed/**/*.pdb' \
|
||||
--exclude='vcpkg_installed/**/*.lib' \
|
||||
./vcpkg_installed/
|
||||
shell: bash
|
||||
|
||||
- name: Upload vcpkg tar archive
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: ${{ inputs.build-directory }}/vcpkg-dependencies.tar.gz
|
||||
retention-days: 7
|
||||
compression-level: 1
|
110
.github/actions/vcpkg-setup/action.yml
vendored
Normal file
110
.github/actions/vcpkg-setup/action.yml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
name: 'Setup vcpkg'
|
||||
description: 'Setup vcpkg dependencies for OCCT build on a specific platform'
|
||||
|
||||
inputs:
|
||||
vcpkg-tag:
|
||||
description: 'vcpkg tag to checkout'
|
||||
required: false
|
||||
default: '2025.06.13'
|
||||
github-token:
|
||||
description: 'GitHub token for NuGet package access'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "USERNAME=Open-Cascade-SAS" >> $GITHUB_ENV
|
||||
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV
|
||||
echo "VCPKG_EXE=${{ github.workspace }}/vcpkg/vcpkg" >> $GITHUB_ENV
|
||||
echo "FEED_URL=https://nuget.pkg.github.com/Open-Cascade-SAS/index.json" >> $GITHUB_ENV
|
||||
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite" >> $GITHUB_ENV
|
||||
echo "VCPKG_FEATURE_FLAGS=binarycaching,manifests,versions" >> $GITHUB_ENV
|
||||
echo "VCPKG_DISABLE_COMPILER_TRACKING=1" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Set environment variables (Windows)
|
||||
run: |
|
||||
echo "USERNAME=Open-Cascade-SAS" >> $env:GITHUB_ENV
|
||||
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $env:GITHUB_ENV
|
||||
echo "VCPKG_EXE=${{ github.workspace }}/vcpkg/vcpkg" >> $env:GITHUB_ENV
|
||||
echo "FEED_URL=https://nuget.pkg.github.com/Open-Cascade-SAS/index.json" >> $env:GITHUB_ENV
|
||||
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite" >> $env:GITHUB_ENV
|
||||
echo "VCPKG_FEATURE_FLAGS=binarycaching,manifests,versions" >> $env:GITHUB_ENV
|
||||
echo "VCPKG_DISABLE_COMPILER_TRACKING=1" >> $env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
- name: Install required packages (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete \
|
||||
libx11-dev \
|
||||
libxi-dev \
|
||||
libxext-dev \
|
||||
mesa-common-dev \
|
||||
libglu1-mesa-dev \
|
||||
libegl1-mesa-dev \
|
||||
libgles2-mesa-dev
|
||||
shell: bash
|
||||
|
||||
|
||||
- name: Install required packages (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew update || true
|
||||
brew install cmake ninja nasm autoconf automake mono openexr || true
|
||||
brew install --cask xquartz || true
|
||||
shell: bash
|
||||
|
||||
|
||||
- name: Set up vcpkg (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
git checkout ${{ inputs.vcpkg-tag }}
|
||||
./bootstrap-vcpkg.sh
|
||||
shell: bash
|
||||
|
||||
- name: Set up vcpkg (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
git checkout ${{ inputs.vcpkg-tag }}
|
||||
.\bootstrap-vcpkg.bat
|
||||
shell: cmd
|
||||
|
||||
- name: Add NuGet sources
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
.$(${{ env.VCPKG_EXE }} fetch nuget) `
|
||||
sources add `
|
||||
-Source "${{ env.FEED_URL }}" `
|
||||
-StorePasswordInClearText `
|
||||
-Name GitHubPackages `
|
||||
-UserName "${{ env.USERNAME }}" `
|
||||
-Password "${{ inputs.github-token }}"
|
||||
.$(${{ env.VCPKG_EXE }} fetch nuget) `
|
||||
setapikey "${{ inputs.github-token }}" `
|
||||
-Source "${{ env.FEED_URL }}"
|
||||
shell: pwsh
|
||||
|
||||
- name: Add NuGet sources
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
|
||||
sources add \
|
||||
-Source "${{ env.FEED_URL }}" \
|
||||
-StorePasswordInClearText \
|
||||
-Name GitHubPackages \
|
||||
-UserName "${{ env.USERNAME }}" \
|
||||
-Password "${{ inputs.github-token }}"
|
||||
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
|
||||
setapikey "${{ inputs.github-token }}" \
|
||||
-Source "${{ env.FEED_URL }}"
|
||||
shell: bash
|
247
.github/copilot-instructions.md
vendored
Normal file
247
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
# OCCT Copilot Instructions
|
||||
|
||||
This file provides the comprehensive guidance for AI assistants working with the Open CASCADE Technology (OCCT) C++17+ 3D CAD/CAM/CAE library.
|
||||
|
||||
---
|
||||
|
||||
## 1. Core Directives for AI Assistant
|
||||
|
||||
> **IMPORTANT:** These are the most critical rules. Follow them strictly.
|
||||
|
||||
1. **Memory Management is Paramount:**
|
||||
- **ALWAYS** use `Handle(ClassName)` for any class inheriting from `Standard_Transient` (e.g., `Geom_*`, `Poly_*`, `AIS_*`, `V3d_*`). This is for reference-counted objects.
|
||||
- **NEVER** use raw pointers (`ClassName*`) for these types, as it will cause memory leaks.
|
||||
- **Correct:** `Handle(Geom_Circle) aCircle = new Geom_Circle(...);`
|
||||
- **Wrong:** `Geom_Circle* aCircle = new Geom_Circle(...);`
|
||||
|
||||
2. **Check Operation Status:**
|
||||
- After using an API that performs a geometric operation (e.g., `BRepAlgoAPI_Fuse`, `BRepBuilderAPI_MakeEdge`), **ALWAYS** check if the operation was successful using the `IsDone()` method before accessing the result.
|
||||
- **Correct:**
|
||||
```cpp
|
||||
BRepAlgoAPI_Fuse aFuser(theShape1, theShape2);
|
||||
if (aFuser.IsDone()) {
|
||||
auto aResult = aFuser.Shape();
|
||||
} else {
|
||||
// Handle error
|
||||
}
|
||||
```
|
||||
|
||||
3. **Strict Naming and File Conventions:**
|
||||
- Adhere to the strict `Package_ClassName` convention.
|
||||
- Place new files in the correct directory: `src/Module/Toolkit/Package/`.
|
||||
- After adding a file, **ALWAYS** update the corresponding `src/Module/Toolkit/FILES.cmake` file.
|
||||
|
||||
4. **Use Modern C++ Idioms:**
|
||||
- Prefer `auto` for variable declarations where the type is clear, especially with iterators.
|
||||
- Use range-based `for` loops and structured bindings where applicable.
|
||||
- Use the modern `TopExp_Explorer` constructor style.
|
||||
- **Correct:** `for (TopExp_Explorer anExp(theShape, TopAbs_FACE); anExp.More(); anExp.Next()) { ... }`
|
||||
- **Wrong:** `for (TopExp_Explorer anExp; anExp.Init(theShape, TopAbs_FACE); anExp.More(); anExp.Next()) { ... }`
|
||||
|
||||
5. **Safe Type Casting:**
|
||||
- When downcasting topological shapes, **ALWAYS** use the `TopoDS` helper functions to avoid errors.
|
||||
- **Correct:** `auto aFace = TopoDS::Face(anExp.Current());`
|
||||
- **Wrong:** `auto aFace = (const TopoDS_Face&)anExp.Current();`
|
||||
|
||||
6. **Handle Downcasting:**
|
||||
- Use `Handle(DerivedClass)::DownCast(BaseHandle)` to safely downcast handles.
|
||||
- **Correct:**
|
||||
```cpp
|
||||
Handle(Geom_Circle) circ = Handle(Geom_Circle)::DownCast(someCurveHandle);
|
||||
```
|
||||
- **Wrong:**
|
||||
```cpp
|
||||
// Do not use C-style casts on handles
|
||||
Geom_Circle* circ = (Geom_Circle*)someHandle.Get();
|
||||
```
|
||||
|
||||
7. **Validate Handles for Null Safety:**
|
||||
- **ALWAYS** check that a `Handle(ClassName)` is not null before dereferencing it:
|
||||
```cpp
|
||||
if (!theHandle.IsNull()) {
|
||||
// use theHandle
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. Project Overview
|
||||
|
||||
Open CASCADE Technology (OCCT) is a comprehensive C++ software development platform for 3D surface and solid modeling, CAD data exchange, and visualization. It's a modern C++17+ library providing services for CAD/CAM/CAE applications.
|
||||
|
||||
### Architecture & Source Organization
|
||||
|
||||
- **`src/`**: Source code, organized by a `Module/Toolkit/Package` hierarchy.
|
||||
- **`tests/`**: Draw Harness test files, organized by functionality.
|
||||
- **`adm/`**: Administrative and build configuration files (CMake).
|
||||
- **`samples/`**: Example applications.
|
||||
|
||||
---
|
||||
|
||||
## 3. Code Conventions
|
||||
|
||||
### Naming Patterns
|
||||
|
||||
| Element Type | Pattern | Example |
|
||||
| --------------------------- | ---------------------------- | -------------------------------- |
|
||||
| **Classes** | `Package_ClassName` | `TopoDS_Shape`, `BRep_Builder` |
|
||||
| **Public Methods** | `MethodName` | `IsDone()`, `Shape()` |
|
||||
| **Private Methods** | `methodName` | `myInternalMethod()` |
|
||||
| **Method Parameters** | `theParameterName` | `theShape`, `theTolerance` |
|
||||
| **Local Variables** | `aVariableName` | `aBox`, `anExplorer` |
|
||||
| **Class Member Fields** | `myFieldName` | `myShape`, `myIsDone` |
|
||||
| **Struct Member Fields** | `FieldVariableName` | `Point`, `Value` |
|
||||
| **Global Variables** | `THE_GLOBAL_VARIABLE` | `THE_DEFAULT_PRECISION` |
|
||||
|
||||
### Type Mappings
|
||||
|
||||
| OCCT Type | C++ Equivalent | Notes |
|
||||
| ------------------- | -------------- | ----------------------------------- |
|
||||
| `Standard_Real` | `double` | Use for all floating-point numbers. |
|
||||
| `Standard_Integer` | `int` | Use for all integer values. |
|
||||
| `Standard_Boolean` | `bool` | Use for `true`/`false` values. |
|
||||
|
||||
### Modern C++ Encouraged
|
||||
This is a C++17+ codebase. Proactively use modern features to improve code quality:
|
||||
- `auto`
|
||||
- Range-based `for` loops
|
||||
- Structured bindings: `for (const auto& [key, value] : aMap)`
|
||||
- `std::optional` for optional return values where appropriate.
|
||||
- `if constexpr` for compile-time conditions.
|
||||
|
||||
---
|
||||
|
||||
## 4. Step-by-Step Workflow Example: Adding a New Class and Test
|
||||
|
||||
This example demonstrates the end-to-end process for adding a new class `BRepTest_MyNewClass` to the `TKTopAlgo` toolkit and creating a corresponding GTest.
|
||||
|
||||
**1. Create Header and Source Files:**
|
||||
Navigate to the correct package directory and create the files.
|
||||
```bash
|
||||
# Navigate to the BRepTest package in the ModelingAlgorithms module
|
||||
cd src/ModelingAlgorithms/TKTopAlgo/BRepTest
|
||||
touch BRepTest_MyNewClass.hxx BRepTest_MyNewClass.cxx
|
||||
```
|
||||
|
||||
**2. Implement the Class:**
|
||||
Add content to `BRepTest_MyNewClass.hxx` and `.cxx`, following all code conventions.
|
||||
|
||||
**3. Add Files to CMake:**
|
||||
Edit the toolkit's `FILES.cmake` to register the new files.
|
||||
```bash
|
||||
# Edit the CMake file for TKTopAlgo
|
||||
vim src/ModelingAlgorithms/TKTopAlgo/FILES.cmake
|
||||
```
|
||||
Add the new files to the `OCCT_<PackageName>_FILES` list:
|
||||
```cmake
|
||||
# In FILES.cmake
|
||||
...
|
||||
set (OCCT_BRepTest_FILES
|
||||
...
|
||||
BRepTest_MyNewClass.hxx
|
||||
BRepTest_MyNewClass.cxx
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
**4. Create a GTest:**
|
||||
Navigate to the GTest directory for the toolkit and create a test file.
|
||||
```bash
|
||||
# Navigate to the GTest directory for TKTopAlgo
|
||||
cd src/ModelingAlgorithms/TKTopAlgo/GTests
|
||||
touch BRepTest_MyNewClass_Test.cxx
|
||||
```
|
||||
Write the test implementation in the new file.
|
||||
|
||||
**5. Add GTest to CMake:**
|
||||
Edit the same `FILES.cmake` to add the test file.
|
||||
```cmake
|
||||
# In FILES.cmake
|
||||
...
|
||||
set (OCCT_TKTopAlgo_GTests_FILES
|
||||
...
|
||||
GTests/BRepTest_MyNewClass_Test.cxx
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
**6. Build and Run Test:**
|
||||
From the `build` directory, build the project and run the tests.
|
||||
```bash
|
||||
# Navigate to build directory
|
||||
cd build
|
||||
|
||||
# Re-run CMake to pick up new files (usually not needed, but good practice)
|
||||
cmake .. -DBUILD_GTEST=ON
|
||||
|
||||
# Build the project
|
||||
cmake --build . --config Release
|
||||
|
||||
# Run the tests
|
||||
./bin/OpenCascadeGTest --gtest_filter=*MyNewClass*
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Build and Test System
|
||||
|
||||
### Build System (CMake)
|
||||
- **Primary build system:** CMake 3.16+ recommended.
|
||||
- **Build Directory:** Always build in a separate directory (e.g., `build/`).
|
||||
- **Quick Build:**
|
||||
```bash
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_GTEST=ON
|
||||
cmake --build . --config Release --parallel
|
||||
```
|
||||
- **Environment:** Before running any OCCT executable (including tests), you **must** source the environment script: `source build/env.sh` (or `build\env.bat` on Windows).
|
||||
|
||||
### Testing Frameworks
|
||||
- **Draw Harness:** Tcl-based framework for interactive testing. Located in `tests/`. Run with `build/DRAWEXE`.
|
||||
- **GTest:** C++ unit testing framework. Tests are located in `src/.../GTests/`. Enable with `-DBUILD_GTEST=ON`.
|
||||
|
||||
---
|
||||
|
||||
## 6. Common Patterns & Key Packages
|
||||
|
||||
### Common Operations
|
||||
|
||||
- **Shape Creation:** Use `BRepPrimAPI_` classes (`MakeBox`, `MakeCylinder`).
|
||||
- **Boolean Operations:** Use `BRepAlgoAPI_` classes (`Fuse`, `Cut`, `Common`).
|
||||
- **Shape Exploration:** Use `TopExp_Explorer`.
|
||||
- **Transformations:** Use `gp_Trsf` and `BRepBuilderAPI_Transform`.
|
||||
|
||||
### Key Packages
|
||||
|
||||
| Package | Purpose | Module |
|
||||
| ----------- | ------------------------------------- | --------------------- |
|
||||
| `gp` | Geometric Primitives (Points, Vecs) | FoundationClasses |
|
||||
| `Geom` | Geometric entities (Curves, Surfaces) | ModelingData |
|
||||
| `TopoDS` | Topological Data Structures (Shapes) | ModelingData |
|
||||
| `TopExp` | Exploring topological shapes | ModelingData |
|
||||
| `BRepAlgoAPI` | High-level modeling algorithms | ModelingAlgorithms |
|
||||
| `BRepPrimAPI` | Geometric primitives creation | ModelingAlgorithms |
|
||||
| `AIS` | Application Interactive Services | Visualization |
|
||||
|
||||
### Common Headers
|
||||
```cpp
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Handle_Geom_Circle.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
#include <BRepBuilderAPI_Transform.hxx>
|
||||
#include <BRepPrimAPI_MakeBox.hxx>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. Key Files & Platform Notes
|
||||
|
||||
- **`adm/MODULES`**: Defines all modules and toolkits.
|
||||
- **`src/*/FILES.cmake`**: Lists all source/header files for a toolkit. **You must edit this when adding/removing files.**
|
||||
- **`build/env.sh/bat`**: The crucial environment script.
|
270
.github/workflows/build-and-test-multiplatform.yml
vendored
270
.github/workflows/build-and-test-multiplatform.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -35,13 +35,28 @@ jobs:
|
||||
with:
|
||||
base-ref: ${{ github.event.pull_request.base.ref || 'master' }}
|
||||
|
||||
ascii-check:
|
||||
name: Check for non-ASCII characters
|
||||
runs-on: windows-2025
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for non-ASCII characters
|
||||
uses: ./.github/actions/ascii-check
|
||||
with:
|
||||
base-ref: ${{ github.event.pull_request.base.ref || 'master' }}
|
||||
|
||||
documentation:
|
||||
name: Build Documentation
|
||||
runs-on: windows-2025
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build documentation
|
||||
uses: ./.github/actions/build-docs
|
||||
@@ -52,7 +67,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -60,22 +75,7 @@ jobs:
|
||||
platform: windows
|
||||
compiler: msvc
|
||||
artifact-name: install-windows-x64
|
||||
|
||||
prepare-and-build-windows-clang-x64:
|
||||
name: Prepare and Build on Windows with Clang (x64)
|
||||
runs-on: windows-2025
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
with:
|
||||
platform: windows
|
||||
compiler: clang
|
||||
artifact-name: install-windows-clang-x64
|
||||
use-vtk: 'false'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
prepare-and-build-macos-x64:
|
||||
name: Prepare and Build on macOS with Clang (x64)
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -91,21 +91,7 @@ jobs:
|
||||
platform: macos
|
||||
compiler: clang
|
||||
artifact-name: install-macos-x64
|
||||
|
||||
prepare-and-build-macos-gcc-x64:
|
||||
name: Prepare and Build on macOS with GCC (x64)
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
with:
|
||||
platform: macos
|
||||
compiler: gcc
|
||||
artifact-name: install-macos-gcc-x64
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
prepare-and-build-linux-clang-x64:
|
||||
name: Prepare and Build on Ubuntu with Clang (x64)
|
||||
@@ -113,7 +99,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -121,6 +107,7 @@ jobs:
|
||||
platform: linux
|
||||
compiler: clang
|
||||
artifact-name: install-linux-clang-x64
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
prepare-and-build-macos-clang-no-pch:
|
||||
name: Prepare and Build on macOS with Clang (No PCH)
|
||||
@@ -128,7 +115,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -140,21 +127,7 @@ jobs:
|
||||
build-opt-profile: 'Default'
|
||||
additional-cmake-flags: '-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" -D CMAKE_C_FLAGS="-Werror -Wall -Wextra"'
|
||||
cmake-build-type: 'Debug'
|
||||
|
||||
prepare-and-build-linux-gcc-x64:
|
||||
name: Prepare and Build on Ubuntu with GCC (x64)
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
with:
|
||||
platform: linux
|
||||
compiler: gcc
|
||||
artifact-name: install-linux-gcc-x64
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-inspector-windows:
|
||||
name: Build TInspector on Windows
|
||||
@@ -163,7 +136,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build TInspector
|
||||
uses: ./.github/actions/build-tinspector
|
||||
@@ -178,7 +151,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build TInspector
|
||||
uses: ./.github/actions/build-tinspector
|
||||
@@ -193,7 +166,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build CSharp Sample
|
||||
uses: ./.github/actions/build-sample-csharp
|
||||
@@ -208,7 +181,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build MFC Sample
|
||||
uses: ./.github/actions/build-sample-mfc
|
||||
@@ -223,7 +196,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build Qt Sample
|
||||
uses: ./.github/actions/build-sample-qt
|
||||
@@ -238,7 +211,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build Qt Sample
|
||||
uses: ./.github/actions/build-sample-qt
|
||||
@@ -253,7 +226,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -271,7 +244,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -282,42 +255,6 @@ jobs:
|
||||
results-artifact-name: results-windows-x64
|
||||
test-directory-name: windows-x64
|
||||
|
||||
test-windows-clang-x64:
|
||||
name: Test on Windows with Clang (x64)
|
||||
runs-on: windows-2025
|
||||
needs: prepare-and-build-windows-clang-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
platform: windows
|
||||
compiler: clang
|
||||
install-artifact-name: install-windows-clang-x64
|
||||
test-directory-name: windows-clang-x64
|
||||
test-script: .github/actions/testgrid/testwindowsclang.tcl
|
||||
|
||||
retest-windows-clang-x64:
|
||||
name: Regression Test on Windows with Clang (x64)
|
||||
runs-on: windows-2025
|
||||
needs: test-windows-clang-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
with:
|
||||
platform: windows
|
||||
compiler: clang
|
||||
install-artifact-name: install-windows-clang-x64
|
||||
results-artifact-name: results-windows-clang-x64
|
||||
test-directory-name: windows-clang-x64
|
||||
|
||||
test-macos-x64:
|
||||
name: Test on macOS (x64)
|
||||
runs-on: macos-15
|
||||
@@ -325,7 +262,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -343,7 +280,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -354,42 +291,6 @@ jobs:
|
||||
results-artifact-name: results-macos-x64
|
||||
test-directory-name: macos-x64
|
||||
|
||||
test-macos-gcc-x64:
|
||||
name: Test on macOS with GCC (x64)
|
||||
runs-on: macos-15
|
||||
needs: prepare-and-build-macos-gcc-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
platform: macos
|
||||
compiler: gcc
|
||||
install-artifact-name: install-macos-gcc-x64
|
||||
test-directory-name: macos-gcc-x64
|
||||
test-script: .github/actions/testgrid/testmacosgcc.tcl
|
||||
|
||||
retest-macos-gcc-x64:
|
||||
name: Regression Test on macOS with GCC (x64)
|
||||
runs-on: macos-15
|
||||
needs: test-macos-gcc-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
with:
|
||||
platform: macos
|
||||
compiler: gcc
|
||||
install-artifact-name: install-macos-gcc-x64
|
||||
results-artifact-name: results-macos-gcc-x64
|
||||
test-directory-name: macos-gcc-x64
|
||||
|
||||
test-linux-clang-x64:
|
||||
name: Test on Linux with Clang (x64)
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -397,7 +298,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -415,7 +316,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -426,42 +327,6 @@ jobs:
|
||||
results-artifact-name: results-linux-clang-x64
|
||||
test-directory-name: linux-clang-x64
|
||||
|
||||
test-linux-gcc-x64:
|
||||
name: Test on Linux with GCC (x64)
|
||||
runs-on: ubuntu-24.04
|
||||
needs: prepare-and-build-linux-gcc-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
platform: linux
|
||||
compiler: gcc
|
||||
install-artifact-name: install-linux-gcc-x64
|
||||
test-directory-name: linux-gcc-x64
|
||||
test-script: .github/actions/testgrid/testlinuxgcc.tcl
|
||||
|
||||
retest-linux-gcc-x64:
|
||||
name: Regression Test on Linux with GCC (x64)
|
||||
runs-on: ubuntu-24.04
|
||||
needs: test-linux-gcc-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
with:
|
||||
platform: linux
|
||||
compiler: gcc
|
||||
install-artifact-name: install-linux-gcc-x64
|
||||
results-artifact-name: results-linux-gcc-x64
|
||||
test-directory-name: linux-gcc-x64
|
||||
|
||||
run-gtest-windows-x64:
|
||||
name: Run GTest on Windows with MSVC (x64)
|
||||
needs: prepare-and-build-windows-x64
|
||||
@@ -469,7 +334,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -479,23 +344,6 @@ jobs:
|
||||
install-artifact-name: install-windows-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
run-gtest-windows-clang-x64:
|
||||
name: Run GTest on Windows with Clang (x64)
|
||||
needs: prepare-and-build-windows-clang-x64
|
||||
runs-on: windows-2025
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
with:
|
||||
platform: windows
|
||||
compiler: clang
|
||||
install-artifact-name: install-windows-clang-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
run-gtest-macos-x64:
|
||||
name: Run GTest on macOS with Clang (x64)
|
||||
needs: prepare-and-build-macos-x64
|
||||
@@ -503,7 +351,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -513,23 +361,6 @@ jobs:
|
||||
install-artifact-name: install-macos-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
run-gtest-macos-gcc-x64:
|
||||
name: Run GTest on macOS with GCC (x64)
|
||||
needs: prepare-and-build-macos-gcc-x64
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
with:
|
||||
platform: macos
|
||||
compiler: gcc
|
||||
install-artifact-name: install-macos-gcc-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
run-gtest-linux-clang-x64:
|
||||
name: Run GTest on Linux with Clang (x64)
|
||||
needs: prepare-and-build-linux-clang-x64
|
||||
@@ -537,7 +368,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -547,32 +378,15 @@ jobs:
|
||||
install-artifact-name: install-linux-clang-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
run-gtest-linux-gcc-x64:
|
||||
name: Run GTest on Linux with GCC (x64)
|
||||
needs: prepare-and-build-linux-gcc-x64
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
with:
|
||||
platform: linux
|
||||
compiler: gcc
|
||||
install-artifact-name: install-linux-gcc-x64
|
||||
artifact-suffix: x64
|
||||
|
||||
test-summary:
|
||||
name: 'Summarize Test Results'
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
||||
needs: [retest-windows-x64, retest-windows-clang-x64, retest-macos-x64, retest-macos-gcc-x64, retest-linux-clang-x64, retest-linux-gcc-x64]
|
||||
needs: [retest-windows-x64, retest-macos-x64, retest-linux-clang-x64]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Generate Test Summary
|
||||
uses: ./.github/actions/test-summary
|
||||
|
219
.github/workflows/build-multiconfig-mingw.yml
vendored
219
.github/workflows/build-multiconfig-mingw.yml
vendored
@@ -1,219 +0,0 @@
|
||||
# This workflow validates the build on Windows using MinGW and MSYS2.
|
||||
# It is triggered on pushes to the master branch.
|
||||
# The workflow includes steps to install dependencies, configure, build, and clean up the project.
|
||||
|
||||
name: MinGW build validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
main_job:
|
||||
name: Windows MinGW validation
|
||||
runs-on: windows-2025
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "GCC",
|
||||
cc: "x86_64-w64-mingw32-gcc",
|
||||
cxx: "x86_64-w64-mingw32-g++",
|
||||
package: "mingw-w64-x86_64-toolchain",
|
||||
thirdparty_dir: "/mingw64",
|
||||
compiler_flags: "",
|
||||
dependencies: "mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-rapidjson mingw-w64-x86_64-freetype mingw-w64-x86_64-draco mingw-w64-x86_64-freeimage mingw-w64-x86_64-tbb mingw-w64-x86_64-tk mingw-w64-x86_64-tcl mingw-w64-x86_64-openvr mingw-w64-x86_64-jemalloc mingw-w64-x86_64-mesa mingw-w64-x86_64-angleproject mingw-w64-x86_64-llvm-openmp mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
package: "mingw-w64-clang-x86_64-toolchain",
|
||||
thirdparty_dir: "/clang64",
|
||||
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Wall -Wextra\"",
|
||||
dependencies: "mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-rapidjson mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-draco mingw-w64-clang-x86_64-freeimage mingw-w64-clang-x86_64-tbb mingw-w64-clang-x86_64-tk mingw-w64-clang-x86_64-tcl mingw-w64-clang-x86_64-openvr mingw-w64-clang-x86_64-jemalloc mingw-w64-clang-x86_64-mesa mingw-w64-clang-x86_64-angleproject mingw-w64-clang-x86_64-llvm-openmp mingw-w64-clang-x86_64-winpthreads-git mingw-w64-clang-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
|
||||
}
|
||||
- {
|
||||
name: "UCRT",
|
||||
cc: "x86_64-w64-mingw32-gcc",
|
||||
cxx: "x86_64-w64-mingw32-g++",
|
||||
package: "mingw-w64-ucrt-x86_64-toolchain",
|
||||
thirdparty_dir: "/ucrt64",
|
||||
compiler_flags: "",
|
||||
dependencies: "mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gcc-libs mingw-w64-ucrt-x86_64-omp mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-rapidjson mingw-w64-ucrt-x86_64-freetype mingw-w64-ucrt-x86_64-draco mingw-w64-ucrt-x86_64-freeimage mingw-w64-ucrt-x86_64-tbb mingw-w64-ucrt-x86_64-tk mingw-w64-ucrt-x86_64-tcl mingw-w64-ucrt-x86_64-openvr mingw-w64-ucrt-x86_64-jemalloc mingw-w64-ucrt-x86_64-mesa mingw-w64-ucrt-x86_64-angleproject mingw-w64-ucrt-x86_64-llvm-openmp mingw-w64-ucrt-x86_64-winpthreads-git mingw-w64-ucrt-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
|
||||
}
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.config.name == 'Clang' && 'CLANG64' || matrix.config.name == 'UCRT' && 'UCRT64' || 'MINGW64' }}
|
||||
update: true
|
||||
install: ${{ matrix.config.package }} ${{ matrix.config.dependencies }}
|
||||
|
||||
- name: Setup environment
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo "Checking compiler version:"
|
||||
${{ matrix.config.cc }} --version
|
||||
echo "Checking CMake version:"
|
||||
cmake --version
|
||||
echo "Setting up environment variables..."
|
||||
echo "$MSYSTEM_PREFIX/bin" >> $GITHUB_PATH
|
||||
echo "CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure basic
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build basic
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
shell: pwsh
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
|
||||
- name: Configure full shared
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Production \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D USE_MMGR_TYPE=JEMALLOC \
|
||||
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=OFF \
|
||||
-D USE_TBB=OFF \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build full shared
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
shell: pwsh
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
|
||||
|
||||
- name: Configure full static
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Default \
|
||||
-D BUILD_LIBRARY_TYPE=Static \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D USE_MMGR_TYPE=JEMALLOC \
|
||||
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=OFF \
|
||||
-D USE_TBB=OFF \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build full static
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
shell: pwsh
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
|
||||
|
||||
- name: Configure full with DEBUG define
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
|
||||
-D BUILD_WITH_DEBUG=ON \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Production \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=OFF \
|
||||
-D USE_TBB=OFF \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build full with DEBUG define
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
shell: pwsh
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
|
213
.github/workflows/build-multiconfig-msvc.yml
vendored
213
.github/workflows/build-multiconfig-msvc.yml
vendored
@@ -1,213 +0,0 @@
|
||||
# This workflow validates the build on Windows using MSVC and Clang compilers.
|
||||
# It is triggered on pushes to the master branch.
|
||||
# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
|
||||
|
||||
name: MSVC build validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
main_job:
|
||||
name: Windows MSVC/Clang validation
|
||||
runs-on: windows-2025
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "MSVC",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
generator: "Visual Studio 17 2022",
|
||||
toolset: "host=x64",
|
||||
c_flags: "/W4 /WX",
|
||||
cxx_flags: "/W4 /WX"
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
generator: "Ninja",
|
||||
toolset: "",
|
||||
c_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option",
|
||||
cxx_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option"
|
||||
}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Set up MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Download and extract 3rdparty dependencies
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
|
||||
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
|
||||
Remove-Item 3rdparty-vc14-64.zip
|
||||
shell: pwsh
|
||||
|
||||
- name: Download and extract Mesa3D
|
||||
run: |
|
||||
curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
|
||||
7z x mesa3d.7z -omesa3d
|
||||
|
||||
- name: Run system-wide deployment
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
||||
|
||||
- name: Configure basic
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
|
||||
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build basic
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config Release
|
||||
shell: pwsh
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure full shared
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
|
||||
-D BUILD_USE_PCH=OFF `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D BUILD_OPT_PROFILE=Production `
|
||||
-D BUILD_LIBRARY_TYPE=Shared `
|
||||
-D CMAKE_BUILD_TYPE=Debug `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D USE_MMGR_TYPE=JEMALLOC `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
|
||||
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build full shared
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config Debug
|
||||
shell: pwsh
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure full static
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
|
||||
-D BUILD_USE_PCH=OFF `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D BUILD_OPT_PROFILE=Default `
|
||||
-D BUILD_LIBRARY_TYPE=Static `
|
||||
-D CMAKE_BUILD_TYPE=Debug `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D USE_MMGR_TYPE=JEMALLOC `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=OFF `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
|
||||
-D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build full static
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config Debug
|
||||
shell: pwsh
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure full with DEBUG define
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
|
||||
-D BUILD_WITH_DEBUG=ON `
|
||||
-D BUILD_USE_PCH=OFF `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D BUILD_OPT_PROFILE=Production `
|
||||
-D BUILD_LIBRARY_TYPE=Shared `
|
||||
-D CMAKE_BUILD_TYPE=Debug `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON ` ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Build full with DEBUG define
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config Debug
|
||||
shell: pwsh
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
Remove-Item -Recurse -Force build
|
||||
Remove-Item -Recurse -Force ${{ github.workspace }}/install
|
||||
shell: pwsh
|
180
.github/workflows/build-multiconfig-ubuntu.yml
vendored
180
.github/workflows/build-multiconfig-ubuntu.yml
vendored
@@ -1,180 +0,0 @@
|
||||
# This workflow validates the build on the latest Ubuntu version (24.04) using multiple configurations.
|
||||
# It is triggered on pushes to the master branch.
|
||||
# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
|
||||
|
||||
name: Ubuntu build validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
main_job:
|
||||
name: Latest ubuntu validation
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "GCC",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
compiler_flags: ""
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Werror -Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Werror -Wall -Wextra\""
|
||||
}
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev libjemalloc-dev
|
||||
|
||||
- name: Install rapidjson
|
||||
run: |
|
||||
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
|
||||
unzip rapidjson.zip
|
||||
|
||||
- name: Configure basic
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build basic
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
rm -rf build
|
||||
|
||||
- name: Configure full shared
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Production \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D USE_MMGR_TYPE=JEMALLOC \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
|
||||
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=ON \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build full shared
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
rm -rf build
|
||||
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
|
||||
|
||||
- name: Configure full static
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Default \
|
||||
-D BUILD_LIBRARY_TYPE=Static \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D USE_MMGR_TYPE=JEMALLOC \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
|
||||
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=OFF \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
${{ matrix.config.compiler_flags }} ..
|
||||
|
||||
- name: Build full static
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
rm -rf build
|
||||
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
|
||||
|
||||
- name: Configure full with DEBUG define
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Ninja" \
|
||||
-D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
|
||||
-D BUILD_WITH_DEBUG=ON \
|
||||
-D BUILD_USE_PCH=OFF \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=Production \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
|
||||
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FFMPEG=OFF \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D USE_GLES2=ON \
|
||||
-D USE_OPENVR=ON \
|
||||
-D USE_VTK=ON \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON ..
|
||||
|
||||
- name: Build full with DEBUG define
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
|
||||
|
||||
- name: Clear up after build
|
||||
run: |
|
||||
rm -rf build
|
||||
rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
|
102
.github/workflows/build-occt-wasm-ubuntu.yml
vendored
102
.github/workflows/build-occt-wasm-ubuntu.yml
vendored
@@ -1,102 +0,0 @@
|
||||
# This workflow validates the WebAssembly build on Ubuntu.
|
||||
# It is triggered on pushes to the master branch.
|
||||
# The workflow includes steps to install dependencies, configure, build, and clean up the project.
|
||||
|
||||
name: WebAssembly build (Ubuntu)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
USERNAME: Open-Cascade-SAS
|
||||
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
|
||||
FEED_URL: https://nuget.pkg.github.com/Open-Cascade-SAS/index.json
|
||||
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite"
|
||||
EMSDK_VERSION: 3.1.74
|
||||
|
||||
jobs:
|
||||
wasm-build:
|
||||
name: WebAssembly Build
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete
|
||||
sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
|
||||
|
||||
- name: Setup vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
./vcpkg/bootstrap-vcpkg.sh
|
||||
|
||||
- name: Add NuGet sources
|
||||
run: |
|
||||
mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
|
||||
sources add \
|
||||
-Source "${FEED_URL}" \
|
||||
-StorePasswordInClearText \
|
||||
-Name GitHubPackages \
|
||||
-UserName "${USERNAME}" \
|
||||
-Password "${{ secrets.GITHUB_TOKEN }}"
|
||||
mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
|
||||
setapikey "${{ secrets.GITHUB_TOKEN }}" \
|
||||
-Source "${FEED_URL}"
|
||||
|
||||
- name: Setup Emscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
./emsdk install ${EMSDK_VERSION}
|
||||
./emsdk activate ${EMSDK_VERSION}
|
||||
echo "EMSDK=${{ github.workspace }}/emsdk" >> $GITHUB_ENV
|
||||
echo "${{ github.workspace }}/emsdk" >> $GITHUB_PATH
|
||||
echo "${{ github.workspace }}/emsdk/upstream/emscripten" >> $GITHUB_PATH
|
||||
|
||||
- name: Configure OCCT with vcpkg
|
||||
run: |
|
||||
source "${{ github.workspace }}/emsdk/emsdk_env.sh"
|
||||
mkdir -p "build-${{ matrix.build_type }}"
|
||||
cd "build-${{ matrix.build_type }}"
|
||||
export VCPKG_ROOT="${{ github.workspace }}/vcpkg"
|
||||
emcmake cmake -G "Ninja" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
|
||||
-DVCPKG_TARGET_TRIPLET=wasm32-emscripten \
|
||||
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DBUILD_USE_VCPKG=ON \
|
||||
-DUSE_MMGR_TYPE=NATIVE \
|
||||
-DBUILD_LIBRARY_TYPE=Static \
|
||||
-DBUILD_MODULE_Draw=OFF \
|
||||
-DUSE_FREETYPE=OFF \
|
||||
-DUSE_TK=OFF \
|
||||
-DUSE_TCL=OFF \
|
||||
-DUSE_DRACO=ON \
|
||||
-DUSE_FFMPEG=OFF \
|
||||
-DUSE_FREEIMAGE=OFF \
|
||||
-DUSE_OPENVR=OFF \
|
||||
-DUSE_VTK=OFF \
|
||||
-DUSE_TBB=OFF \
|
||||
-DUSE_RAPIDJSON=ON \
|
||||
-DINSTALL_DIR="${{ github.workspace }}/install-wasm-${{ matrix.build_type }}" \
|
||||
-DCMAKE_CXX_FLAGS="-s WASM=1 -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s ALLOW_MEMORY_GROWTH=1" \
|
||||
-DCMAKE_EXECUTABLE_SUFFIX=".js" ..
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd build-${{ matrix.build_type }}
|
||||
cmake --build . --config ${{ matrix.build_type }} --target install -- -j4
|
170
.github/workflows/build-occt-with-vcpkg.yml
vendored
170
.github/workflows/build-occt-with-vcpkg.yml
vendored
@@ -1,170 +0,0 @@
|
||||
# This workflow builds OCCT using vcpkg on multiple platforms (Windows, macOS, Linux).
|
||||
# It builds in both Debug and Release modes.
|
||||
# All dependencies except the compiler are installed using vcpkg.
|
||||
# The workflow includes steps to clone vcpkg, install dependencies, configure and build.
|
||||
|
||||
name: Build OCCT with vcpkg
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
USERNAME: Open-Cascade-SAS
|
||||
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
|
||||
FEED_URL: https://nuget.pkg.github.com/Open-Cascade-SAS/index.json
|
||||
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, ubuntu-22.04, windows-2022, windows-2025, macos-15, macos-14, macos-13, ubuntu-24.04-arm, ubuntu-22.04-arm]
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install required packages (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete
|
||||
sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
|
||||
|
||||
- name: Install required packages (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew update || true
|
||||
brew install cmake ninja nasm autoconf mono || true
|
||||
# temporary workaround for missing tcl-tk
|
||||
brew install tcl-tk || true
|
||||
# Force link any conflicting packages
|
||||
brew link --overwrite python@3.12 || true
|
||||
brew link --overwrite python@3.13 || true
|
||||
|
||||
- name: Install required packages (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Set up vcpkg (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
./vcpkg/bootstrap-vcpkg.sh
|
||||
shell: bash
|
||||
|
||||
- name: Set up vcpkg (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
.\vcpkg\bootstrap-vcpkg.bat
|
||||
shell: cmd
|
||||
|
||||
- name: Add NuGet sources
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
.$(${{ env.VCPKG_EXE }} fetch nuget) `
|
||||
sources add `
|
||||
-Source "${{ env.FEED_URL }}" `
|
||||
-StorePasswordInClearText `
|
||||
-Name GitHubPackages `
|
||||
-UserName "${{ env.USERNAME }}" `
|
||||
-Password "${{ secrets.GITHUB_TOKEN }}"
|
||||
.$(${{ env.VCPKG_EXE }} fetch nuget) `
|
||||
setapikey "${{ secrets.GITHUB_TOKEN }}" `
|
||||
-Source "${{ env.FEED_URL }}"
|
||||
shell: pwsh
|
||||
|
||||
- name: Add NuGet sources
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
|
||||
sources add \
|
||||
-Source "${{ env.FEED_URL }}" \
|
||||
-StorePasswordInClearText \
|
||||
-Name GitHubPackages \
|
||||
-UserName "${{ env.USERNAME }}" \
|
||||
-Password "${{ secrets.GITHUB_TOKEN }}"
|
||||
mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
|
||||
setapikey "${{ secrets.GITHUB_TOKEN }}" \
|
||||
-Source "${{ env.FEED_URL }}"
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT ${{ matrix.build_type }} (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
mkdir build-${{ matrix.build_type }}
|
||||
cd build-${{ matrix.build_type }}
|
||||
cmake -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DBUILD_USE_VCPKG=ON \
|
||||
-DUSE_MMGR_TYPE=NATIVE \
|
||||
-DUSE_FREETYPE=ON \
|
||||
-DUSE_TK=OFF \
|
||||
-DBUILD_USE_PCH=ON \
|
||||
-DBUILD_INCLUDE_SYMLINK=ON \
|
||||
-DBUILD_LIBRARY_TYPE="Static" \
|
||||
-DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
|
||||
-DUSE_DRACO=ON \
|
||||
-DUSE_FFMPEG=ON \
|
||||
-DUSE_FREEIMAGE=ON \
|
||||
-DUSE_GLES2=OFF \
|
||||
-DUSE_VTK=ON \
|
||||
-DUSE_TBB=ON \
|
||||
-DUSE_RAPIDJSON=ON \
|
||||
-DUSE_OPENGL=ON \
|
||||
-DBUILD_MODULE_Draw=OFF \
|
||||
-DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build \
|
||||
${{ runner.os != 'macOS' && '-DUSE_OPENVR=ON' || '' }} ..
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT ${{ matrix.build_type }} (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
mkdir build-${{ matrix.build_type }}
|
||||
cd build-${{ matrix.build_type }}
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
|
||||
-DBUILD_USE_VCPKG=ON ^
|
||||
-DUSE_MMGR_TYPE=JEMALLOC ^
|
||||
-DUSE_FREETYPE=ON ^
|
||||
-DUSE_TK=OFF ^
|
||||
-DBUILD_USE_PCH=ON ^
|
||||
-DBUILD_INCLUDE_SYMLINK=ON ^
|
||||
-DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} ^
|
||||
-DUSE_DRACO=ON ^
|
||||
-DUSE_FFMPEG=OFF ^
|
||||
-DUSE_FREEIMAGE=ON ^
|
||||
-DUSE_GLES2=ON ^
|
||||
-DUSE_OPENVR=ON ^
|
||||
-DUSE_VTK=ON ^
|
||||
-DUSE_TBB=ON ^
|
||||
-DUSE_RAPIDJSON=ON ^
|
||||
-DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build ^
|
||||
-DUSE_OPENGL=ON ..
|
||||
shell: cmd
|
||||
|
||||
- name: Build OCCT ${{ matrix.build_type }} (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd build-${{ matrix.build_type }}
|
||||
cmake --build . --target install --config ${{ matrix.build_type }}
|
||||
shell: bash
|
||||
|
||||
- name: Build OCCT ${{ matrix.build_type }} (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd build-${{ matrix.build_type }}
|
||||
cmake --build . --target install --config ${{ matrix.build_type }}
|
||||
shell: cmd
|
97
.github/workflows/code-analysis.yml
vendored
97
.github/workflows/code-analysis.yml
vendored
@@ -1,97 +0,0 @@
|
||||
# This workflow performs code analysis using both CodeQL and Microsoft C++ Code Analysis.
|
||||
# It is triggered on pushes to the 'master' branch and publishes warnings into the security GitHub tab.
|
||||
# The workflow includes two jobs: one for CodeQL analysis on Ubuntu and another for MSVC Code Analysis on Windows.
|
||||
|
||||
name: Code Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
packages: read
|
||||
|
||||
env:
|
||||
# Path to the CMake build directory.
|
||||
build: '${{ github.workspace }}/build'
|
||||
config: 'Debug'
|
||||
|
||||
jobs:
|
||||
codeql-analyze:
|
||||
name: CodeQL Analyze (C/C++)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Step: Checkout the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
# Step: Install necessary dependencies for building the project
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev
|
||||
|
||||
# Step: Initialize CodeQL for scanning
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3.26.5
|
||||
with:
|
||||
languages: c-cpp
|
||||
build-mode: manual
|
||||
|
||||
# Step: Build the project using CMake and Make
|
||||
- name: Build project
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=gcc \
|
||||
-D CMAKE_CXX_COMPILER=g++ \
|
||||
-D USE_FREETYPE=OFF \
|
||||
-D CMAKE_BUILD_TYPE=Release ..
|
||||
make -j$(nproc)
|
||||
|
||||
# Step: Perform CodeQL Analysis
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3.26.5
|
||||
with:
|
||||
category: "/language:c-cpp"
|
||||
|
||||
msvc-analyze:
|
||||
name: Microsoft C++ Code Analysis
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
# Step: Checkout the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
# Step: Install necessary dependencies using Chocolatey
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
choco install magicsplat-tcl-tk -y
|
||||
|
||||
# Step: Configure the project using CMake
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} ..
|
||||
|
||||
# Step: Run MSVC Code Analysis
|
||||
- name: Run MSVC Code Analysis
|
||||
uses: microsoft/msvc-code-analysis-action@v0.1.1
|
||||
id: run-analysis
|
||||
with:
|
||||
cmakeBuildDirectory: ${{ env.build }}
|
||||
buildConfiguration: ${{ env.config }}
|
||||
ruleset: NativeRecommendedRules.ruleset
|
||||
|
||||
# Step: Upload SARIF file to GitHub Code Scanning Alerts
|
||||
- name: Upload SARIF to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v3.26.5
|
||||
with:
|
||||
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
|
81
.github/workflows/daily-ir-vcpkg-configure.yml
vendored
Normal file
81
.github/workflows/daily-ir-vcpkg-configure.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
# This workflow runs daily on the IR branch to configure OCCT with vcpkg packages.
|
||||
# It only performs configuration without building or installing, using vcpkg for dependency management.
|
||||
|
||||
name: Daily IR Branch vcpkg Configure
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run daily at 02:00 UTC
|
||||
- cron: '0 2 * * *'
|
||||
workflow_dispatch:
|
||||
# Allow manual triggering
|
||||
|
||||
jobs:
|
||||
configure-windows:
|
||||
name: Configure OCCT on Windows with MSVC
|
||||
runs-on: windows-2025
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: windows
|
||||
compiler: msvc
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on Windows with vcpkg packages"
|
||||
|
||||
configure-macos:
|
||||
name: Configure OCCT on macOS with Clang
|
||||
runs-on: macos-15
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: macos
|
||||
compiler: clang
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on macOS with vcpkg packages"
|
||||
|
||||
configure-linux:
|
||||
name: Configure OCCT on Ubuntu with Clang
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: linux
|
||||
compiler: clang
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on Linux with vcpkg packages"
|
297
.github/workflows/master-validation.yml
vendored
Normal file
297
.github/workflows/master-validation.yml
vendored
Normal file
@@ -0,0 +1,297 @@
|
||||
# Master validation workflow that combines multiple build configurations
|
||||
# This workflow is triggered only on pushes to the master branch of the main repository
|
||||
# It includes Windows (MSVC, MinGW), Ubuntu, vcpkg builds, and code analysis
|
||||
|
||||
name: Master Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# Windows MSVC/Clang builds
|
||||
windows-msvc:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: Windows MSVC/Clang validation
|
||||
runs-on: windows-2025
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "MSVC",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
generator: "Visual Studio 17 2022",
|
||||
toolset: "host=x64",
|
||||
c_flags: "/W4 /WX",
|
||||
cxx_flags: "/W4 /WX"
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
generator: "Ninja",
|
||||
toolset: "",
|
||||
c_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option -Wno-error=cast-function-type-mismatch",
|
||||
cxx_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option -Wno-error=cast-function-type-mismatch"
|
||||
}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Windows MSVC dependencies
|
||||
uses: ./.github/actions/setup-windows-msvc-deps
|
||||
|
||||
- name: Build basic configuration
|
||||
uses: ./.github/actions/cmake-build-basic
|
||||
with:
|
||||
generator: ${{ matrix.config.generator }}
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: "Release"
|
||||
thirdparty-dir: ${{ github.workspace }}/3rdparty-vc14-64
|
||||
compiler-flags: "${{ matrix.config.toolset != '' && format('-T {0}', matrix.config.toolset) || '' }} -D CMAKE_CXX_FLAGS=\"${{ matrix.config.cxx_flags }}\" -D CMAKE_C_FLAGS=\"${{ matrix.config.c_flags }}\""
|
||||
|
||||
- name: Build full shared configuration
|
||||
uses: ./.github/actions/cmake-build-full
|
||||
with:
|
||||
generator: ${{ matrix.config.generator }}
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: "Debug"
|
||||
library-type: "Shared"
|
||||
opt-profile: "Production"
|
||||
thirdparty-dir: ${{ github.workspace }}/3rdparty-vc14-64
|
||||
compiler-flags: "${{ matrix.config.toolset != '' && format('-T {0}', matrix.config.toolset) || '' }} -D CMAKE_CXX_FLAGS=\"${{ matrix.config.cxx_flags }}\" -D CMAKE_C_FLAGS=\"${{ matrix.config.c_flags }}\" -D USE_FFMPEG=ON"
|
||||
use-vtk: ${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }}
|
||||
use-tbb: "ON"
|
||||
|
||||
# Windows MinGW builds
|
||||
windows-mingw:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: Windows MinGW validation
|
||||
runs-on: windows-2025
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "GCC",
|
||||
cc: "x86_64-w64-mingw32-gcc",
|
||||
cxx: "x86_64-w64-mingw32-g++",
|
||||
package: "mingw-w64-x86_64-toolchain",
|
||||
msystem: "MINGW64",
|
||||
compiler_flags: "",
|
||||
dependencies: "mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-rapidjson mingw-w64-x86_64-freetype mingw-w64-x86_64-draco mingw-w64-x86_64-freeimage mingw-w64-x86_64-tbb mingw-w64-x86_64-tk mingw-w64-x86_64-tcl mingw-w64-x86_64-openvr mingw-w64-x86_64-jemalloc mingw-w64-x86_64-mesa mingw-w64-x86_64-angleproject mingw-w64-x86_64-llvm-openmp mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
package: "mingw-w64-clang-x86_64-toolchain",
|
||||
msystem: "CLANG64",
|
||||
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Wall -Wextra\"",
|
||||
dependencies: "mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-rapidjson mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-draco mingw-w64-clang-x86_64-freeimage mingw-w64-clang-x86_64-tbb mingw-w64-clang-x86_64-tk mingw-w64-clang-x86_64-tcl mingw-w64-clang-x86_64-openvr mingw-w64-clang-x86_64-jemalloc mingw-w64-clang-x86_64-mesa mingw-w64-clang-x86_64-angleproject mingw-w64-clang-x86_64-llvm-openmp mingw-w64-clang-x86_64-winpthreads-git mingw-w64-clang-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
|
||||
}
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: ./.github/actions/setup-msys2
|
||||
with:
|
||||
msystem: ${{ matrix.config.msystem }}
|
||||
packages: ${{ matrix.config.package }}
|
||||
dependencies: ${{ matrix.config.dependencies }}
|
||||
|
||||
- name: Build basic configuration
|
||||
uses: ./.github/actions/cmake-build-basic
|
||||
with:
|
||||
generator: "Ninja"
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: ${{ matrix.build_type }}
|
||||
shell-type: "msys2"
|
||||
compiler-flags: ${{ matrix.config.compiler_flags }}
|
||||
|
||||
- name: Build full shared configuration
|
||||
uses: ./.github/actions/cmake-build-full
|
||||
with:
|
||||
generator: "Ninja"
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: ${{ matrix.build_type }}
|
||||
library-type: "Shared"
|
||||
opt-profile: "Production"
|
||||
shell-type: "msys2"
|
||||
compiler-flags: ${{ matrix.config.compiler_flags }}
|
||||
use-vtk: "OFF"
|
||||
use-tbb: "OFF"
|
||||
|
||||
# Ubuntu builds
|
||||
ubuntu:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: Ubuntu validation
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "GCC",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
compiler_flags: ""
|
||||
}
|
||||
- {
|
||||
name: "Clang",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Werror -Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Werror -Wall -Wextra\""
|
||||
}
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Ubuntu dependencies
|
||||
uses: ./.github/actions/setup-ubuntu-deps
|
||||
|
||||
- name: Build basic configuration
|
||||
uses: ./.github/actions/cmake-build-basic
|
||||
with:
|
||||
generator: "Ninja"
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: ${{ matrix.build_type }}
|
||||
compiler-flags: ${{ matrix.config.compiler_flags }}
|
||||
|
||||
- name: Build full shared configuration
|
||||
uses: ./.github/actions/cmake-build-full
|
||||
with:
|
||||
generator: "Ninja"
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
build-type: ${{ matrix.build_type }}
|
||||
library-type: "Shared"
|
||||
opt-profile: "Production"
|
||||
compiler-flags: ${{ matrix.config.compiler_flags }}
|
||||
rapidjson-dir: ${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53
|
||||
use-vtk: "ON"
|
||||
use-tbb: "ON"
|
||||
|
||||
# vcpkg builds
|
||||
vcpkg:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: vcpkg validation
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04, ubuntu-22.04, windows-2022, windows-2025, macos-15, macos-14]
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Build OCCT with vcpkg
|
||||
uses: ./.github/actions/build-occt
|
||||
with:
|
||||
platform: ${{ runner.os == 'Windows' && 'windows' || runner.os == 'macOS' && 'macos' || 'linux' }}
|
||||
compiler: ${{ runner.os == 'Windows' && 'msvc' || 'clang' }}
|
||||
artifact-name: occt-${{ matrix.os }}-${{ matrix.build_type }}
|
||||
cmake-build-type: ${{ matrix.build_type }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Code analysis
|
||||
codeql-analyze:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: CodeQL Analyze (C/C++)
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3.26.5
|
||||
with:
|
||||
languages: c-cpp
|
||||
build-mode: manual
|
||||
|
||||
- name: Build project for analysis
|
||||
uses: ./.github/actions/cmake-build-basic
|
||||
with:
|
||||
generator: "Unix Makefiles"
|
||||
cc: "gcc"
|
||||
cxx: "g++"
|
||||
build-type: "Release"
|
||||
compiler-flags: "-D USE_FREETYPE=OFF"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3.26.5
|
||||
with:
|
||||
category: "/language:c-cpp"
|
||||
|
||||
msvc-analyze:
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
name: Microsoft C++ Code Analysis
|
||||
runs-on: windows-2025
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
packages: read
|
||||
|
||||
env:
|
||||
build: '${{ github.workspace }}/build'
|
||||
config: 'Debug'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Configure OCCT for analysis
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: 'windows'
|
||||
compiler: 'msvc'
|
||||
build-use-pch: 'false'
|
||||
cmake-build-type: ${{ env.config }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run MSVC Code Analysis
|
||||
uses: microsoft/msvc-code-analysis-action@v0.1.1
|
||||
id: run-analysis
|
||||
with:
|
||||
cmakeBuildDirectory: ${{ env.build }}
|
||||
buildConfiguration: ${{ env.config }}
|
||||
ruleset: NativeRecommendedRules.ruleset
|
||||
|
||||
- name: Upload SARIF to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v3.26.5
|
||||
with:
|
||||
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
|
15
.gitignore
vendored
15
.gitignore
vendored
@@ -56,3 +56,18 @@ win64
|
||||
/build*
|
||||
/install*
|
||||
/tools/build*
|
||||
|
||||
# Coding agents instructions (keep .github/copilot-instructions.md)
|
||||
/.CLAUDE.md
|
||||
/.AGENT.md
|
||||
/.GEMINI.md
|
||||
/.COPILOT.md
|
||||
/.CURSOR.md
|
||||
/.CODEIUM.md
|
||||
/.TABNINE.md
|
||||
/.CHATGPT.md
|
||||
/.BARD.md
|
||||
/.PERPLEXITY.md
|
||||
/.CONTINUE.md
|
||||
/.AIDER.md
|
||||
/.WINDSURF.md
|
||||
|
376
CMakeLists.txt
376
CMakeLists.txt
@@ -1,5 +1,8 @@
|
||||
cmake_minimum_required (VERSION 3.10 FATAL_ERROR)
|
||||
|
||||
# Define OCCT root directory as a cache variable - works for both standalone and subproject builds
|
||||
set(OCCT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Root directory of OCCT project" FORCE)
|
||||
|
||||
if (NOT DEFINED BUILD_USE_VCPKG)
|
||||
set (BUILD_USE_VCPKG OFF CACHE BOOL "Use vcpkg for 3rdparty libraries.")
|
||||
if (CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg.cmake")
|
||||
@@ -31,7 +34,7 @@ if (BUILD_USE_VCPKG)
|
||||
message(FATAL_ERROR "VCPKG_ROOT is not defined. Please set it to the path of vcpkg root directory.")
|
||||
endif()
|
||||
|
||||
set (VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}/adm/vcpkg")
|
||||
set (VCPKG_MANIFEST_DIR "${OCCT_ROOT_DIR}/adm/vcpkg/ports/opencascade")
|
||||
|
||||
# Disable default features for vcpkg manifest
|
||||
set (VCPKG_MANIFEST_NO_DEFAULT_FEATURES 1)
|
||||
@@ -58,7 +61,7 @@ else()
|
||||
PROJECT (OCCT)
|
||||
endif()
|
||||
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
|
||||
set (CMAKE_MODULE_PATH "${OCCT_ROOT_DIR}/adm/cmake")
|
||||
|
||||
set (CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -86,7 +89,7 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# include cmake file
|
||||
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
||||
include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
include (${OCCT_ROOT_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
endmacro()
|
||||
|
||||
# set using memory manager option for TKernel
|
||||
@@ -260,7 +263,30 @@ if (NOT INSTALL_DIR_LAYOUT)
|
||||
else()
|
||||
set (INSTALL_DIR_LAYOUT "Unix" CACHE STRING "${INSTALL_DIR_LAYOUT_DESCR}" FORCE)
|
||||
endif()
|
||||
SET_PROPERTY(CACHE INSTALL_DIR_LAYOUT PROPERTY STRINGS Windows Unix)
|
||||
SET_PROPERTY(CACHE INSTALL_DIR_LAYOUT PROPERTY STRINGS Windows Unix Vcpkg)
|
||||
endif()
|
||||
|
||||
# Define layout boolean variables for optimization
|
||||
set(LAYOUT_IS_WINDOWS FALSE)
|
||||
set(LAYOUT_IS_UNIX FALSE)
|
||||
set(LAYOUT_IS_VCPKG FALSE)
|
||||
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Windows")
|
||||
set(LAYOUT_IS_WINDOWS TRUE)
|
||||
elseif ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
set(LAYOUT_IS_UNIX TRUE)
|
||||
elseif ("${INSTALL_DIR_LAYOUT}" STREQUAL "Vcpkg")
|
||||
set(LAYOUT_IS_VCPKG TRUE)
|
||||
endif()
|
||||
|
||||
# set project name for install directories (only used for vcpkg layout)
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
if (NOT DEFINED OCCT_PROJECT_NAME)
|
||||
set (OCCT_PROJECT_NAME "opencascade" CACHE STRING "${OCCT_PROJECT_NAME_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
# unset the variable if it was previously set for vcpkg but layout changed
|
||||
OCCT_CHECK_AND_UNSET (OCCT_PROJECT_NAME)
|
||||
endif()
|
||||
|
||||
# check INSTALL_DIR_LAYOUT changes and update INSTALL_DIR_* paths if necessary
|
||||
@@ -271,6 +297,16 @@ elseif (NOT "${INSTALL_DIR_LAYOUT_PREV}" STREQUAL "${INSTALL_DIR_LAYOUT}")
|
||||
# The structure of install folder should be reset due to changed layout
|
||||
OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS ()
|
||||
|
||||
# Manage OCCT_PROJECT_NAME based on layout
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
if (NOT DEFINED OCCT_PROJECT_NAME)
|
||||
set (OCCT_PROJECT_NAME "opencascade" CACHE STRING "${OCCT_PROJECT_NAME_DESCR}")
|
||||
endif()
|
||||
else()
|
||||
# unset OCCT_PROJECT_NAME if layout changed from vcpkg to something else
|
||||
OCCT_CHECK_AND_UNSET (OCCT_PROJECT_NAME)
|
||||
endif()
|
||||
|
||||
# Unset INSTALL_DIR_WITH_VERSION on windows
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Windows")
|
||||
OCCT_CHECK_AND_UNSET (INSTALL_DIR_WITH_VERSION)
|
||||
@@ -306,7 +342,7 @@ elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if (NOT DEFINED INSTALL_DIR_WITH_VERSION_PREV)
|
||||
set (INSTALL_DIR_WITH_VERSION_PREV "${INSTALL_DIR_WITH_VERSION}" CACHE INTERNAL "" FORCE)
|
||||
elseif (NOT "${INSTALL_DIR_WITH_VERSION_PREV}" STREQUAL "${INSTALL_DIR_WITH_VERSION}")
|
||||
@@ -321,10 +357,12 @@ endif()
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
set (BIN_LETTER "")
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
set (BIN_LETTER "d")
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set (BIN_LETTER "i")
|
||||
if (NOT LAYOUT_IS_VCPKG)
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
set (BIN_LETTER "d")
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set (BIN_LETTER "i")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# the list of being built toolkits
|
||||
@@ -463,12 +501,33 @@ else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
# Set 3RDPARTY_DIR based on layout
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
# For vcpkg layout, set 3RDPARTY_DIR to vcpkg installed directory for path replacement
|
||||
if (BUILD_USE_VCPKG AND VCPKG_INSTALLED_DIR AND VCPKG_TARGET_TRIPLET)
|
||||
set (3RDPARTY_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
else()
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
endif()
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
# For non-vcpkg layouts, 3RDPARTY_DIR should be user-defined or empty
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
# If using vcpkg with Windows layout, set to vcpkg installed directory for proper path replacement
|
||||
if (BUILD_USE_VCPKG AND VCPKG_INSTALLED_DIR AND VCPKG_TARGET_TRIPLET)
|
||||
set (3RDPARTY_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
|
||||
else()
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
endif()
|
||||
else()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# search for CSF variable in EXTERNLIB of each being used toolkit
|
||||
@@ -683,7 +742,12 @@ if (CAN_USE_RAPIDJSON AND USE_RAPIDJSON)
|
||||
elseif (NOT CAN_USE_RAPIDJSON)
|
||||
OCCT_CHECK_AND_UNSET ("USE_RAPIDJSON")
|
||||
OCCT_UNSET_VCPKG_FEATURE ("rapidjson")
|
||||
else()
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKDEGLTF)
|
||||
list (REMOVE_ITEM BUILD_TOOLKITS TKXSDRAWGLTF)
|
||||
message(STATUS "Info: TKDEGLTF and TKXSDRAWGLTF toolkits excluded due to RapidJSON usage is disabled")
|
||||
endif()
|
||||
|
||||
if (NOT CAN_USE_RAPIDJSON OR BUILD_USE_VCPKG)
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_RAPIDJSON")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON")
|
||||
@@ -759,6 +823,17 @@ else()
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC")
|
||||
endif()
|
||||
|
||||
# GTest
|
||||
if (BUILD_GTEST)
|
||||
OCCT_ADD_VCPKG_FEATURE ("gtest")
|
||||
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/gtest")
|
||||
else()
|
||||
OCCT_UNSET_VCPKG_FEATURE ("gtest")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GTEST")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("GTest")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
|
||||
endif()
|
||||
|
||||
# qt for samples
|
||||
if (BUILD_SAMPLES_QT)
|
||||
# check qt 3rdparty path
|
||||
@@ -778,8 +853,10 @@ if (BUILD_USE_VCPKG)
|
||||
project (OCCT)
|
||||
endif()
|
||||
|
||||
# copying clang-format file to the root of the project
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/.clang-format DESTINATION ${CMAKE_SOURCE_DIR})
|
||||
if (APPLE)
|
||||
# set Apple specific variables
|
||||
occt_set_apple_csf_vars()
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
@@ -788,7 +865,7 @@ OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
# do not define INSTALL_DIR_BIN for win.
|
||||
# Leave library structure for win: <prefix>/win64/vc10/bin(d)
|
||||
if (NOT DEFINED INSTALL_DIR_BIN)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_BIN "bin" CACHE PATH "${INSTALL_DIR_BIN_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_BIN "${OS_WITH_BIT}/${COMPILER}/bin" CACHE PATH "${INSTALL_DIR_BIN_DESCR}")
|
||||
@@ -797,8 +874,11 @@ endif()
|
||||
|
||||
# define folder containing all shell/batch scripts
|
||||
if (NOT DEFINED INSTALL_DIR_SCRIPT)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_SCRIPT "${INSTALL_DIR_BIN}" CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
# For vcpkg, scripts should follow same debug/release pattern as binaries
|
||||
set (INSTALL_DIR_SCRIPT "$<IF:$<CONFIG:Debug>,debug/bin,bin>" CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_SCRIPT "." CACHE PATH "${INSTALL_DIR_SCRIPT_DESCR}")
|
||||
endif()
|
||||
@@ -806,7 +886,7 @@ endif()
|
||||
|
||||
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||
if (NOT DEFINED INSTALL_DIR_LIB)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_LIB "lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_LIB "${OS_WITH_BIT}/${COMPILER}/lib" CACHE PATH "${INSTALL_DIR_LIB_DESCR}")
|
||||
@@ -816,11 +896,13 @@ endif()
|
||||
# OCCT headers: <prefix>/inc for windows,
|
||||
# <prefix>/include/opencascade-7.0.0 for unix
|
||||
if (NOT DEFINED INSTALL_DIR_INCLUDE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_INCLUDE "include/opencascade" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_INCLUDE "include/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_INCLUDE "include" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_INCLUDE "inc" CACHE PATH "${INSTALL_DIR_INCLUDE_DESCR}")
|
||||
endif()
|
||||
@@ -829,11 +911,13 @@ endif()
|
||||
# OCCT resources: <prefix>/src for windows,
|
||||
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||
if (NOT DEFINED INSTALL_DIR_RESOURCE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_RESOURCE "share/opencascade/resources" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_RESOURCE "share/opencascade-${OCC_VERSION_STRING_EXT}/resources" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_RESOURCE "share/${OCCT_PROJECT_NAME}" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_RESOURCE "src" CACHE PATH "${INSTALL_DIR_RESOURCE_DESCR}")
|
||||
endif()
|
||||
@@ -841,11 +925,13 @@ endif()
|
||||
|
||||
# OCCT data
|
||||
if (NOT DEFINED INSTALL_DIR_DATA)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_DATA "share/opencascade/data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_DATA "share/opencascade-${OCC_VERSION_STRING_EXT}/data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_DATA "share/${OCCT_PROJECT_NAME}" CACHE PATH "${INSTALL_DIR_DATA_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_DATA "data" CACHE PATH "${INSTALL_DIR_DATA_DESCR}")
|
||||
endif()
|
||||
@@ -853,11 +939,13 @@ endif()
|
||||
|
||||
# OCCT samples
|
||||
if (NOT DEFINED INSTALL_DIR_SAMPLES)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_SAMPLES "share/opencascade/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_SAMPLES "share/opencascade-${OCC_VERSION_STRING_EXT}/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_SAMPLES "share/${OCCT_PROJECT_NAME}/samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_SAMPLES "samples" CACHE PATH "${INSTALL_DIR_SAMPLES_DESCR}")
|
||||
endif()
|
||||
@@ -865,11 +953,13 @@ endif()
|
||||
|
||||
# OCCT tests
|
||||
if (NOT DEFINED INSTALL_DIR_TESTS)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_TESTS "share/opencascade/tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_TESTS "share/opencascade-${OCC_VERSION_STRING_EXT}/tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_TESTS "share/${OCCT_PROJECT_NAME}/tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_TESTS "tests" CACHE PATH "${INSTALL_DIR_TESTS_DESCR}")
|
||||
endif()
|
||||
@@ -877,11 +967,13 @@ endif()
|
||||
|
||||
# OCCT doc
|
||||
if (NOT DEFINED INSTALL_DIR_DOC)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
set (INSTALL_DIR_DOC "share/doc/opencascade" CACHE PATH "${INSTALL_DIR_DOC_DESCR}")
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_DOC "share/doc/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_DOC_DESCR}" FORCE)
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_DOC "share/${OCCT_PROJECT_NAME}/doc" CACHE PATH "${INSTALL_DIR_DOC_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_DOC "doc" CACHE PATH "${INSTALL_DIR_DOC_DESCR}")
|
||||
endif()
|
||||
@@ -889,12 +981,14 @@ endif()
|
||||
|
||||
# define folder containing CMake configuration files
|
||||
if (NOT DEFINED INSTALL_DIR_CMAKE)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if (INSTALL_DIR_WITH_VERSION)
|
||||
set (INSTALL_DIR_CMAKE "lib/cmake/opencascade-${OCC_VERSION_STRING_EXT}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_CMAKE "lib/cmake/opencascade" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
endif()
|
||||
elseif (LAYOUT_IS_VCPKG)
|
||||
set (INSTALL_DIR_CMAKE "share/${OCCT_PROJECT_NAME}" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
else()
|
||||
set (INSTALL_DIR_CMAKE "cmake" CACHE PATH "${INSTALL_DIR_CMAKE_DESCR}")
|
||||
endif()
|
||||
@@ -904,7 +998,7 @@ endif()
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_resources")
|
||||
|
||||
# install LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt files
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
if (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR_DOC}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR_DOC}")
|
||||
else()
|
||||
@@ -982,34 +1076,63 @@ endif()
|
||||
|
||||
# build directories
|
||||
if (SINGLE_GENERATOR)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
endif()
|
||||
else()
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BIN_LETTER}")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BIN_LETTER}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin")
|
||||
endif()
|
||||
else()
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE} ...")
|
||||
|
||||
# collect all the headers to <binary dir>/inc folder
|
||||
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "src" "${INSTALL_DIR_INCLUDE}")
|
||||
@@ -1056,7 +1179,6 @@ if (INSTALL_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/java" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/ocafsamples" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt" "${INSTALL_DIR_SAMPLES}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code" "${INSTALL_DIR_SAMPLES}/OCCTOverview")
|
||||
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/FuncDemo" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.samples.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SAMPLES}/qt/IESample" RENAME "env.${SCRIPT_EXT}")
|
||||
@@ -1074,13 +1196,14 @@ if (${DRAWEXE_INDEX} GREATER -1)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data/" "${INSTALL_DIR_DATA}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR_SAMPLES}")
|
||||
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||
install (FILES "${OCCT_ROOT_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# copy draw script to CMake binary folder
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_COMPILER_BITNESS()
|
||||
set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
|
||||
if (WIN32)
|
||||
@@ -1119,8 +1242,103 @@ endforeach()
|
||||
|
||||
# write current custom.bat/sh (for install directory)
|
||||
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
||||
|
||||
# Set custom bin/lib paths variable for template
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
# For vcpkg layout, paths need to handle debug/release structure
|
||||
# Debug builds: scripts in debug/bin, need to go ../../ to reach root
|
||||
# Release builds: scripts in bin, need to go ../ to reach root
|
||||
if (WIN32)
|
||||
set (OCCT_CUSTOM_BIN_LIB_PATHS "set \"CSF_OCCTBinPath=%CASROOT%\\bin\"
|
||||
set \"CSF_OCCTLibPath=%CASROOT%\\lib\"
|
||||
if exist \"%SCRIPTROOT%\\..\\..\\include\" (
|
||||
set \"CASCONTENTROOT=%SCRIPTROOT%\\..\\..\"
|
||||
) else (
|
||||
set \"CASCONTENTROOT=%SCRIPTROOT%\\..\"
|
||||
)
|
||||
set \"CSF_OCCTIncludePath=%CASCONTENTROOT%\\include\"
|
||||
set \"CSF_OCCTResourcePath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
||||
set \"CSF_OCCTDataPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\"
|
||||
set \"CSF_OCCTSamplesPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\samples\"
|
||||
set \"CSF_OCCTTestsPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\tests\"
|
||||
set \"CSF_OCCTDocPath=%CASCONTENTROOT%\\share\\${OCCT_PROJECT_NAME}\\doc\"")
|
||||
else()
|
||||
set (OCCT_CUSTOM_BIN_LIB_PATHS "export CSF_OCCTBinPath=\"\${CASROOT}/bin\"
|
||||
export CSF_OCCTLibPath=\"\${CASROOT}/lib\"
|
||||
if [ -d \"\${aScriptPath}/../../include\" ]; then
|
||||
export CASCONTENTROOT=\$(cd \"\${aScriptPath}/../..\" && pwd)
|
||||
else
|
||||
export CASCONTENTROOT=\$(cd \"\${aScriptPath}/..\" && pwd)
|
||||
fi
|
||||
export CSF_OCCTIncludePath=\"\${CASCONTENTROOT}/include\"
|
||||
export CSF_OCCTResourcePath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
||||
export CSF_OCCTDataPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}\"
|
||||
export CSF_OCCTSamplesPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/samples\"
|
||||
export CSF_OCCTTestsPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/tests\"
|
||||
export CSF_OCCTDocPath=\"\${CASCONTENTROOT}/share/${OCCT_PROJECT_NAME}/doc\"")
|
||||
endif()
|
||||
|
||||
# For vcpkg, we handle all paths in the bin/lib paths logic above
|
||||
set (OCCT_CUSTOM_ADDITIONAL_PATHS "")
|
||||
else()
|
||||
# For other layouts, use CASROOT with full paths including build-specific suffixes
|
||||
if (WIN32)
|
||||
set (OCCT_CUSTOM_BIN_LIB_PATHS "set \"CSF_OCCTBinPath=%CASROOT%/${INSTALL_DIR_BIN}%3\"
|
||||
set \"CSF_OCCTLibPath=%CASROOT%/${INSTALL_DIR_LIB}%3\"")
|
||||
set (OCCT_CUSTOM_ADDITIONAL_PATHS "set \"CSF_OCCTIncludePath=%CASROOT%/${INSTALL_DIR_INCLUDE}\"
|
||||
set \"CSF_OCCTResourcePath=%CASROOT%/${INSTALL_DIR_RESOURCE}\"
|
||||
set \"CSF_OCCTDataPath=%CASROOT%/${INSTALL_DIR_DATA}\"
|
||||
set \"CSF_OCCTSamplesPath=%CASROOT%/${INSTALL_DIR_SAMPLES}\"
|
||||
set \"CSF_OCCTTestsPath=%CASROOT%/${INSTALL_DIR_TESTS}\"
|
||||
set \"CSF_OCCTDocPath=%CASROOT%/${INSTALL_DIR_DOC}\"")
|
||||
else()
|
||||
set (OCCT_CUSTOM_BIN_LIB_PATHS "export CSF_OCCTBinPath=\"\${CASROOT}/${INSTALL_DIR_BIN}\"
|
||||
export CSF_OCCTLibPath=\"\${CASROOT}/${INSTALL_DIR_LIB}\"")
|
||||
set (OCCT_CUSTOM_ADDITIONAL_PATHS "export CSF_OCCTIncludePath=\"\${CASROOT}/${INSTALL_DIR_INCLUDE}\"
|
||||
export CSF_OCCTResourcePath=\"\${CASROOT}/${INSTALL_DIR_RESOURCE}\"
|
||||
export CSF_OCCTDataPath=\"\${CASROOT}/${INSTALL_DIR_DATA}\"
|
||||
export CSF_OCCTSamplesPath=\"\${CASROOT}/${INSTALL_DIR_SAMPLES}\"
|
||||
export CSF_OCCTTestsPath=\"\${CASROOT}/${INSTALL_DIR_TESTS}\"
|
||||
export CSF_OCCTDocPath=\"\${CASROOT}/${INSTALL_DIR_DOC}\"")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR_SCRIPT}")
|
||||
|
||||
# Set build directory paths for custom.build script
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
# For vcpkg, use simple bin/lib paths
|
||||
if (WIN32)
|
||||
set (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS "set \"CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"
|
||||
set \"CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@\"
|
||||
if [\"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"] == [\"\"] (
|
||||
set \"CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/bin\"
|
||||
set \"CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/lib\"
|
||||
)")
|
||||
else()
|
||||
set (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS "export CSF_OCCTBinPath=\"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"
|
||||
export CSF_OCCTLibPath=\"@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@\"")
|
||||
endif()
|
||||
else()
|
||||
# For other layouts, use traditional paths with suffixes
|
||||
if (WIN32)
|
||||
set (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS "set \"CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"
|
||||
set \"CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@\"
|
||||
if [\"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"] == [\"\"] (
|
||||
set \"CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/bin%3\"
|
||||
set \"CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/lib%3\"
|
||||
)")
|
||||
else()
|
||||
set (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS "export CSF_OCCTBinPath=\"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\"
|
||||
export CSF_OCCTLibPath=\"@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@\"")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Expand OCCT_CUSTOM_BUILD_BIN_LIB_PATHS variable to resolve nested @...@ variables
|
||||
if (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS)
|
||||
string(CONFIGURE "${OCCT_CUSTOM_BUILD_BIN_LIB_PATHS}" OCCT_CUSTOM_BUILD_BIN_LIB_PATHS @ONLY)
|
||||
endif()
|
||||
|
||||
# write current custom.bat/sh (for build directory)
|
||||
OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
|
||||
|
||||
@@ -1130,6 +1348,16 @@ if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
# Set custom script path variable for Windows template
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
# For vcpkg, scripts are in same directory - use existing SCRIPTROOT variable
|
||||
set (OCCT_CUSTOM_SCRIPT_PATH "custom.${SCRIPT_EXT}")
|
||||
set (OCCT_CUSTOM_SCRIPT_PREFIX "%SCRIPTROOT%/")
|
||||
else()
|
||||
# For other layouts, use CASROOT with full path
|
||||
set (OCCT_CUSTOM_SCRIPT_PATH "custom.${SCRIPT_EXT}")
|
||||
set (OCCT_CUSTOM_SCRIPT_PREFIX "%CASROOT%/")
|
||||
endif()
|
||||
# env script for draw in building environment
|
||||
OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
# install env script
|
||||
@@ -1140,6 +1368,20 @@ if (WIN32)
|
||||
else()
|
||||
set (SUB_ENV_NAME "env.${SCRIPT_EXT}")
|
||||
set (SUB_ENV_BUILD_NAME "env.install.${SCRIPT_EXT}")
|
||||
# Set custom script path variable for template
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
# For vcpkg, scripts are in same directory - use existing path variables
|
||||
set (OCCT_CUSTOM_SCRIPT_PATH "custom.${SCRIPT_EXT}")
|
||||
if (WIN32)
|
||||
set (OCCT_CUSTOM_SCRIPT_PREFIX "%SCRIPTROOT%/")
|
||||
else()
|
||||
set (OCCT_CUSTOM_SCRIPT_PREFIX "\${aScriptPath}/")
|
||||
endif()
|
||||
else()
|
||||
# For other layouts, use CASROOT with full path
|
||||
set (OCCT_CUSTOM_SCRIPT_PATH "${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
|
||||
set (OCCT_CUSTOM_SCRIPT_PREFIX "\${CASROOT}/")
|
||||
endif()
|
||||
# install env script
|
||||
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/env.install.${SCRIPT_EXT}.in" "${SUB_ENV_BUILD_NAME}" "${SUB_ENV_NAME}" "${INSTALL_DIR_SCRIPT}")
|
||||
# env script for draw in building environment
|
||||
@@ -1171,13 +1413,13 @@ if (BUILD_SAMPLES_QT)
|
||||
endforeach()
|
||||
|
||||
## Copy sources of OCCTOverview for using in the sample
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/DataExchangeSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/OcafSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/GeometrySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/TopologySamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/TriangulationSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/Viewer2dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/qt/OCCTOverview/code/Viewer3dSamples.cxx" "${INSTALL_DIR_SAMPLES}/OCCTOverview/code")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1193,7 +1435,6 @@ endforeach()
|
||||
|
||||
# Setup Google Test integration if enabled
|
||||
if (BUILD_GTEST)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gtest")
|
||||
enable_testing()
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_gtest")
|
||||
@@ -1207,11 +1448,6 @@ if (BUILD_GTEST)
|
||||
|
||||
# Set environment variables for all tests
|
||||
OCCT_SET_GTEST_ENVIRONMENT()
|
||||
else()
|
||||
# Disable GTest integration if not enabled
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GTEST")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("GTest")
|
||||
OCCT_CHECK_AND_UNSET ("INSTALL_GTEST")
|
||||
endif()
|
||||
|
||||
if (BUILD_DOC_Overview OR BUILD_DOC_RefMan)
|
||||
@@ -1244,7 +1480,7 @@ endif()
|
||||
message (STATUS "Info: \(${CURRENT_TIME}\) OCCT toolkits processed")
|
||||
# samples do not support patch usage
|
||||
if (BUILD_SAMPLES_MFC OR BUILD_SAMPLES_QT)
|
||||
set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
set (OCCT_ROOT ${OCCT_ROOT_DIR})
|
||||
endif()
|
||||
|
||||
if (BUILD_SAMPLES_MFC)
|
||||
@@ -1262,6 +1498,18 @@ endif()
|
||||
|
||||
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
|
||||
|
||||
# Load sample configuration files
|
||||
foreach (OCCT_SAMPLE ${OCCT_SAMPLES})
|
||||
foreach (BUILD_SAMPLE_TOOLKIT ${${OCCT_SAMPLE}_SAMPLES_TOOLKITS})
|
||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/PACKAGES)
|
||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/EXTERNLIB)
|
||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${BUILD_SAMPLE_TOOLKIT}/FILES)
|
||||
foreach (PACKAGE ${OCCT_${BUILD_SAMPLE_TOOLKIT}_LIST_OF_PACKAGES})
|
||||
OCCT_INCLUDE_CMAKE_FILE (samples/${OCCT_SAMPLE}/${PACKAGE}/FILES)
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if (BUILD_SAMPLES_QT)
|
||||
if (BUILD_SAMPLES_QT)
|
||||
if (NOT Qt5_FOUND OR "${Qt5Gui_EGL_INCLUDE_DIRS}" STREQUAL "" OR NOT WIN32)
|
||||
@@ -1334,7 +1582,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
|
||||
endforeach()
|
||||
set (SET_OpenCASCADE_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
||||
set (SET_OpenCASCADE_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY)
|
||||
configure_file("${OCCT_ROOT_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY)
|
||||
endforeach()
|
||||
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
|
||||
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
||||
@@ -1378,7 +1626,7 @@ if (APPLE)
|
||||
endif()
|
||||
|
||||
# Configure and install cmake config file
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
configure_file("${OCCT_ROOT_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Configure cmake version file
|
||||
|
@@ -38,11 +38,7 @@ endmacro()
|
||||
# vcpkg processing
|
||||
if (BUILD_USE_VCPKG)
|
||||
find_package (draco CONFIG REQUIRED)
|
||||
|
||||
set (3RDPARTY_DRACO_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}")
|
||||
SEARCH_DRACO_LIB()
|
||||
|
||||
list (APPEND 3RDPARTY_INCLUDE_DIRS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/draco")
|
||||
set(CSF_Draco draco::draco)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@@ -33,11 +33,11 @@ if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/Fl
|
||||
endif()
|
||||
|
||||
# remove old general version of FlexLexer
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h)
|
||||
message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h")
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h)
|
||||
if (EXISTS ${OCCT_ROOT_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h)
|
||||
message (STATUS "Info: remove old FLEX header file: ${OCCT_ROOT_DIR}/src/FlexLexer/FlexLexer.h")
|
||||
file(REMOVE ${OCCT_ROOT_DIR}/src/FlexLexer/FlexLexer.h)
|
||||
endif()
|
||||
# install copy of FlexLexer.h locally to allow further building without flex
|
||||
if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${OCCT_ROOT_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
|
@@ -113,37 +113,8 @@ if (WIN32)
|
||||
set (CSF_OpenGlLibs "opengl32.lib")
|
||||
set (CSF_OpenGlesLibs "libEGL libGLESv2")
|
||||
else()
|
||||
|
||||
if (APPLE)
|
||||
set (CSF_objc "objc")
|
||||
|
||||
# frameworks
|
||||
if (IOS)
|
||||
find_library (Appkit_LIB NAMES UIKit)
|
||||
set (CSF_Appkit ${Appkit_LIB})
|
||||
else()
|
||||
find_library (Appkit_LIB NAMES AppKit)
|
||||
set (CSF_Appkit ${Appkit_LIB})
|
||||
endif()
|
||||
OCCT_CHECK_AND_UNSET (Appkit_LIB)
|
||||
|
||||
find_library (IOKit_LIB NAMES IOKit)
|
||||
set (CSF_IOKit ${IOKit_LIB})
|
||||
OCCT_CHECK_AND_UNSET (IOKit_LIB)
|
||||
|
||||
if (IOS)
|
||||
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
|
||||
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB})
|
||||
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
|
||||
elseif (USE_XLIB)
|
||||
set (CSF_OpenGlLibs "GL")
|
||||
set (CSF_XwLibs "X11")
|
||||
else()
|
||||
find_library (OpenGlLibs_LIB NAMES OpenGL)
|
||||
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
|
||||
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
|
||||
endif()
|
||||
|
||||
# Will be called later
|
||||
elseif (EMSCRIPTEN)
|
||||
set (CSF_ThreadLibs "pthread rt stdc++")
|
||||
set (CSF_OpenGlesLibs "EGL GLESv2")
|
||||
@@ -163,7 +134,59 @@ else()
|
||||
set (CSF_OpenGlesLibs "EGL GLESv2")
|
||||
set (CSF_dl "dl")
|
||||
if (USE_FREETYPE)
|
||||
set (CSF_fontconfig "fontconfig")
|
||||
set (CSF_fontconfig "fontconfig expat")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Updates APPLE variables
|
||||
function(occt_set_apple_csf_vars)
|
||||
set (CSF_objc "objc" PARENT_SCOPE)
|
||||
|
||||
# frameworks
|
||||
if (IOS)
|
||||
find_library (Appkit_LIB NAMES UIKit)
|
||||
if (Appkit_LIB)
|
||||
set (CSF_Appkit ${Appkit_LIB} PARENT_SCOPE)
|
||||
else()
|
||||
set (CSF_Appkit "UIKit" PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
find_library (Appkit_LIB NAMES AppKit)
|
||||
if (Appkit_LIB)
|
||||
set (CSF_Appkit ${Appkit_LIB} PARENT_SCOPE)
|
||||
else()
|
||||
set (CSF_Appkit "AppKit" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
OCCT_CHECK_AND_UNSET (Appkit_LIB)
|
||||
|
||||
find_library (IOKit_LIB NAMES IOKit)
|
||||
if (IOKit_LIB)
|
||||
set (CSF_IOKit ${IOKit_LIB} PARENT_SCOPE)
|
||||
else()
|
||||
set (CSF_IOKit "IOKit" PARENT_SCOPE)
|
||||
endif()
|
||||
OCCT_CHECK_AND_UNSET (IOKit_LIB)
|
||||
|
||||
if (IOS)
|
||||
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
|
||||
if (OpenGlesLibs_LIB)
|
||||
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB} PARENT_SCOPE)
|
||||
else()
|
||||
set (CSF_OpenGlesLibs "OpenGLES" PARENT_SCOPE)
|
||||
endif()
|
||||
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
|
||||
elseif (USE_XLIB)
|
||||
set (CSF_OpenGlLibs "GL" PARENT_SCOPE)
|
||||
set (CSF_XwLibs "X11" PARENT_SCOPE)
|
||||
else()
|
||||
find_library (OpenGlLibs_LIB NAMES OpenGL)
|
||||
if (OpenGlLibs_LIB)
|
||||
set (CSF_OpenGlLibs ${OpenGlLibs_LIB} PARENT_SCOPE)
|
||||
else()
|
||||
set (CSF_OpenGlLibs "OpenGL" PARENT_SCOPE)
|
||||
endif()
|
||||
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
|
||||
endif()
|
||||
endfunction()
|
||||
|
@@ -258,7 +258,7 @@ endfunction()
|
||||
# Function to load file lists for documentation
|
||||
function(OCCT_DOC_LOAD_FILE_LISTS)
|
||||
# Load list of HTML documentation files
|
||||
set(FILES_HTML_PATH "${CMAKE_SOURCE_DIR}/dox/FILES_HTML.txt")
|
||||
set(FILES_HTML_PATH "${OCCT_ROOT_DIR}/dox/FILES_HTML.txt")
|
||||
if(EXISTS ${FILES_HTML_PATH})
|
||||
file(STRINGS ${FILES_HTML_PATH} HTML_FILES REGEX "^[^#]+")
|
||||
set(OCCT_DOC_HTML_FILES ${HTML_FILES} PARENT_SCOPE)
|
||||
@@ -267,7 +267,7 @@ function(OCCT_DOC_LOAD_FILE_LISTS)
|
||||
endif()
|
||||
|
||||
# Load list of PDF documentation files
|
||||
set(FILES_PDF_PATH "${CMAKE_SOURCE_DIR}/dox/FILES_PDF.txt")
|
||||
set(FILES_PDF_PATH "${OCCT_ROOT_DIR}/dox/FILES_PDF.txt")
|
||||
if(EXISTS ${FILES_PDF_PATH})
|
||||
file(STRINGS ${FILES_PDF_PATH} PDF_FILES REGEX "^[^#]+")
|
||||
set(OCCT_DOC_PDF_FILES ${PDF_FILES} PARENT_SCOPE)
|
||||
@@ -317,9 +317,9 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
|
||||
# Use existing Doxygen template file as base
|
||||
if(DOC_TYPE STREQUAL "OVERVIEW")
|
||||
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_DIR}/dox/resources/occt_ug_html.doxyfile")
|
||||
set(TEMPLATE_DOXYFILE "${OCCT_ROOT_DIR}/dox/resources/occt_ug_html.doxyfile")
|
||||
else()
|
||||
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_DIR}/dox/resources/occt_rm.doxyfile")
|
||||
set(TEMPLATE_DOXYFILE "${OCCT_ROOT_DIR}/dox/resources/occt_rm.doxyfile")
|
||||
endif()
|
||||
|
||||
# Define Doxygen parameters that need to be overridden from the template
|
||||
@@ -355,7 +355,7 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
# Additional parameters based on the document type
|
||||
if(DOC_TYPE STREQUAL "OVERVIEW")
|
||||
# Settings for Overview documentation
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${OCCT_ROOT_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_ALL = NO\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PRIVATE = NO\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_STATIC = NO\n")
|
||||
@@ -374,27 +374,27 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
if(DEFINED OCCT_OVERVIEW_FILES)
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${OCCT_OVERVIEW_FILES}\n")
|
||||
else()
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_DIR}/dox\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${OCCT_ROOT_DIR}/dox\n")
|
||||
endif()
|
||||
|
||||
# Collect image directories for overview
|
||||
set(OVERVIEW_INPUT_DIRS ${CMAKE_SOURCE_DIR}/dox)
|
||||
set(OVERVIEW_INPUT_DIRS ${OCCT_ROOT_DIR}/dox)
|
||||
OCCT_DOC_COLLECT_IMAGE_DIRS("${OVERVIEW_INPUT_DIRS}" OVERVIEW_IMAGE_DIRS)
|
||||
|
||||
# Image path for overview
|
||||
if(OVERVIEW_IMAGE_DIRS)
|
||||
string(REPLACE ";" " " OVERVIEW_IMAGE_DIRS_STR "${OVERVIEW_IMAGE_DIRS}")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OVERVIEW_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OVERVIEW_IMAGE_DIRS_STR} ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
else()
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
endif()
|
||||
|
||||
# Example paths
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/samples\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${OCCT_ROOT_DIR}/src ${OCCT_ROOT_DIR}/samples\n")
|
||||
else()
|
||||
# Settings for Reference Manual
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_NAME = \"Open CASCADE Technology Reference Manual\"\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${OCCT_ROOT_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "BUILTIN_STL_SUPPORT = YES\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PRIVATE = NO\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXTRACT_PACKAGE = YES\n")
|
||||
@@ -407,14 +407,14 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
|
||||
# Input files for reference manual - CRITICAL FOR PROPER GENERATION
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "\n# Input files for reference manual\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_DIR}/src\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${OCCT_ROOT_DIR}/src\n")
|
||||
|
||||
# If generating documentation for specific modules
|
||||
if(DEFINED OCCT_DOC_MODULES)
|
||||
set(MODULE_PATHS "")
|
||||
foreach(MODULE ${OCCT_DOC_MODULES})
|
||||
foreach(TOOLKIT ${${MODULE}_TOOLKITS})
|
||||
list(APPEND MODULE_PATHS "${CMAKE_SOURCE_DIR}/src/${TOOLKIT}")
|
||||
list(APPEND MODULE_PATHS "${OCCT_ROOT_DIR}/src/${TOOLKIT}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
string(REPLACE ";" " " MODULE_PATHS_STR "${MODULE_PATHS}")
|
||||
@@ -422,14 +422,14 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
endif()
|
||||
|
||||
# Configure image path for reference manual
|
||||
set(REFMAN_INPUT_DIRS ${CMAKE_SOURCE_DIR}/src)
|
||||
set(REFMAN_INPUT_DIRS ${OCCT_ROOT_DIR}/src)
|
||||
OCCT_DOC_COLLECT_IMAGE_DIRS("${REFMAN_INPUT_DIRS}" REFMAN_IMAGE_DIRS)
|
||||
|
||||
if(REFMAN_IMAGE_DIRS)
|
||||
string(REPLACE ";" " " REFMAN_IMAGE_DIRS_STR "${REFMAN_IMAGE_DIRS}")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${REFMAN_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${REFMAN_IMAGE_DIRS_STR} ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
else()
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
endif()
|
||||
|
||||
# Add main page file if generated
|
||||
@@ -444,8 +444,8 @@ function(OCCT_DOC_CONFIGURE_DOXYGEN OUTPUT_DIR CONFIG_FILE DOC_TYPE)
|
||||
endif()
|
||||
|
||||
# Custom CSS
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/dox/resources/custom.css")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "HTML_EXTRA_STYLESHEET = ${CMAKE_SOURCE_DIR}/dox/resources/custom.css\n")
|
||||
if(EXISTS "${OCCT_ROOT_DIR}/dox/resources/custom.css")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "HTML_EXTRA_STYLESHEET = ${OCCT_ROOT_DIR}/dox/resources/custom.css\n")
|
||||
endif()
|
||||
|
||||
# Set paths for dot tool
|
||||
@@ -600,7 +600,7 @@ function(OCCT_SETUP_DOC_TARGETS)
|
||||
file(MAKE_DIRECTORY "${REFMAN_OUTPUT_DIR}/html")
|
||||
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/dox/resources/index.html" DESTINATION "${REFMAN_OUTPUT_DIR}")
|
||||
file(COPY "${OCCT_ROOT_DIR}/dox/resources/index.html" DESTINATION "${REFMAN_OUTPUT_DIR}")
|
||||
|
||||
# Generate main page for reference manual
|
||||
OCCT_DOC_GENERATE_MAIN_PAGE(${REFMAN_OUTPUT_DIR} "main_page.dox")
|
||||
@@ -613,7 +613,7 @@ function(OCCT_SETUP_DOC_TARGETS)
|
||||
add_custom_target(RefMan
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${REFMAN_OUTPUT_DIR}/Doxyfile
|
||||
COMMENT "Generating Reference Manual with Doxygen"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${OCCT_ROOT_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -640,12 +640,12 @@ function(OCCT_SETUP_DOC_TARGETS)
|
||||
add_custom_target(Overview
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${OVERVIEW_OUTPUT_DIR}/Doxyfile
|
||||
COMMENT "Generating Overview documentation with Doxygen"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${OCCT_ROOT_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/dox/resources/index.html" DESTINATION "${OVERVIEW_OUTPUT_DIR}")
|
||||
file(COPY "${OCCT_ROOT_DIR}/dox/resources/index.html" DESTINATION "${OVERVIEW_OUTPUT_DIR}")
|
||||
|
||||
# Add custom command to copy generated documentation to install location if required
|
||||
if(INSTALL_DOC_Overview)
|
||||
@@ -655,7 +655,7 @@ function(OCCT_SETUP_DOC_TARGETS)
|
||||
|
||||
# Create overview.html only for windows
|
||||
if(WIN32)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/dox/resources/overview.html"
|
||||
install(FILES "${OCCT_ROOT_DIR}/dox/resources/overview.html"
|
||||
DESTINATION "${INSTALL_DIR_DOC}")
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -135,29 +135,29 @@ function(OCCT_SET_GTEST_ENVIRONMENT)
|
||||
set(TEST_ENVIRONMENT
|
||||
"CSF_LANGUAGE=us"
|
||||
"MMGT_CLEAR=1"
|
||||
"CSF_SHMessage=${CMAKE_SOURCE_DIR}/resources/SHMessage"
|
||||
"CSF_MDTVTexturesDirectory=${CMAKE_SOURCE_DIR}/resources/Textures"
|
||||
"CSF_ShadersDirectory=${CMAKE_SOURCE_DIR}/resources/Shaders"
|
||||
"CSF_XSMessage=${CMAKE_SOURCE_DIR}/resources/XSMessage"
|
||||
"CSF_TObjMessage=${CMAKE_SOURCE_DIR}/resources/TObj"
|
||||
"CSF_StandardDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
|
||||
"CSF_PluginDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
|
||||
"CSF_XCAFDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
|
||||
"CSF_TObjDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
|
||||
"CSF_StandardLiteDefaults=${CMAKE_SOURCE_DIR}/resources/StdResource"
|
||||
"CSF_IGESDefaults=${CMAKE_SOURCE_DIR}/resources/XSTEPResource"
|
||||
"CSF_STEPDefaults=${CMAKE_SOURCE_DIR}/resources/XSTEPResource"
|
||||
"CSF_XmlOcafResource=${CMAKE_SOURCE_DIR}/resources/XmlOcafResource"
|
||||
"CSF_MIGRATION_TYPES=${CMAKE_SOURCE_DIR}/resources/StdResource/MigrationSheet.txt"
|
||||
"CSF_OCCTResourcePath=${CMAKE_SOURCE_DIR}/resources"
|
||||
"CSF_OCCTDataPath=${CMAKE_SOURCE_DIR}/data"
|
||||
"CSF_OCCTDocPath=${CMAKE_SOURCE_DIR}/doc"
|
||||
"CSF_OCCTSamplesPath=${CMAKE_SOURCE_DIR}/samples"
|
||||
"CSF_OCCTTestsPath=${CMAKE_SOURCE_DIR}/tests"
|
||||
"CSF_SHMessage=${OCCT_ROOT_DIR}/resources/SHMessage"
|
||||
"CSF_MDTVTexturesDirectory=${OCCT_ROOT_DIR}/resources/Textures"
|
||||
"CSF_ShadersDirectory=${OCCT_ROOT_DIR}/resources/Shaders"
|
||||
"CSF_XSMessage=${OCCT_ROOT_DIR}/resources/XSMessage"
|
||||
"CSF_TObjMessage=${OCCT_ROOT_DIR}/resources/TObj"
|
||||
"CSF_StandardDefaults=${OCCT_ROOT_DIR}/resources/StdResource"
|
||||
"CSF_PluginDefaults=${OCCT_ROOT_DIR}/resources/StdResource"
|
||||
"CSF_XCAFDefaults=${OCCT_ROOT_DIR}/resources/StdResource"
|
||||
"CSF_TObjDefaults=${OCCT_ROOT_DIR}/resources/StdResource"
|
||||
"CSF_StandardLiteDefaults=${OCCT_ROOT_DIR}/resources/StdResource"
|
||||
"CSF_IGESDefaults=${OCCT_ROOT_DIR}/resources/XSTEPResource"
|
||||
"CSF_STEPDefaults=${OCCT_ROOT_DIR}/resources/XSTEPResource"
|
||||
"CSF_XmlOcafResource=${OCCT_ROOT_DIR}/resources/XmlOcafResource"
|
||||
"CSF_MIGRATION_TYPES=${OCCT_ROOT_DIR}/resources/StdResource/MigrationSheet.txt"
|
||||
"CSF_OCCTResourcePath=${OCCT_ROOT_DIR}/resources"
|
||||
"CSF_OCCTDataPath=${OCCT_ROOT_DIR}/data"
|
||||
"CSF_OCCTDocPath=${OCCT_ROOT_DIR}/doc"
|
||||
"CSF_OCCTSamplesPath=${OCCT_ROOT_DIR}/samples"
|
||||
"CSF_OCCTTestsPath=${OCCT_ROOT_DIR}/tests"
|
||||
"CSF_OCCTBinPath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
||||
"CSF_OCCTLibPath=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
||||
"CSF_OCCTIncludePath=${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}"
|
||||
"CASROOT=${CMAKE_SOURCE_DIR}"
|
||||
"CASROOT=${OCCT_ROOT_DIR}"
|
||||
)
|
||||
|
||||
# Build PATH environment variable
|
||||
@@ -215,12 +215,12 @@ function(OCCT_SET_GTEST_ENVIRONMENT)
|
||||
endif()
|
||||
|
||||
# Add DrawResources related environment if it exists
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/resources/DrawResources")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWHOME=${CMAKE_SOURCE_DIR}/resources/DrawResources")
|
||||
list(APPEND TEST_ENVIRONMENT "CSF_DrawPluginDefaults=${CMAKE_SOURCE_DIR}/resources/DrawResources")
|
||||
if(EXISTS "${OCCT_ROOT_DIR}/resources/DrawResources")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWHOME=${OCCT_ROOT_DIR}/resources/DrawResources")
|
||||
list(APPEND TEST_ENVIRONMENT "CSF_DrawPluginDefaults=${OCCT_ROOT_DIR}/resources/DrawResources")
|
||||
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWDEFAULT=${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
|
||||
if(EXISTS "${OCCT_ROOT_DIR}/resources/DrawResources/DrawDefault")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWDEFAULT=${OCCT_ROOT_DIR}/resources/DrawResources/DrawDefault")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
if(OCCT_MACROS_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(OCCT_MACROS_ALREADY_INCLUDED 1)
|
||||
|
||||
set(OCCT_MACROS_ALREADY_INCLUDED 1)
|
||||
|
||||
macro (OCCT_CHECK_AND_UNSET VARNAME)
|
||||
if (DEFINED ${VARNAME})
|
||||
@@ -34,16 +34,16 @@ endmacro()
|
||||
|
||||
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
|
||||
set (LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
endif()
|
||||
|
||||
set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(FIND_FOLDER_OR_FILE FILE_OR_FOLDER_NAME RESULT_PATH)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}")
|
||||
set (${RESULT_PATH} "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${FILE_OR_FOLDER_NAME}")
|
||||
set (${RESULT_PATH} "${OCCT_ROOT_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
|
||||
else()
|
||||
set (${RESULT_PATH} "" PARENT_SCOPE)
|
||||
endif()
|
||||
@@ -156,7 +156,7 @@ function (FIND_SUBDIRECTORY ROOT_DIRECTORY DIRECTORY_SUFFIX SUBDIRECTORY_NAME)
|
||||
endfunction()
|
||||
|
||||
function (OCCT_ORIGIN_AND_PATCHED_FILES RELATIVE_PATH SEARCH_TEMPLATE RESULT)
|
||||
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
file (GLOB ORIGIN_FILES "${OCCT_ROOT_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
set (${RESULT} ${ORIGIN_FILES} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
@@ -213,15 +213,15 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
|
||||
endfunction()
|
||||
|
||||
macro (OCCT_INSTALL_FILE_OR_DIR BEING_INSTALLED_OBJECT DESTINATION_PATH)
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
if (IS_DIRECTORY "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
install (DIRECTORY "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (FILES "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME DESTINATION_PATH)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
configure_file("${OCCT_ROOT_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
install(FILES "${OCCT_BINARY_DIR}/${BUILD_NAME}" DESTINATION "${DESTINATION_PATH}" RENAME ${INSTALL_NAME})
|
||||
endmacro()
|
||||
|
||||
@@ -343,8 +343,8 @@ endfunction()
|
||||
|
||||
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
|
||||
set (LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
endif()
|
||||
|
||||
set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE)
|
||||
@@ -354,7 +354,7 @@ function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCC
|
||||
set (OCCT_USED_PACKAGES)
|
||||
|
||||
# consider patched header.in template
|
||||
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${OCCT_ROOT_DIR}/adm/templates/header.in")
|
||||
|
||||
set (OCCT_HEADER_FILES_COMPLETE)
|
||||
foreach(OCCT_TOOLKIT ${THE_OCCT_BUILD_TOOLKITS})
|
||||
@@ -439,18 +439,18 @@ endfunction()
|
||||
|
||||
macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH)
|
||||
# first of all, copy original files
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}")
|
||||
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${BEING_COPIED_OBJECT}")
|
||||
file (COPY "${OCCT_ROOT_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
configure_file("${OCCT_ROOT_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_ADD_SUBDIRECTORY BEING_ADDED_DIRECTORY)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${OCCT_ROOT_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
else()
|
||||
message (STATUS "${BEING_ADDED_DIRECTORY} directory is not included")
|
||||
endif()
|
||||
@@ -518,7 +518,7 @@ macro(OCCT_GET_GIT_HASH)
|
||||
if(GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${OCCT_ROOT_DIR}
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
ERROR_VARIABLE GIT_ERROR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -527,7 +527,7 @@ macro(OCCT_GET_GIT_HASH)
|
||||
# Check if working directory is clean
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} status --porcelain
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${OCCT_ROOT_DIR}
|
||||
OUTPUT_VARIABLE GIT_STATUS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
@@ -630,7 +630,7 @@ macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR)
|
||||
continue()
|
||||
endif()
|
||||
# Note: files are generated in original source directory (not in patch!)
|
||||
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
|
||||
set (FLEX_BISON_TARGET_DIR "${OCCT_ROOT_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
|
||||
# choose appropriate extension for generated files: "cxx" if source file contains
|
||||
# instruction to generate C++ code, "c" otherwise
|
||||
set (BISON_OUTPUT_FILE_EXT "c")
|
||||
@@ -664,7 +664,7 @@ macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR)
|
||||
file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE})
|
||||
endif()
|
||||
BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}"
|
||||
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
||||
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${OCCT_ROOT_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
||||
FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}"
|
||||
COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L")
|
||||
ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME})
|
||||
@@ -696,13 +696,17 @@ macro (OCCT_UPDATE_TARGET_FILE)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_INSERT_CODE_FOR_TARGET)
|
||||
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"i\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"d\")
|
||||
endif()")
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
install(CODE "set (OCCT_INSTALL_BIN_LETTER \"\")")
|
||||
else()
|
||||
install(CODE "if (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"i\")
|
||||
elseif (\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
|
||||
set (OCCT_INSTALL_BIN_LETTER \"d\")
|
||||
endif()")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
|
||||
|
@@ -3,8 +3,8 @@
|
||||
macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
|
||||
set (RESOURCE_FILES)
|
||||
set (isResDirectory FALSE)
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/resources/${CurrentResource}")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/resources/${CurrentResource}/FILES" RESOURCE_FILES)
|
||||
if (IS_DIRECTORY "${OCCT_ROOT_DIR}/resources/${CurrentResource}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/resources/${CurrentResource}/FILES" RESOURCE_FILES)
|
||||
set (CurrentResource_Directory "${CurrentResource}")
|
||||
set (isResDirectory TRUE)
|
||||
else()
|
||||
@@ -27,11 +27,11 @@ macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
|
||||
string (REPLACE "." "_" CurrentResource_FileName "${CurrentResource_FileName}")
|
||||
set (HEADER_FILE_NAME "${CurrentResource_Directory}_${CurrentResource_FileName}.pxx")
|
||||
|
||||
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}")
|
||||
message(STATUS "Info. Generating header file from resource file: ${OCCT_ROOT_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}")
|
||||
# generate content for header file
|
||||
set (OCCT_HEADER_FILE_CONTENT "// This file has been automatically generated from resource file resources/${CurrentResource_Directory}/${RESOURCE_FILE}\n\n")
|
||||
# read resource file
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
|
||||
set (OCCT_HEADER_FILE_CONTENT "${OCCT_HEADER_FILE_CONTENT}static const char ${CurrentResource_Directory}_${CurrentResource_FileName}[] =")
|
||||
foreach (line IN LISTS RESOURCE_FILE_LINES_LIST)
|
||||
string (REPLACE "\"" "\\\"" line "${line}")
|
||||
@@ -43,7 +43,7 @@ macro (OCCT_GENERATE_CONTENT_ONLY CurrentResource)
|
||||
if (EXISTS "${HEADER_FILE}")
|
||||
file (REMOVE "${HEADER_FILE}")
|
||||
endif()
|
||||
configure_file ("${CMAKE_SOURCE_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
|
||||
configure_file ("${OCCT_ROOT_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
@@ -96,7 +96,7 @@ string (REGEX REPLACE ";" " " PRECOMPILED_DEFS "${PRECOMPILED_DEFS}")
|
||||
set (USED_RCFILE "")
|
||||
if (MSVC)
|
||||
set (USED_RCFILE "${CMAKE_BINARY_DIR}/resources/${PROJECT_NAME}.rc")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
configure_file("${OCCT_ROOT_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
@@ -120,8 +120,13 @@ endif (USE_QT)
|
||||
if (EXECUTABLE_PROJECT)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "$<IF:$<CONFIG:Debug>,debug/${INSTALL_DIR_BIN},${INSTALL_DIR_BIN}>")
|
||||
else()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
endif()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.wasm DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}")
|
||||
@@ -151,12 +156,21 @@ else()
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
|
||||
if (LAYOUT_IS_VCPKG)
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "$<IF:$<CONFIG:Debug>,debug/${INSTALL_DIR_BIN},${INSTALL_DIR_BIN}>"
|
||||
ARCHIVE DESTINATION "$<IF:$<CONFIG:Debug>,debug/${INSTALL_DIR_LIB},${INSTALL_DIR_LIB}>"
|
||||
LIBRARY DESTINATION "$<IF:$<CONFIG:Debug>,debug/${INSTALL_DIR_LIB},${INSTALL_DIR_LIB}>"
|
||||
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
|
||||
else()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
EXPORT OpenCASCADE${CURRENT_MODULE}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}"
|
||||
INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE})
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
|
@@ -1,18 +0,0 @@
|
||||
if ("${TARGET_FOLDER}" STREQUAL "")
|
||||
set (EXECUTABLE_PROJECT ON)
|
||||
set (USE_QT ON)
|
||||
|
||||
set (RELATIVE_DIR "samples/qt")
|
||||
set (MODULES_LIST ${OCCT_SAMPLES})
|
||||
set (TARGET_FOLDER "Samples")
|
||||
set (TOOLKITS_NAME_SUFFIX "SAMPLES_TOOLKITS")
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
|
||||
else()
|
||||
unset (USE_QT)
|
||||
unset (RELATIVE_DIR)
|
||||
unset (EXECUTABLE_PROJECT)
|
||||
unset (MODULES_LIST)
|
||||
unset (TARGET_FOLDER)
|
||||
unset (TOOLKITS_NAME_SUFFIX)
|
||||
endif("${TARGET_FOLDER}" STREQUAL "")
|
@@ -79,8 +79,24 @@ macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
|
||||
endmacro()
|
||||
|
||||
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" TS_FILES REGEX ".+[.]ts")
|
||||
file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" QRC_FILES REGEX ".+[.]qrc")
|
||||
# Package name is now the sample name (e.g., "Tutorial")
|
||||
set(PACKAGE_NAME ${OCCT_PACKAGE})
|
||||
|
||||
# Get files from CMAKE variables with proper location
|
||||
set(ALL_FILES ${OCCT_${PACKAGE_NAME}_FILES})
|
||||
set(FILES_LOCATION ${OCCT_${PACKAGE_NAME}_FILES_LOCATION})
|
||||
|
||||
# Filter for .ts and .qrc files with full paths
|
||||
set(TS_FILES)
|
||||
set(QRC_FILES)
|
||||
foreach(FILE ${ALL_FILES})
|
||||
if(FILE MATCHES ".+[.]ts$")
|
||||
list(APPEND TS_FILES "${FILES_LOCATION}/${FILE}")
|
||||
endif()
|
||||
if(FILE MATCHES ".+[.]qrc$")
|
||||
list(APPEND QRC_FILES "${FILES_LOCATION}/${FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string (FIND "${OCCT_PACKAGE}" "/" _index)
|
||||
if (_index GREATER -1)
|
||||
@@ -92,19 +108,17 @@ macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
|
||||
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (QRC_FILE ${QRC_FILES})
|
||||
set (QRC_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${QRC_FILE}")
|
||||
if (EXISTS ${QRC_FILE_RELATIVE})
|
||||
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE_RELATIVE} RCC_FILES)
|
||||
if (EXISTS ${QRC_FILE})
|
||||
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE} RCC_FILES)
|
||||
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (TS_FILE ${TS_FILES})
|
||||
set (TS_FILE_RELATIVE "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${TS_FILE}")
|
||||
FIND_AND_WRAP_TS_FILE(${TS_FILE_RELATIVE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
if (EXISTS ${TS_FILE_RELATIVE})
|
||||
list (APPEND ${RESOURCE_FILES} "${TS_FILE_RELATIVE}")
|
||||
FIND_AND_WRAP_TS_FILE(${TS_FILE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
if (EXISTS ${TS_FILE})
|
||||
list (APPEND ${RESOURCE_FILES} "${TS_FILE}")
|
||||
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
@@ -17,6 +17,7 @@ endif()
|
||||
if (BUILD_USE_VCPKG)
|
||||
set (3RDPARTY_TCL_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" CACHE PATH "The directory containing tcl" FORCE)
|
||||
set (3RDPARTY_TCL_INCLUDE_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" CACHE FILEPATH "The directory containing headers of tcl" FORCE)
|
||||
set (3RDPARTY_TCL_LIBRARY_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" CACHE FILEPATH "The directory containing tcl library" FORCE)
|
||||
endif()
|
||||
|
||||
# tcl library file (with absolute path)
|
||||
@@ -182,7 +183,7 @@ endif()
|
||||
|
||||
if (3RDPARTY_TCL_LIBRARY AND EXISTS "${3RDPARTY_TCL_LIBRARY}")
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_TCL_LIBRARY_DIR}")
|
||||
else()
|
||||
elseif(NOT BUILD_USE_VCPKG)
|
||||
list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_TCL_LIBRARY_DIR)
|
||||
endif()
|
||||
|
||||
|
@@ -1,5 +1,9 @@
|
||||
# variable description
|
||||
|
||||
set (OCCT_PROJECT_NAME_DESCR
|
||||
"Project name used in install directory paths for Unix and vcpkg layouts.
|
||||
Allows customization of directory structure for different package names.")
|
||||
|
||||
set (BUILD_LIBRARY_TYPE_DESCR
|
||||
"Specifies the type of library to be created. 'Shared' libraries
|
||||
are linked dynamically and loaded at runtime. 'Static' libraries
|
||||
@@ -56,7 +60,7 @@ set (INSTALL_DIR_WITH_VERSION_DESCR
|
||||
|
||||
set (INSTALL_DIR_LAYOUT_DESCR
|
||||
"Defines structure of OCCT files (binaries, resources, headers etc.) for the install directory.
|
||||
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
|
||||
Three variants are predefined: for Windows (standard OCCT layout), for Unix operating systems (standard Linux layout), and for vcpkg (standard vcpkg layout without 'd' and 'i' suffixes).
|
||||
If needed, layout can be customized with INSTALL_DIR_* variables.")
|
||||
|
||||
set (INSTALL_DIR_BIN_DESCR
|
||||
|
@@ -1,41 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@OCCT_ROOT_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
|
||||
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@OCCT_ROOT_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>@CMAKE_BINARY_DIR@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@OCCT_ROOT_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
|
||||
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
|
||||
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
|
||||
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
|
||||
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
|
||||
CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc
|
||||
DRAWHOME=@OCCT_ROOT_DIR@/resources/DrawResources
|
||||
CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources
|
||||
CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data
|
||||
CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples
|
||||
CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests
|
||||
CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
|
@@ -17,11 +17,12 @@ set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@")
|
||||
set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@")
|
||||
|
||||
# Compute the installation prefix from this OpenCASCADEConfig.cmake file
|
||||
# location, by going up one level + one level if "cmake" + one level if "lib".
|
||||
# location, by going up one level + one level if "cmake" + one level if "lib" + one level if "share".
|
||||
# This is made to support different locations of CMake files:
|
||||
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
|
||||
# - in UNIX style: $INSTALL_DIR/lib/cmake/@OCCT_PROJECT_NAME@-<version>
|
||||
# - in Windows style: $INSTALL_DIR/cmake
|
||||
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
|
||||
# - in vcpkg style: $INSTALL_DIR/share/@OCCT_PROJECT_NAME@
|
||||
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/@OCCT_PROJECT_NAME@-<version>
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
|
||||
@@ -30,6 +31,9 @@ endif()
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib(32|64)?$")
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
endif()
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/share$")
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
endif()
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
|
@@ -25,23 +25,16 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
|
||||
rem CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
|
||||
rem multiple and single configuration builds
|
||||
set "CSF_OCCTBinPath=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
if ["@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"] == [""] (
|
||||
set "CSF_OCCTBinPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/bin%3"
|
||||
)
|
||||
set "CSF_OCCTLibPath=@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
if ["@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"] == [""] (
|
||||
set "CSF_OCCTLibPath=@CMAKE_BINARY_DIR@/win%ARCH%/%VCVER%/lib%3"
|
||||
)
|
||||
@OCCT_CUSTOM_BUILD_BIN_LIB_PATHS@
|
||||
|
||||
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/inc"
|
||||
set "CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources"
|
||||
set "CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data"
|
||||
set "CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples"
|
||||
set "CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests"
|
||||
set "CSF_OCCTDocPath=@CMAKE_SOURCE_DIR@/doc"
|
||||
set "CSF_OCCTIncludePath=@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
set "CSF_OCCTResourcePath=@OCCT_ROOT_DIR@/resources"
|
||||
set "CSF_OCCTDataPath=@OCCT_ROOT_DIR@/data"
|
||||
set "CSF_OCCTSamplesPath=@OCCT_ROOT_DIR@/samples"
|
||||
set "CSF_OCCTTestsPath=@OCCT_ROOT_DIR@/tests"
|
||||
set "CSF_OCCTDocPath=@OCCT_ROOT_DIR@/doc"
|
||||
|
||||
rem for compatibility with external application using CASROOT
|
||||
set "CASROOT=@CMAKE_SOURCE_DIR@"
|
||||
set "CASROOT=@OCCT_ROOT_DIR@"
|
||||
)
|
||||
)
|
||||
|
@@ -14,24 +14,25 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
|
||||
export JEMALLOC_DIR="@3RDPARTY_JEMALLOC_LIBRARY_DIR@"
|
||||
|
||||
if [ "x@3RDPARTY_QT_DIR" != "x" ]; then
|
||||
if [ "x@3RDPARTY_QT_DIR@" != "x" ]; then
|
||||
export QTDIR="@3RDPARTY_QT_DIR@"
|
||||
fi
|
||||
|
||||
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
# CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
|
||||
# multiple and single configuration builds
|
||||
@OCCT_CUSTOM_BUILD_BIN_LIB_PATHS@
|
||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/resources"
|
||||
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
|
||||
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
|
||||
export CSF_OCCTTestsPath="@CMAKE_SOURCE_DIR@/tests"
|
||||
export CSF_OCCTDocPath="@CMAKE_SOURCE_DIR@/doc"
|
||||
export CSF_OCCTResourcePath="@OCCT_ROOT_DIR@/resources"
|
||||
export CSF_OCCTDataPath="@OCCT_ROOT_DIR@/data"
|
||||
export CSF_OCCTSamplesPath="@OCCT_ROOT_DIR@/samples"
|
||||
export CSF_OCCTTestsPath="@OCCT_ROOT_DIR@/tests"
|
||||
export CSF_OCCTDocPath="@OCCT_ROOT_DIR@/doc"
|
||||
|
||||
# for compatibility with external application using CASROOT
|
||||
export CASROOT="@CMAKE_SOURCE_DIR@"
|
||||
export CASROOT="@OCCT_ROOT_DIR@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -25,15 +25,9 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
set "TCL_VERSION_WITH_DOT=@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
set "TK_VERSION_WITH_DOT=@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
set "CSF_OCCTBinPath=%CASROOT%/@INSTALL_DIR_BIN@%3"
|
||||
set "CSF_OCCTLibPath=%CASROOT%/@INSTALL_DIR_LIB@%3"
|
||||
@OCCT_CUSTOM_BIN_LIB_PATHS@
|
||||
|
||||
set "CSF_OCCTIncludePath=%CASROOT%/@INSTALL_DIR_INCLUDE@"
|
||||
set "CSF_OCCTResourcePath=%CASROOT%/@INSTALL_DIR_RESOURCE@"
|
||||
set "CSF_OCCTDataPath=%CASROOT%/@INSTALL_DIR_DATA@"
|
||||
set "CSF_OCCTSamplesPath=%CASROOT%/@INSTALL_DIR_SAMPLES@"
|
||||
set "CSF_OCCTTestsPath=%CASROOT%/@INSTALL_DIR_TESTS@"
|
||||
set "CSF_OCCTDocPath=%CASROOT%/@INSTALL_DIR_DOC@"
|
||||
@OCCT_CUSTOM_ADDITIONAL_PATHS@
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -21,14 +21,10 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
|
||||
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
|
||||
|
||||
export CSF_OCCTBinPath="${CASROOT}/@INSTALL_DIR_BIN@"
|
||||
export CSF_OCCTLibPath="${CASROOT}/@INSTALL_DIR_LIB@"
|
||||
export CSF_OCCTIncludePath="${CASROOT}/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="${CASROOT}/@INSTALL_DIR_RESOURCE@"
|
||||
export CSF_OCCTDataPath="${CASROOT}/@INSTALL_DIR_DATA@"
|
||||
export CSF_OCCTSamplesPath="${CASROOT}/@INSTALL_DIR_SAMPLES@"
|
||||
export CSF_OCCTTestsPath="${CASROOT}/@INSTALL_DIR_TESTS@"
|
||||
export CSF_OCCTDocPath="${CASROOT}/@INSTALL_DIR_DOC@"
|
||||
# Set paths based on layout
|
||||
@OCCT_CUSTOM_BIN_LIB_PATHS@
|
||||
|
||||
@OCCT_CUSTOM_ADDITIONAL_PATHS@
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -141,8 +141,8 @@ if /I ["%1"] == ["vc141"] set "VCVER=vc14"
|
||||
if /I ["%1"] == ["vc142"] set "VCVER=vc14"
|
||||
if /I ["%1"] == ["vc143"] set "VCVER=vc14"
|
||||
|
||||
if exist "%CASROOT%\custom.bat" (
|
||||
call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB%
|
||||
if exist "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" (
|
||||
call "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" %VCVER% %ARCH% %CASDEB%
|
||||
)
|
||||
|
||||
if not ["%QTDIR%"] == [""] (
|
||||
|
@@ -34,7 +34,7 @@ shopt -u nocasematch
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ] && [ "$anArch" != "aarch64"]; then
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ] && [ "$anArch" != "aarch64" ] && [ "$anArch" != "arm64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
@@ -43,14 +43,13 @@ fi
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
|
||||
source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
|
||||
if [ -e "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" ]; then
|
||||
source "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" "${CASDEB}" "${ARCH}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
|
@@ -21,4 +21,4 @@ export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../OCCTOverview/code"
|
||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../qt/OCCTOverview/code"
|
||||
|
@@ -60,7 +60,7 @@ shopt -u nocasematch
|
||||
|
||||
# ----- Setup Environment Variables -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ] && [ "$anArch" != "aarch64" ] && [ "$anArch" != "arm64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
@@ -68,7 +68,6 @@ fi
|
||||
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
@@ -32,7 +32,7 @@ if [ ! -f "$EXE_PATH" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/OCCTOverview/code"
|
||||
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/qt/OCCTOverview/code"
|
||||
|
||||
cd ${aCurrentPath}
|
||||
"$EXE_PATH"
|
||||
|
86
adm/vcpkg/ports/opencascade/portfile.cmake
Normal file
86
adm/vcpkg/ports/opencascade/portfile.cmake
Normal file
@@ -0,0 +1,86 @@
|
||||
# Get git information for ABI validation
|
||||
execute_process(
|
||||
COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../.."
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
)
|
||||
|
||||
if(NOT GIT_RESULT EQUAL 0)
|
||||
set(GIT_COMMIT_HASH "unknown")
|
||||
endif()
|
||||
|
||||
set(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../..")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(BUILD_TYPE "Shared")
|
||||
else()
|
||||
set(BUILD_TYPE "Static")
|
||||
endif()
|
||||
|
||||
set (BUILD_CPP_STANDARD "C++17")
|
||||
if ("cpp20" IN_LIST FEATURES)
|
||||
set (BUILD_CPP_STANDARD "C++20")
|
||||
elseif ("cpp23" IN_LIST FEATURES)
|
||||
set (BUILD_CPP_STANDARD "C++23")
|
||||
endif()
|
||||
|
||||
set (BUILD_OPT_PROFILE "Default")
|
||||
if ("optimized" IN_LIST FEATURES)
|
||||
set (BUILD_OPT_PROFILE "Production")
|
||||
endif()
|
||||
|
||||
set (BUILD_MODULE_Draw OFF)
|
||||
if ("tcl" IN_LIST FEATURES OR "tcltk" IN_LIST FEATURES)
|
||||
set (BUILD_MODULE_Draw ON)
|
||||
endif()
|
||||
|
||||
set (USE_MMGR_TYPE "NATIVE")
|
||||
if ("jemalloc" IN_LIST FEATURES)
|
||||
set (USE_MMGR_TYPE "JEMALLOC")
|
||||
endif()
|
||||
|
||||
# Feature mapping to CMake options
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
angle USE_GLES2
|
||||
opengl USE_OPENGL
|
||||
freeimage USE_FREEIMAGE
|
||||
freetype USE_FREETYPE
|
||||
rapidjson USE_RAPIDJSON
|
||||
tbb USE_TBB
|
||||
vtk USE_VTK
|
||||
tcltk USE_TK
|
||||
draco USE_DRACO
|
||||
ffmpeg USE_FFMPEG
|
||||
openvr USE_OPENVR
|
||||
gtest BUILD_GTEST
|
||||
pch BUILD_USE_PCH
|
||||
d3d USE_D3D
|
||||
docs BUILD_DOC_Overview
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DBUILD_LIBRARY_TYPE=${BUILD_TYPE}
|
||||
-DINSTALL_DIR_LAYOUT=Vcpkg
|
||||
-DBUILD_USE_VCPKG=ON
|
||||
-DBUILD_CPP_STANDARD=${BUILD_CPP_STANDARD}
|
||||
-DBUILD_OPT_PROFILE=${BUILD_OPT_PROFILE}
|
||||
-DBUILD_MODULE_Draw=${BUILD_MODULE_Draw}
|
||||
-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
-DUSE_HASH=${GIT_COMMIT_HASH}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_install_copyright(
|
||||
FILE_LIST
|
||||
"${SOURCE_PATH}/LICENSE_LGPL_21.txt"
|
||||
"${SOURCE_PATH}/OCCT_LGPL_EXCEPTION.txt"
|
||||
)
|
@@ -13,6 +13,9 @@
|
||||
}
|
||||
],
|
||||
"overlay-ports": [
|
||||
"./ports"
|
||||
]
|
||||
}
|
||||
"../../ports"
|
||||
],
|
||||
"overlay-triplets": [
|
||||
"../../triplets"
|
||||
]
|
||||
}
|
167
adm/vcpkg/ports/opencascade/vcpkg.json
Normal file
167
adm/vcpkg/ports/opencascade/vcpkg.json
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "opencascade",
|
||||
"version": "8.0.0",
|
||||
"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",
|
||||
"documentation": "https://dev.opencascade.org/doc/overview/html",
|
||||
"license": "LGPL-2.1",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
{
|
||||
"name": "tcl"
|
||||
},
|
||||
{
|
||||
"name": "freetype",
|
||||
"platform": "!uwp"
|
||||
},
|
||||
{
|
||||
"name": "angle",
|
||||
"platform": "uwp"
|
||||
},
|
||||
{
|
||||
"name": "opengl",
|
||||
"platform": "!(android | ios | uwp | wasm32)"
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"angle": {
|
||||
"description": "Enables OpenGL ES 2.0 through ANGLE project. Required for 3D visualization in OCCT on UWP platform where desktop OpenGL is not available.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "angle",
|
||||
"platform": "!(linux & !static)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"opengl": {
|
||||
"description": "Enables OpenGL support for 3D visualization toolkit. Required for OCCT's OpenGL rendering pipeline and graphical display drivers.",
|
||||
"dependencies": [
|
||||
"opengl"
|
||||
]
|
||||
},
|
||||
"tcl": {
|
||||
"description": "Enables Tcl scripting support for OCCT's DRAWEXE test harness and command-line interface. Provides access to OCCT's geometric algorithms through scripting.",
|
||||
"dependencies": [
|
||||
"tcl"
|
||||
]
|
||||
},
|
||||
"tcltk": {
|
||||
"description": "Enables Tcl/Tk GUI support for DRAWEXE test harness. Provides windowed interface for OCCT's geometric modeling and visualization tools.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "tcl",
|
||||
"features": [
|
||||
"tk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libx11",
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeimage": {
|
||||
"description": "Enables FreeImage support for advanced image file format handling (TIFF, PNG, JPEG, etc.) in OCCT's imaging and visualization components.",
|
||||
"dependencies": [
|
||||
"freeimage"
|
||||
]
|
||||
},
|
||||
"freetype": {
|
||||
"description": "Enables FreeType font rendering engine for high-quality text display in OCCT's 3D visualization and technical drawing output.",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"fontconfig",
|
||||
{
|
||||
"name": "freetype",
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"rapidjson": {
|
||||
"description": "Enables RapidJSON for efficient JSON parsing and serialization in OCCT's glTF 2.0 import/export functionality.",
|
||||
"dependencies": [
|
||||
"rapidjson"
|
||||
]
|
||||
},
|
||||
"tbb": {
|
||||
"description": "Enables Intel Threading Building Blocks for optimized parallel computing. Replaces OCCT's default threading with TBB's task-based parallelism for better performance.",
|
||||
"dependencies": [
|
||||
"tbb"
|
||||
]
|
||||
},
|
||||
"vtk": {
|
||||
"description": "Enables VTK (Visualization Toolkit) integration for advanced scientific visualization capabilities and mesh processing in OCCT.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vtk",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"opengl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"draco": {
|
||||
"description": "Enables Google Draco geometry compression for efficient mesh storage and transmission in OCCT's glTF 2.0 import/export workflow.",
|
||||
"dependencies": [
|
||||
"draco"
|
||||
]
|
||||
},
|
||||
"ffmpeg": {
|
||||
"description": "Enables FFmpeg multimedia framework for video encoding/decoding and animation export capabilities in OCCT's visualization pipeline.",
|
||||
"dependencies": [
|
||||
"ffmpeg"
|
||||
]
|
||||
},
|
||||
"openvr": {
|
||||
"description": "Enables OpenVR SDK integration for virtual reality support in OCCT's 3D visualization, allowing immersive CAD model exploration.",
|
||||
"dependencies": [
|
||||
"openvr"
|
||||
]
|
||||
},
|
||||
"jemalloc": {
|
||||
"description": "Enables jemalloc high-performance memory allocator as replacement for system malloc. Improves memory usage patterns for large-scale CAD operations.",
|
||||
"dependencies": [
|
||||
"jemalloc"
|
||||
]
|
||||
},
|
||||
"gtest": {
|
||||
"description": "Enables Google Test framework for building OCCT's unit test suite. Required for running automated tests and validation of OCCT functionality.",
|
||||
"dependencies": [
|
||||
"gtest"
|
||||
]
|
||||
},
|
||||
"pch": {
|
||||
"description": "Enables precompiled headers to improve compilation speed. Creates shared headers that are compiled once and reused across multiple source files."
|
||||
},
|
||||
"cpp20": {
|
||||
"description": "Enables C++20 standard compilation mode for OCCT. Provides access to latest C++20 features including concepts and modules."
|
||||
},
|
||||
"cpp23": {
|
||||
"description": "Enables C++23 standard compilation mode for OCCT. Provides access to the latest C++23 features including improved constexpr and new standard library components."
|
||||
},
|
||||
"optimized": {
|
||||
"description": "Enables production-level optimizations for maximum performance. Applies aggressive compiler optimizations and removes debug symbols."
|
||||
},
|
||||
"d3d": {
|
||||
"description": "Enables Direct3D support for 3D visualization on Windows. Provides alternative graphics backend to OpenGL for Windows-specific applications.",
|
||||
"supports": "windows"
|
||||
},
|
||||
"docs": {
|
||||
"description": "Enables documentation generation using Doxygen. Creates HTML reference manual and overview documentation for OCCT API.",
|
||||
"dependencies": [
|
||||
"doxygen"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
diff --git a/win/makefile.vc b/win/makefile.vc
|
||||
index c88c0ec3dc..6c9dd624d7 100644
|
||||
--- a/win/makefile.vc
|
||||
+++ b/win/makefile.vc
|
||||
@@ -466,13 +466,13 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
|
||||
# release - Everything that builds as part of a release
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
-release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
|
||||
+release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs tk-build
|
||||
all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) pkgs
|
||||
core: setup $(TCLLIB) $(TCLSTUBLIB)
|
||||
shell: setup $(TCLSH)
|
||||
dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll
|
||||
tcltest: setup $(TCLTEST) dlls $(CAT32)
|
||||
-install: install-binaries install-libraries install-docs install-pkgs
|
||||
+install: install-binaries install-libraries install-docs install-pkgs tk-build tk-install
|
||||
!if $(SYMBOLS)
|
||||
install: install-pdbs
|
||||
!endif
|
||||
@@ -569,6 +569,24 @@ pkgs:
|
||||
popd \
|
||||
)
|
||||
|
||||
+tk-build:
|
||||
+!if defined(TKDIR) && defined(INSTALLDIR)
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) INSTALLDIR=$(INSTALLDIR) OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) MACHINE=$(MACHINE) &\
|
||||
+ popd \
|
||||
+ )
|
||||
+!endif
|
||||
+
|
||||
+tk-install:
|
||||
+!if defined(TKDIR) && defined(INSTALLDIR)
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) INSTALLDIR=$(INSTALLDIR) OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) MACHINE=$(MACHINE) install &\
|
||||
+ popd \
|
||||
+ )
|
||||
+!endif
|
||||
+
|
||||
test-pkgs:
|
||||
@for /d %d in ($(PKGSDIR)\*) do \
|
||||
@if exist "%~fd\win\makefile.vc" ( \
|
||||
--
|
||||
2.47.1.windows.2
|
||||
|
415
adm/vcpkg/ports/tcl/0001-Support-Tk.patch
Normal file
415
adm/vcpkg/ports/tcl/0001-Support-Tk.patch
Normal file
@@ -0,0 +1,415 @@
|
||||
From da6b5b83ef997f550155d9087c5e7b289168fb1b Mon Sep 17 00:00:00 2001
|
||||
From: dpasukhi <dpasukhi@opencascade.com>
|
||||
Date: Sat, 5 Jul 2025 11:36:01 +0100
|
||||
Subject: [PATCH] Add support for building and installing Tk in Makefiles for
|
||||
Unix and Windows
|
||||
|
||||
---
|
||||
unix/Makefile.in | 94 +++++++++++++++++++++++++++++++++++++++++++++--
|
||||
win/Makefile.in | 68 ++++++++++++++++++++++++++++++++++
|
||||
win/makefile.vc | 96 +++++++++++++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 249 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/unix/Makefile.in b/unix/Makefile.in
|
||||
index bc743b3892..dfdcf35acd 100644
|
||||
--- a/unix/Makefile.in
|
||||
+++ b/unix/Makefile.in
|
||||
@@ -232,6 +232,7 @@ TOOL_DIR = $(TOP_DIR)/tools
|
||||
UNIX_DIR = $(TOP_DIR)/unix
|
||||
MAC_OSX_DIR = $(TOP_DIR)/macosx
|
||||
PKGS_DIR = $(TOP_DIR)/pkgs
|
||||
+EXTRADIR = $(TOP_DIR)/extra
|
||||
# Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below.
|
||||
DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest
|
||||
# Must be absolute to so the corresponding tcltest's tcl_library is absolute.
|
||||
@@ -622,7 +623,7 @@ SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
|
||||
# Start of rules
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
-all: binaries libraries doc packages
|
||||
+all: binaries libraries doc packages extra
|
||||
|
||||
binaries: ${LIB_FILE} ${TCL_EXE}
|
||||
|
||||
@@ -666,13 +667,13 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
|
||||
#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in
|
||||
# $(SHELL) config.status
|
||||
|
||||
-clean: clean-packages
|
||||
+clean: clean-packages clean-extra
|
||||
rm -rf *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
|
||||
errors ${TCL_EXE} ${TCLTEST_EXE} lib.exp Tcl @DTRACE_HDR@ \
|
||||
minizip${HOST_EXEEXT} *.${HOST_OBJEXT} *.zip *.vfs
|
||||
(cd dltest ; $(MAKE) clean)
|
||||
|
||||
-distclean: distclean-packages clean
|
||||
+distclean: distclean-packages clean distclean-extra
|
||||
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
|
||||
tclConfig.h *.plist Tcl.framework tcl.pc tclUuid.h
|
||||
(cd dltest ; $(MAKE) distclean)
|
||||
@@ -795,7 +796,7 @@ INSTALL_EXTRA_TARGETS = @EXTRA_INSTALL@
|
||||
INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DOC_TARGETS) $(INSTALL_DEV_TARGETS) \
|
||||
$(INSTALL_PACKAGE_TARGETS) $(INSTALL_EXTRA_TARGETS)
|
||||
|
||||
-install: $(INSTALL_TARGETS)
|
||||
+install: $(INSTALL_TARGETS) install-extra
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(INSTALL_TARGETS) \
|
||||
@@ -1725,6 +1726,7 @@ PKG_CFG_ARGS = @PKG_CFG_ARGS@
|
||||
# cannot use absolute paths due to issues in nested configure when path to
|
||||
# build dir contains spaces).
|
||||
PKG_DIR = ./pkgs
|
||||
+EXTRA_BUILD_DIR = ./extra
|
||||
|
||||
configure-packages:
|
||||
@for i in $(PKGS_DIR)/*; do \
|
||||
@@ -2151,6 +2153,89 @@ BUILD_HTML = \
|
||||
--useversion=$(HTML_VERSION) --htmldir="$(HTML_INSTALL_DIR)" \
|
||||
--srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
|
||||
|
||||
+#--------------------------------------------------------------------------
|
||||
+# Extra packages build targets (for TK and other extras)
|
||||
+#--------------------------------------------------------------------------
|
||||
+
|
||||
+extra:
|
||||
+ @if test -d "$(EXTRADIR)"; then \
|
||||
+ for extradir in $(EXTRADIR)/*; do \
|
||||
+ if test -d "$$extradir/unix" && test -f "$$extradir/unix/configure"; then \
|
||||
+ extrapkg=`basename $$extradir`; \
|
||||
+ echo "Building extra package '$$extrapkg'"; \
|
||||
+ mkdir -p "$(EXTRA_BUILD_DIR)/$$extrapkg"; \
|
||||
+ TCL_BUILD_DIR="`pwd`"; \
|
||||
+ if test ! -f "$(EXTRA_BUILD_DIR)/$$extrapkg/Makefile"; then \
|
||||
+ echo "Configuring extra package '$$extrapkg'"; \
|
||||
+ (cd "$(EXTRA_BUILD_DIR)/$$extrapkg" && \
|
||||
+ "$$extradir/unix/configure" \
|
||||
+ --prefix="$(prefix)" \
|
||||
+ --exec-prefix="$(exec_prefix)" \
|
||||
+ --with-tcl="$$TCL_BUILD_DIR" \
|
||||
+ CFLAGS="$(CFLAGS)" \
|
||||
+ CPPFLAGS="$(CPPFLAGS)" \
|
||||
+ LDFLAGS="$(LDFLAGS)" \
|
||||
+ CC="$(CC)") || exit $$?; \
|
||||
+ fi; \
|
||||
+ echo "Building extra package '$$extrapkg'"; \
|
||||
+ (cd "$(EXTRA_BUILD_DIR)/$$extrapkg" && \
|
||||
+ $(MAKE) \
|
||||
+ TCL_LIBRARY=$(TCL_LIBRARY) \
|
||||
+ CFLAGS="$(CFLAGS)" \
|
||||
+ CPPFLAGS="$(CPPFLAGS)" \
|
||||
+ LDFLAGS="$(LDFLAGS)" \
|
||||
+ CC="$(CC)") || exit $$?; \
|
||||
+ fi; \
|
||||
+ done; \
|
||||
+ else \
|
||||
+ echo "No extra directory found at $(EXTRADIR) - skipping extra builds"; \
|
||||
+ fi
|
||||
+
|
||||
+install-extra:
|
||||
+ @if test -d "$(EXTRADIR)"; then \
|
||||
+ for extradir in $(EXTRADIR)/*; do \
|
||||
+ if test -d "$$extradir/unix" && test -f "$$extradir/unix/configure"; then \
|
||||
+ extrapkg=`basename $$extradir`; \
|
||||
+ if test -f "$(EXTRA_BUILD_DIR)/$$extrapkg/Makefile"; then \
|
||||
+ echo "Installing extra package '$$extrapkg'"; \
|
||||
+ (cd "$(EXTRA_BUILD_DIR)/$$extrapkg" && $(MAKE) install \
|
||||
+ DESTDIR="$(INSTALL_ROOT)" \
|
||||
+ prefix="$(prefix)" \
|
||||
+ exec_prefix="$(exec_prefix)" \
|
||||
+ TCL_LIBRARY=$(TCL_LIBRARY) \
|
||||
+ CFLAGS="$(CFLAGS)" \
|
||||
+ CPPFLAGS="$(CPPFLAGS)" \
|
||||
+ LDFLAGS="$(LDFLAGS)" \
|
||||
+ CC="$(CC)") || exit $$?; \
|
||||
+ fi; \
|
||||
+ fi; \
|
||||
+ done; \
|
||||
+ else \
|
||||
+ echo "No extra directory found - skipping extra installs"; \
|
||||
+ fi
|
||||
+
|
||||
+clean-extra:
|
||||
+ @if test -d "$(EXTRA_BUILD_DIR)"; then \
|
||||
+ for extrapkg in $(EXTRA_BUILD_DIR)/*; do \
|
||||
+ if test -d "$$extrapkg" && test -f "$$extrapkg/Makefile"; then \
|
||||
+ echo "Cleaning extra package in $$extrapkg"; \
|
||||
+ (cd "$$extrapkg" && $(MAKE) clean) || exit $$?; \
|
||||
+ fi; \
|
||||
+ done; \
|
||||
+ fi
|
||||
+
|
||||
+distclean-extra:
|
||||
+ @if test -d "$(EXTRA_BUILD_DIR)"; then \
|
||||
+ for extrapkg in $(EXTRA_BUILD_DIR)/*; do \
|
||||
+ if test -d "$$extrapkg" && test -f "$$extrapkg/Makefile"; then \
|
||||
+ echo "Distcleaning extra package in $$extrapkg"; \
|
||||
+ (cd "$$extrapkg" && $(MAKE) distclean) || exit $$?; \
|
||||
+ fi; \
|
||||
+ rm -rf "$$extrapkg"; \
|
||||
+ done; \
|
||||
+ rm -rf "$(EXTRA_BUILD_DIR)"; \
|
||||
+ fi
|
||||
+
|
||||
#--------------------------------------------------------------------------
|
||||
# The list of all the targets that do not correspond to real files. This stops
|
||||
# 'make' from getting confused when someone makes an error in a rule.
|
||||
@@ -2166,6 +2251,7 @@ BUILD_HTML = \
|
||||
.PHONY: install-tzdata install-msgs
|
||||
.PHONY: packages configure-packages test-packages clean-packages
|
||||
.PHONY: dist-packages distclean-packages install-packages
|
||||
+.PHONY: extra install-extra clean-extra distclean-extra
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
diff --git a/win/Makefile.in b/win/Makefile.in
|
||||
index 8dd107670f..f0cf267329 100644
|
||||
--- a/win/Makefile.in
|
||||
+++ b/win/Makefile.in
|
||||
@@ -129,6 +129,11 @@ ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W 2>/dev/null || pwd -P)
|
||||
ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)')
|
||||
TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)')
|
||||
|
||||
+# Tk-related directories (TKDIR can be set by user)
|
||||
+TK_SRC_DIR = $(TKDIR)
|
||||
+TK_BUILD_TOP = $(TKDIR)/win
|
||||
+CONFIG_INSTALL_DIR = $(LIB_INSTALL_DIR)
|
||||
+
|
||||
# Fully qualify library path so that `make test`
|
||||
# does not depend on the current directory.
|
||||
LIBRARY_DIR1 = $(shell cd '$(ROOT_DIR_NATIVE)/library' ; pwd -P)
|
||||
@@ -432,6 +437,34 @@ TCL_OBJS = ${GENERIC_OBJS} ${WIN_OBJS} @ZLIB_OBJS@ $(TOMMATH_OBJS)
|
||||
TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]
|
||||
|
||||
all: binaries libraries doc packages
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically building Tk..."; \
|
||||
+ echo "========== TK BUILD PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VER)${EXESUFFIX}"; \
|
||||
+ echo "=========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Building Tk using existing Makefile..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE)) || exit $$?; \
|
||||
+ elif test -f "$(TK_SRC_DIR)/win/configure"; then \
|
||||
+ echo "Configuring and building Tk..."; \
|
||||
+ mkdir -p "$(TK_BUILD_TOP)"; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && \
|
||||
+ "$(TK_SRC_DIR)/win/configure" \
|
||||
+ --prefix="$(prefix)" \
|
||||
+ --exec-prefix="$(exec_prefix)" \
|
||||
+ --with-tcl="$(CONFIG_INSTALL_DIR)" && \
|
||||
+ $(MAKE)) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk configure script not found at $(TK_SRC_DIR)/win/configure"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk build"; \
|
||||
+ fi
|
||||
|
||||
# Test-suite helper (can be used to test Tcl from build directory with all expected modules).
|
||||
# To start from windows shell use:
|
||||
@@ -648,6 +681,27 @@ gentommath_h:
|
||||
> "$(GENERIC_DIR_NATIVE)/tclTomMath.h"
|
||||
|
||||
install: all install-binaries install-libraries install-doc install-packages
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically installing Tk..."; \
|
||||
+ echo "========== TK INSTALL PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "DESTDIR=$(INSTALL_ROOT)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VER)${EXESUFFIX}"; \
|
||||
+ echo "==========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Installing Tk..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) install DESTDIR="$(INSTALL_ROOT)") || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk Makefile not found at $(TK_BUILD_TOP)/Makefile"; \
|
||||
+ echo "Please run 'make all' first to build Tk"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk install"; \
|
||||
+ fi
|
||||
|
||||
install-binaries: binaries
|
||||
@for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)"; \
|
||||
@@ -848,10 +902,24 @@ clean: cleanhelp clean-packages
|
||||
$(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh
|
||||
$(RM) *.pch *.ilk *.pdb *.zip
|
||||
$(RMDIR) *.vfs
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically cleaning Tk..."; \
|
||||
+ echo "Cleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) clean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to clean"; \
|
||||
+ fi
|
||||
|
||||
distclean: distclean-packages clean
|
||||
$(RM) Makefile config.status config.cache config.log tclConfig.sh \
|
||||
tcl.hpj config.status.lineno tclsh.exe.manifest tclUuid.h
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically distcleaning Tk..."; \
|
||||
+ echo "Distcleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) distclean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to distclean"; \
|
||||
+ fi
|
||||
|
||||
#
|
||||
# Bundled package targets
|
||||
diff --git a/win/makefile.vc b/win/makefile.vc
|
||||
index c88c0ec3dc..cbdad89ba8 100644
|
||||
--- a/win/makefile.vc
|
||||
+++ b/win/makefile.vc
|
||||
@@ -420,6 +420,7 @@ TCLSTUBOBJS = \
|
||||
### the left side of implicit rules.
|
||||
TOMMATHDIR = $(ROOT)\libtommath
|
||||
PKGSDIR = $(ROOT)\pkgs
|
||||
+WINDIR = $(ROOT)\win
|
||||
|
||||
# Additional include and C macro definitions for the implicit rules
|
||||
# defined in rules.vc
|
||||
@@ -438,6 +439,7 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
|
||||
!endif
|
||||
|
||||
|
||||
+
|
||||
#---------------------------------------------------------------------
|
||||
# Project specific targets
|
||||
# There are 4 primary build configurations to consider from the combination
|
||||
@@ -466,18 +468,24 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
|
||||
# release - Everything that builds as part of a release
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
-release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
|
||||
-all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) pkgs
|
||||
+release: setup $(TCLSH) $(TCLSTUBLIB) dlls setpath pkgs tk-build
|
||||
+all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) setpath pkgs
|
||||
core: setup $(TCLLIB) $(TCLSTUBLIB)
|
||||
shell: setup $(TCLSH)
|
||||
dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll
|
||||
tcltest: setup $(TCLTEST) dlls $(CAT32)
|
||||
-install: install-binaries install-libraries install-docs install-pkgs
|
||||
+install: setpath install-binaries install-libraries install-docs install-pkgs tk-build tk-install
|
||||
!if $(SYMBOLS)
|
||||
install: install-pdbs
|
||||
!endif
|
||||
setup: default-setup
|
||||
|
||||
+# Add TCL win directory to PATH for current session
|
||||
+setpath:
|
||||
+ @echo Adding $(WINDIR) to PATH
|
||||
+ @set PATH=$(WINDIR);$(PATH)
|
||||
+ @echo PATH updated for current session
|
||||
+
|
||||
test: test-core test-pkgs
|
||||
test-core: setup $(TCLTEST) dlls $(CAT32)
|
||||
set TCL_LIBRARY=$(ROOT:\=/)/library
|
||||
@@ -569,6 +577,84 @@ pkgs:
|
||||
popd \
|
||||
)
|
||||
|
||||
+tk-build:
|
||||
+!if defined(TKDIR)
|
||||
+ @echo TKDIR detected - building Tk...
|
||||
+ @echo ========== TK BUILD PARAMETERS ==========
|
||||
+ @echo TKDIR=$(TKDIR)
|
||||
+ @echo TCLDIR=$(ROOT)
|
||||
+!if defined(INSTALLDIR)
|
||||
+ @echo INSTALLDIR=$(INSTALLDIR)
|
||||
+!endif
|
||||
+ @echo OPTS=$(OPTS)
|
||||
+ @echo STATS=$(STATS)
|
||||
+ @echo CHECKS=$(CHECKS)
|
||||
+ @echo MACHINE=$(MACHINE)
|
||||
+ @echo ==========================================
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) MACHINE=$(MACHINE) & \
|
||||
+ popd \
|
||||
+ ) else ( \
|
||||
+ echo ERROR: Tk makefile.vc not found at $(TKDIR)\win\makefile.vc & \
|
||||
+ exit 1 \
|
||||
+ )
|
||||
+!else
|
||||
+ @echo TKDIR not set or directory does not exist - skipping Tk build
|
||||
+!endif
|
||||
+
|
||||
+tk-install:
|
||||
+!if defined(TKDIR) && defined(INSTALLDIR)
|
||||
+ @echo TKDIR detected - installing Tk...
|
||||
+ @echo ========== TK INSTALL PARAMETERS ==========
|
||||
+ @echo TKDIR=$(TKDIR)
|
||||
+ @echo TCLDIR=$(ROOT)
|
||||
+ @echo INSTALLDIR=$(INSTALLDIR)
|
||||
+ @echo OPTS=$(OPTS)
|
||||
+ @echo STATS=$(STATS)
|
||||
+ @echo CHECKS=$(CHECKS)
|
||||
+ @echo MACHINE=$(MACHINE)
|
||||
+ @echo ===========================================
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) INSTALLDIR=$(INSTALLDIR) OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) MACHINE=$(MACHINE) install & \
|
||||
+ popd \
|
||||
+ ) else ( \
|
||||
+ echo ERROR: Tk makefile.vc not found at $(TKDIR)\win\makefile.vc & \
|
||||
+ exit 1 \
|
||||
+ )
|
||||
+!else
|
||||
+ @echo TKDIR not set, INSTALLDIR not set, or directory does not exist - skipping Tk install
|
||||
+!endif
|
||||
+
|
||||
+tk-clean:
|
||||
+!if defined(TKDIR)
|
||||
+ @echo TKDIR detected - cleaning Tk build...
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) clean & \
|
||||
+ popd \
|
||||
+ ) else ( \
|
||||
+ echo No Tk makefile found to clean \
|
||||
+ )
|
||||
+!else
|
||||
+ @echo TKDIR not set or directory does not exist - skipping Tk clean
|
||||
+!endif
|
||||
+
|
||||
+tk-distclean:
|
||||
+!if defined(TKDIR)
|
||||
+ @echo TKDIR detected - distcleaning Tk build...
|
||||
+ @if exist "$(TKDIR)\win\makefile.vc" ( \
|
||||
+ pushd "$(TKDIR)\win" & \
|
||||
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) distclean & \
|
||||
+ popd \
|
||||
+ ) else ( \
|
||||
+ echo No Tk makefile found to distclean \
|
||||
+ )
|
||||
+!else
|
||||
+ @echo TKDIR not set or directory does not exist - skipping Tk distclean
|
||||
+!endif
|
||||
+
|
||||
test-pkgs:
|
||||
@for /d %d in ($(PKGSDIR)\*) do \
|
||||
@if exist "%~fd\win\makefile.vc" ( \
|
||||
@@ -1058,8 +1144,8 @@ tidy:
|
||||
@echo Removing $(TCLREGLIB) ...
|
||||
@if exist $(TCLREGLIB) del $(TCLREGLIB)
|
||||
|
||||
-clean: default-clean clean-pkgs
|
||||
-hose: default-hose hose-pkgs
|
||||
+clean: default-clean clean-pkgs tk-clean
|
||||
+hose: default-hose hose-pkgs tk-distclean
|
||||
realclean: hose
|
||||
.PHONY:
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -1,51 +0,0 @@
|
||||
diff --git a/win/makefile.vc b/win/makefile.vc
|
||||
index 6c9dd624d7..d29185feed 100644
|
||||
--- a/win/makefile.vc
|
||||
+++ b/win/makefile.vc
|
||||
@@ -420,6 +420,7 @@ TCLSTUBOBJS = \
|
||||
### the left side of implicit rules.
|
||||
TOMMATHDIR = $(ROOT)\libtommath
|
||||
PKGSDIR = $(ROOT)\pkgs
|
||||
+WINDIR = $(ROOT)\win
|
||||
|
||||
# Additional include and C macro definitions for the implicit rules
|
||||
# defined in rules.vc
|
||||
@@ -438,6 +439,7 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
|
||||
!endif
|
||||
|
||||
|
||||
+
|
||||
#---------------------------------------------------------------------
|
||||
# Project specific targets
|
||||
# There are 4 primary build configurations to consider from the combination
|
||||
@@ -466,18 +468,24 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
|
||||
# release - Everything that builds as part of a release
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
-release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs tk-build
|
||||
-all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) pkgs
|
||||
+release: setup $(TCLSH) $(TCLSTUBLIB) dlls setpath pkgs tk-build
|
||||
+all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) setpath pkgs
|
||||
core: setup $(TCLLIB) $(TCLSTUBLIB)
|
||||
shell: setup $(TCLSH)
|
||||
dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll
|
||||
tcltest: setup $(TCLTEST) dlls $(CAT32)
|
||||
-install: install-binaries install-libraries install-docs install-pkgs tk-build tk-install
|
||||
+install: setpath install-binaries install-libraries install-docs install-pkgs tk-build tk-install
|
||||
!if $(SYMBOLS)
|
||||
install: install-pdbs
|
||||
!endif
|
||||
setup: default-setup
|
||||
|
||||
+# Add TCL win directory to PATH for current session
|
||||
+setpath:
|
||||
+ @echo Adding $(WINDIR) to PATH
|
||||
+ @set PATH=$(WINDIR);$(PATH)
|
||||
+ @echo PATH updated for current session
|
||||
+
|
||||
test: test-core test-pkgs
|
||||
test-core: setup $(TCLTEST) dlls $(CAT32)
|
||||
set TCL_LIBRARY=$(ROOT:\=/)/library
|
||||
--
|
||||
2.47.1.windows.2
|
||||
|
@@ -1,119 +0,0 @@
|
||||
From 34a5ac55260871875c3ad678df8c21ef31500d21 Mon Sep 17 00:00:00 2001
|
||||
From: dpasukhi <dpasukhi@opencascade.com>
|
||||
Date: Sun, 22 Jun 2025 14:18:19 +0100
|
||||
Subject: [PATCH] Add Tk build and install support to Makefile; include
|
||||
automatic clean and distclean steps
|
||||
|
||||
---
|
||||
unix/Makefile.in | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 69 insertions(+)
|
||||
|
||||
diff --git a/unix/Makefile.in b/unix/Makefile.in
|
||||
index bc743b3892..7464e3f930 100644
|
||||
--- a/unix/Makefile.in
|
||||
+++ b/unix/Makefile.in
|
||||
@@ -95,6 +95,12 @@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
|
||||
# Tcl Module default path roots (TIP189).
|
||||
TCL_MODULE_PATH = @TCL_MODULE_PATH@
|
||||
|
||||
+# Tk-related directories and settings
|
||||
+# These can be overridden on the command line or set via environment
|
||||
+TKDIR = @TKDIR@
|
||||
+TK_BUILD_TOP = $(TKDIR)/unix
|
||||
+TK_SRC_DIR = $(TKDIR)
|
||||
+
|
||||
# warning flags
|
||||
CFLAGS_WARNING = @CFLAGS_WARNING@
|
||||
|
||||
@@ -623,6 +629,34 @@ SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
all: binaries libraries doc packages
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically building Tk..."; \
|
||||
+ echo "========== TK BUILD PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}"; \
|
||||
+ echo "=========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Building Tk using existing Makefile..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE)) || exit $$?; \
|
||||
+ elif test -f "$(TK_SRC_DIR)/unix/configure"; then \
|
||||
+ echo "Configuring and building Tk..."; \
|
||||
+ mkdir -p "$(TK_BUILD_TOP)"; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && \
|
||||
+ "$(TK_SRC_DIR)/unix/configure" \
|
||||
+ --prefix="$(prefix)" \
|
||||
+ --exec-prefix="$(exec_prefix)" \
|
||||
+ --with-tcl="$(CONFIG_INSTALL_DIR)" && \
|
||||
+ $(MAKE)) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk configure script not found at $(TK_SRC_DIR)/unix/configure"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk build"; \
|
||||
+ fi
|
||||
|
||||
binaries: ${LIB_FILE} ${TCL_EXE}
|
||||
|
||||
@@ -671,11 +705,25 @@ clean: clean-packages
|
||||
errors ${TCL_EXE} ${TCLTEST_EXE} lib.exp Tcl @DTRACE_HDR@ \
|
||||
minizip${HOST_EXEEXT} *.${HOST_OBJEXT} *.zip *.vfs
|
||||
(cd dltest ; $(MAKE) clean)
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically cleaning Tk..."; \
|
||||
+ echo "Cleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) clean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to clean"; \
|
||||
+ fi
|
||||
|
||||
distclean: distclean-packages clean
|
||||
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
|
||||
tclConfig.h *.plist Tcl.framework tcl.pc tclUuid.h
|
||||
(cd dltest ; $(MAKE) distclean)
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically distcleaning Tk..."; \
|
||||
+ echo "Distcleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) distclean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to distclean"; \
|
||||
+ fi
|
||||
|
||||
depend:
|
||||
makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
|
||||
@@ -796,6 +844,27 @@ INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DOC_TARGETS) $(INSTALL_DEV_T
|
||||
$(INSTALL_PACKAGE_TARGETS) $(INSTALL_EXTRA_TARGETS)
|
||||
|
||||
install: $(INSTALL_TARGETS)
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically installing Tk..."; \
|
||||
+ echo "========== TK INSTALL PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "DESTDIR=$(INSTALL_ROOT)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}"; \
|
||||
+ echo "==========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Installing Tk..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) install DESTDIR="$(INSTALL_ROOT)") || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk Makefile not found at $(TK_BUILD_TOP)/Makefile"; \
|
||||
+ echo "Please run 'make all' first to build Tk"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk install"; \
|
||||
+ fi
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(INSTALL_TARGETS) \
|
||||
--
|
||||
2.47.1.windows.2
|
||||
|
@@ -1,117 +0,0 @@
|
||||
From bf55f8558b8ca6603f6539c6421391f26ab6139a Mon Sep 17 00:00:00 2001
|
||||
From: dpasukhi <dpasukhi@opencascade.com>
|
||||
Date: Sun, 22 Jun 2025 15:20:03 +0100
|
||||
Subject: [PATCH] Add Tk build and install automation to Makefile; include
|
||||
clean and distclean targets
|
||||
|
||||
---
|
||||
win/Makefile.in | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 68 insertions(+)
|
||||
|
||||
diff --git a/win/Makefile.in b/win/Makefile.in
|
||||
index 8dd107670f..f0cf267329 100644
|
||||
--- a/win/Makefile.in
|
||||
+++ b/win/Makefile.in
|
||||
@@ -129,6 +129,11 @@ ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W 2>/dev/null || pwd -P)
|
||||
ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)')
|
||||
TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)')
|
||||
|
||||
+# Tk-related directories (TKDIR can be set by user)
|
||||
+TK_SRC_DIR = $(TKDIR)
|
||||
+TK_BUILD_TOP = $(TKDIR)/win
|
||||
+CONFIG_INSTALL_DIR = $(LIB_INSTALL_DIR)
|
||||
+
|
||||
# Fully qualify library path so that `make test`
|
||||
# does not depend on the current directory.
|
||||
LIBRARY_DIR1 = $(shell cd '$(ROOT_DIR_NATIVE)/library' ; pwd -P)
|
||||
@@ -432,6 +437,34 @@ TCL_OBJS = ${GENERIC_OBJS} ${WIN_OBJS} @ZLIB_OBJS@ $(TOMMATH_OBJS)
|
||||
TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]
|
||||
|
||||
all: binaries libraries doc packages
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically building Tk..."; \
|
||||
+ echo "========== TK BUILD PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VER)${EXESUFFIX}"; \
|
||||
+ echo "=========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Building Tk using existing Makefile..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE)) || exit $$?; \
|
||||
+ elif test -f "$(TK_SRC_DIR)/win/configure"; then \
|
||||
+ echo "Configuring and building Tk..."; \
|
||||
+ mkdir -p "$(TK_BUILD_TOP)"; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && \
|
||||
+ "$(TK_SRC_DIR)/win/configure" \
|
||||
+ --prefix="$(prefix)" \
|
||||
+ --exec-prefix="$(exec_prefix)" \
|
||||
+ --with-tcl="$(CONFIG_INSTALL_DIR)" && \
|
||||
+ $(MAKE)) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk configure script not found at $(TK_SRC_DIR)/win/configure"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk build"; \
|
||||
+ fi
|
||||
|
||||
# Test-suite helper (can be used to test Tcl from build directory with all expected modules).
|
||||
# To start from windows shell use:
|
||||
@@ -648,6 +681,27 @@ gentommath_h:
|
||||
> "$(GENERIC_DIR_NATIVE)/tclTomMath.h"
|
||||
|
||||
install: all install-binaries install-libraries install-doc install-packages
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)"; then \
|
||||
+ echo "TKDIR detected - automatically installing Tk..."; \
|
||||
+ echo "========== TK INSTALL PARAMETERS =========="; \
|
||||
+ echo "TKDIR=$(TKDIR)"; \
|
||||
+ echo "TCLDIR=$(TOP_DIR)"; \
|
||||
+ echo "prefix=$(prefix)"; \
|
||||
+ echo "exec_prefix=$(exec_prefix)"; \
|
||||
+ echo "DESTDIR=$(INSTALL_ROOT)"; \
|
||||
+ echo "TCL_TCLSH=$(BIN_INSTALL_DIR)/tclsh$(VER)${EXESUFFIX}"; \
|
||||
+ echo "==========================================="; \
|
||||
+ if test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "Installing Tk..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) install DESTDIR="$(INSTALL_ROOT)") || exit $$?; \
|
||||
+ else \
|
||||
+ echo "ERROR: Tk Makefile not found at $(TK_BUILD_TOP)/Makefile"; \
|
||||
+ echo "Please run 'make all' first to build Tk"; \
|
||||
+ exit 1; \
|
||||
+ fi; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set or directory does not exist - skipping Tk install"; \
|
||||
+ fi
|
||||
|
||||
install-binaries: binaries
|
||||
@for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)"; \
|
||||
@@ -848,10 +902,24 @@ clean: cleanhelp clean-packages
|
||||
$(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh
|
||||
$(RM) *.pch *.ilk *.pdb *.zip
|
||||
$(RMDIR) *.vfs
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically cleaning Tk..."; \
|
||||
+ echo "Cleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) clean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to clean"; \
|
||||
+ fi
|
||||
|
||||
distclean: distclean-packages clean
|
||||
$(RM) Makefile config.status config.cache config.log tclConfig.sh \
|
||||
tcl.hpj config.status.lineno tclsh.exe.manifest tclUuid.h
|
||||
+ @if test -n "$(TKDIR)" && test -d "$(TKDIR)" && test -f "$(TK_BUILD_TOP)/Makefile"; then \
|
||||
+ echo "TKDIR detected - automatically distcleaning Tk..."; \
|
||||
+ echo "Distcleaning Tk build..."; \
|
||||
+ (cd "$(TK_BUILD_TOP)" && $(MAKE) distclean) || exit $$?; \
|
||||
+ else \
|
||||
+ echo "TKDIR not set, directory does not exist, or no Tk build to distclean"; \
|
||||
+ fi
|
||||
|
||||
#
|
||||
# Bundled package targets
|
||||
--
|
||||
2.47.1.windows.2
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From 85842ba83b70d99f90ee3fff8c956e82d17759f2 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Roszko <mark.roszko@gmail.com>
|
||||
Date: Tue, 18 Aug 2020 23:11:27 -0400
|
||||
Subject: [PATCH] Remove broken exist check for shell install
|
||||
|
||||
---
|
||||
win/makefile.vc | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/win/makefile.vc b/win/makefile.vc
|
||||
index f5d2f4a..6bffe32 100644
|
||||
--- a/win/makefile.vc
|
||||
+++ b/win/makefile.vc
|
||||
@@ -869,10 +869,8 @@ install-binaries:
|
||||
@$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
|
||||
!endif
|
||||
@$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
|
||||
-!if exist($(TCLSH))
|
||||
@echo Installing $(TCLSHNAME)
|
||||
@$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\"
|
||||
-!endif
|
||||
@echo Installing $(TCLSTUBLIBNAME)
|
||||
@$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
|
||||
|
||||
--
|
||||
2.28.0.windows.1
|
||||
|
@@ -5,15 +5,14 @@ vcpkg_from_sourceforge(
|
||||
FILENAME tcl8.6.16-src.tar.gz
|
||||
SHA512 434c92f8181fb8dca6bc065b0f1f5078779086f19adf008818c90a3108596c63465ef43e9f3c1cfb3d4151a9de244d0bf0e6ee5b40e714b1ddca4a78eb43050b
|
||||
PATCHES
|
||||
0001-Add-tk-build.patch
|
||||
0002-Add-setpath-target.patch
|
||||
0003-Update-unix-build.patch
|
||||
0004-Update-mingw-build.patch
|
||||
0001-Support-Tk.patch
|
||||
)
|
||||
|
||||
set(USE_TCL_TK OFF)
|
||||
|
||||
set (TKDIR_WIN "")
|
||||
if ("tk" IN_LIST FEATURES)
|
||||
set (TKDIR_WIN "TKDIR=../extra/tk.8.6.16-src")
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH TK_SOURCE_PATH
|
||||
REPO tcl/Tcl
|
||||
@@ -81,7 +80,7 @@ if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
${TCL_BUILD_ARCH_STR}
|
||||
${TCL_BUILD_STATS}
|
||||
${TCL_BUILD_CHECKS}
|
||||
TKDIR=../extra/tk.8.6.16-src
|
||||
${TKDIR_WIN}
|
||||
OPTIONS_DEBUG
|
||||
${TCL_BUILD_OPTS},symbols,pdbs
|
||||
INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug
|
||||
@@ -102,20 +101,30 @@ else()
|
||||
if (VCPKG_TARGET_IS_MINGW)
|
||||
set (TCL_PROJECT_SUBPATH win)
|
||||
endif()
|
||||
file(REMOVE "${SOURCE_PATH}/${TCL_PROJECT_SUBPATH}/configure")
|
||||
# file(REMOVE "${SOURCE_PATH}/${TCL_PROJECT_SUBPATH}/configure")
|
||||
# For MinGW and other Unix-like environments on Windows, use unix build path
|
||||
# MinGW can use either win/ (with MinGW-compatible Makefiles) or unix/ (with autotools)
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PROJECT_SUBPATH ${TCL_PROJECT_SUBPATH}
|
||||
OPTIONS
|
||||
TKDIR=${SOURCE_PATH}/extra/tk.8.6.16-src
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make(
|
||||
OPTIONS
|
||||
TKDIR=${SOURCE_PATH}/extra/tk.8.6.16-src
|
||||
)
|
||||
# Build with explicit X11 paths for Tk when needed
|
||||
if(USE_TCL_TK AND NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_build_make(
|
||||
ENVIRONMENT
|
||||
"CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include"
|
||||
"LDFLAGS=-L${CURRENT_INSTALLED_DIR}/lib"
|
||||
)
|
||||
vcpkg_install_make(
|
||||
ENVIRONMENT
|
||||
"CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include"
|
||||
"LDFLAGS=-L${CURRENT_INSTALLED_DIR}/lib"
|
||||
)
|
||||
else()
|
||||
vcpkg_install_make()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
|
9
adm/vcpkg/triplets/x64-linux-dynamic-release.cmake
Normal file
9
adm/vcpkg/triplets/x64-linux-dynamic-release.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
|
||||
set(VCPKG_FIXUP_ELF_RPATH ON)
|
||||
|
||||
set(VCPKG_BUILD_TYPE "release")
|
@@ -1,132 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "opencascade",
|
||||
"version": "7.8.1",
|
||||
"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",
|
||||
"documentation": "https://github.com/Open-Cascade-SAS/OCCT/wiki",
|
||||
"license": "LGPL-2.1",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
{
|
||||
"name": "tcl"
|
||||
},
|
||||
{
|
||||
"name": "freetype",
|
||||
"platform": "!uwp"
|
||||
},
|
||||
{
|
||||
"name": "angle",
|
||||
"platform": "uwp"
|
||||
},
|
||||
{
|
||||
"name": "opengl",
|
||||
"platform": "!(android | ios | uwp | wasm32)"
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"angle": {
|
||||
"description": "Enables optional usage of ANGLE. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
"angle"
|
||||
]
|
||||
},
|
||||
"opengl": {
|
||||
"description": "Enables optional usage of OpenGL. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
"opengl"
|
||||
]
|
||||
},
|
||||
"tcl": {
|
||||
"description": "Enables optional usage of Tcl. Part of the module-foundation-classes.",
|
||||
"dependencies": [
|
||||
"tcl"
|
||||
]
|
||||
},
|
||||
"tcltk": {
|
||||
"description": "Enables optional usage of TclTk. Part of the module-foundation-classes.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "tcl",
|
||||
"features": [
|
||||
"tk"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"freeimage": {
|
||||
"description": "Enables optional usage of FreeImage. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
"freeimage"
|
||||
]
|
||||
},
|
||||
"freetype": {
|
||||
"description": "Enables optional usage of FreeType. Part of the module-visualization.",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"fontconfig",
|
||||
{
|
||||
"name": "freetype",
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"rapidjson": {
|
||||
"description": "Enables optional usage of RapidJSON. Part of the module-data-exchange.",
|
||||
"dependencies": [
|
||||
"rapidjson"
|
||||
]
|
||||
},
|
||||
"tbb": {
|
||||
"description": "Enables optional usage of TBB. Part of the module-foundation-classes.",
|
||||
"dependencies": [
|
||||
"tbb"
|
||||
]
|
||||
},
|
||||
"vtk": {
|
||||
"description": "Enables optional usage of VTK. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vtk",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"opengl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"draco": {
|
||||
"description": "Enables optional usage of Draco. Part of the module-data-exchange.",
|
||||
"dependencies": [
|
||||
"draco"
|
||||
]
|
||||
},
|
||||
"ffmpeg": {
|
||||
"description": "Enables optional usage of FFmpeg. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
"ffmpeg"
|
||||
]
|
||||
},
|
||||
"openvr": {
|
||||
"description": "Enables optional usage of OpenVR. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
"openvr"
|
||||
]
|
||||
},
|
||||
"jemalloc": {
|
||||
"description": "Enables optional usage of jemalloc. Part of the module-foundation-classes.",
|
||||
"dependencies": [
|
||||
"jemalloc"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
project (Overview)
|
||||
|
||||
# directory that contains all raw OCCT overview articles (markdown format)
|
||||
set (OCCT_OVERVIEW_DIR "${CMAKE_SOURCE_DIR}/dox")
|
||||
set (OCCT_OVERVIEW_DIR "${OCCT_ROOT_DIR}/dox")
|
||||
|
||||
# directory that contains resources for the generation of OCCT documentation
|
||||
set (OCCT_OVERVIEW_RESOURCE_DIR "${OCCT_OVERVIEW_DIR}/resources")
|
||||
@@ -43,7 +43,7 @@ configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CO
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nEXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nEXAMPLE_PATH = ${OCCT_ROOT_DIR}/src")
|
||||
|
||||
set (OCCT_ARTICLE_PARAM_INPUT "INPUT =")
|
||||
set (OCCT_ARTICLE_PARAM_IMAGEPATH "IMAGE_PATH = ${OCCT_OVERVIEW_DIR}/resources/ ")
|
||||
|
@@ -95,7 +95,7 @@ In addition to these two samples, there are much more that might be of use to a
|
||||
Check Readme files in the sample directories to learn more about samples compilation.
|
||||
|
||||
**Note:** source code for OCCTOverview is stored at 'samples/qt/OCCTOverview/src' folder in your OCCT root,
|
||||
and the source code files for examples presented in subsections are stored at 'samples/OCCTOverview/code folder'.
|
||||
and the source code files for examples presented in subsections are stored at 'samples/qt/OCCTOverview/code folder'.
|
||||
Several utility classes that are not presented in the example window may be found in example source code files.
|
||||
|
||||
The overall classes introduction may be found in the @ref occt_user_guides__foundation_classes "Foundation Classes" section of the documentation.
|
||||
|
@@ -79,6 +79,9 @@
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
|
@@ -80,6 +80,9 @@
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
|
@@ -1,48 +0,0 @@
|
||||
AdaptorCurve2d_AIS.cxx
|
||||
AdaptorCurve2d_AIS.h
|
||||
AdaptorCurve_AIS.cxx
|
||||
AdaptorCurve_AIS.h
|
||||
AdaptorPnt2d_AIS.cxx
|
||||
AdaptorPnt2d_AIS.h
|
||||
AdaptorVec_AIS.cxx
|
||||
AdaptorVec_AIS.h
|
||||
BaseSample.cxx
|
||||
BaseSample.h
|
||||
DataExchange.xml
|
||||
DataExchangeSamples.cxx
|
||||
DataExchangeSamples.h
|
||||
Geometry.xml
|
||||
GeometrySamples.cxx
|
||||
GeometrySamples.h
|
||||
MakeBottle.cxx
|
||||
MakeBottle.h
|
||||
Ocaf.xml
|
||||
OcafSamples.cxx
|
||||
OcafSamples.h
|
||||
Sample2D_Face.cxx
|
||||
Sample2D_Face.h
|
||||
Sample2D_Image.cxx
|
||||
Sample2D_Image.h
|
||||
Sample2D_Markers.cxx
|
||||
Sample2D_Markers.h
|
||||
Samples.qrc
|
||||
TOcafFunction_BoxDriver.cxx
|
||||
TOcafFunction_BoxDriver.h
|
||||
TOcafFunction_CutDriver.cxx
|
||||
TOcafFunction_CutDriver.h
|
||||
TOcafFunction_CylDriver.cxx
|
||||
TOcafFunction_CylDriver.h
|
||||
TOcaf_Application.cxx
|
||||
TOcaf_Application.h
|
||||
Topology.xml
|
||||
TopologySamples.cxx
|
||||
TopologySamples.h
|
||||
Triangulation.xml
|
||||
TriangulationSamples.cxx
|
||||
TriangulationSamples.h
|
||||
Viewer2d.xml
|
||||
Viewer2dSamples.cxx
|
||||
Viewer2dSamples.h
|
||||
Viewer3d.xml
|
||||
Viewer3dSamples.cxx
|
||||
Viewer3dSamples.h
|
@@ -90,4 +90,7 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${Geometry_RESOURCE_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (Geometry mfcsample)
|
||||
target_link_libraries (Geometry mfcsample)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
@@ -577,4 +577,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -62,3 +62,6 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (Modeling mfcsample TKDESTEP TKBO)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@@ -83,6 +83,9 @@
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\win64\obj\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
@@ -59,4 +59,7 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${ImportExport_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (ImportExport mfcsample)
|
||||
target_link_libraries (ImportExport mfcsample)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
@@ -353,4 +353,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -85,4 +85,7 @@ include_directories (${CMAKE_BINARY_DIR}/inc
|
||||
${HLR_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
|
||||
target_link_libraries (HLR mfcsample)
|
||||
target_link_libraries (HLR mfcsample)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
@@ -410,4 +410,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -187,3 +187,6 @@ set (mfcsample_USED_LIBS TKDEVRML
|
||||
${CSF_OpenGlLibs})
|
||||
|
||||
target_link_libraries (mfcsample ${mfcsample_USED_LIBS})
|
||||
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@@ -699,4 +699,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -1,9 +1,16 @@
|
||||
project(AndroidQt)
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
# Sample configuration
|
||||
set (EXECUTABLE_PROJECT ON)
|
||||
set (USE_QT ON)
|
||||
set (RELATIVE_DIR "samples/qt")
|
||||
set (TARGET_FOLDER "Samples")
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
|
||||
ADD_DEFINITIONS(-DNO_Common_EXPORTS)
|
||||
# Target-specific definitions
|
||||
target_compile_definitions(AndroidQt PRIVATE -DNO_Common_EXPORTS)
|
||||
|
||||
|
||||
|
@@ -1,17 +0,0 @@
|
||||
TKernel
|
||||
TKMath
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKGeomBase
|
||||
TKBRep
|
||||
TKGeomAlgo
|
||||
TKTopAlgo
|
||||
TKShHealing
|
||||
TKService
|
||||
TKMesh
|
||||
TKHLR
|
||||
TKV3d
|
||||
TKOpenGl
|
||||
CSF_FreeImagePlus
|
||||
CSF_FREETYPE
|
||||
CSF_OpenGlLibs
|
20
samples/qt/AndroidQt/EXTERNLIB.cmake
Normal file
20
samples/qt/AndroidQt/EXTERNLIB.cmake
Normal file
@@ -0,0 +1,20 @@
|
||||
# External dependencies for AndroidQt sample
|
||||
set(OCCT_AndroidQt_EXTERNAL_LIBS
|
||||
TKernel
|
||||
TKMath
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKGeomBase
|
||||
TKBRep
|
||||
TKGeomAlgo
|
||||
TKTopAlgo
|
||||
TKShHealing
|
||||
TKService
|
||||
TKMesh
|
||||
TKHLR
|
||||
TKV3d
|
||||
TKOpenGl
|
||||
CSF_FreeImagePlus
|
||||
CSF_FREETYPE
|
||||
CSF_OpenGlLibs
|
||||
)
|
@@ -1,2 +0,0 @@
|
||||
EXTERNLIB
|
||||
PACKAGES
|
14
samples/qt/AndroidQt/FILES.cmake
Normal file
14
samples/qt/AndroidQt/FILES.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
# Source files for AndroidQt sample
|
||||
set(OCCT_AndroidQt_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
set(OCCT_AndroidQt_FILES
|
||||
src/AndroidQt.cxx
|
||||
src/AndroidQt.h
|
||||
src/AndroidQt.qrc
|
||||
src/AndroidQt_TouchParameters.cxx
|
||||
src/AndroidQt_TouchParameters.h
|
||||
src/AndroidQt_UserInteractionParameters.h
|
||||
src/AndroidQt_Window.cxx
|
||||
src/AndroidQt_Window.h
|
||||
src/Main.cxx
|
||||
)
|
@@ -15,11 +15,12 @@ occt_lib_path = $$_PRO_FILE_PWD_/occt/$$occt_lib_subpath
|
||||
|
||||
android {
|
||||
QMAKE_CFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
QMAKE_CXXFLAGS += -fexceptions -Wno-ignored-qualifiers
|
||||
QMAKE_CXXFLAGS += -fexceptions -Wno-ignored-qualifiers -std=c++17
|
||||
LIBS += -L$$occt_lib_path -lEGL
|
||||
}
|
||||
win32 {
|
||||
QMAKE_CXXFLAGS_WARN_ON += -W4
|
||||
QMAKE_CXXFLAGS += /std:c++17
|
||||
INCLUDEPATH += $$(CSF_OCCTIncludePath)
|
||||
LIBS += -L$(CSF_OCCTLibPath);$(CSF_PRODLibPath)
|
||||
LIBS += -lopengl32
|
||||
|
@@ -1 +0,0 @@
|
||||
AndroidQt/src
|
4
samples/qt/AndroidQt/PACKAGES.cmake
Normal file
4
samples/qt/AndroidQt/PACKAGES.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
# Packages for AndroidQt sample
|
||||
set(OCCT_AndroidQt_LIST_OF_PACKAGES
|
||||
AndroidQt
|
||||
)
|
@@ -1,9 +0,0 @@
|
||||
AndroidQt.cxx
|
||||
AndroidQt.h
|
||||
AndroidQt.qrc
|
||||
AndroidQt_TouchParameters.cxx
|
||||
AndroidQt_TouchParameters.h
|
||||
AndroidQt_UserInteractionParameters.h
|
||||
AndroidQt_Window.cxx
|
||||
AndroidQt_Window.h
|
||||
Main.cxx
|
@@ -1,17 +0,0 @@
|
||||
ApplicationCommon.cxx
|
||||
ApplicationCommon.h
|
||||
Common-icon.ts
|
||||
Common-string.ts
|
||||
CommonSample.h
|
||||
DocumentCommon.cxx
|
||||
DocumentCommon.h
|
||||
Material.cxx
|
||||
Material.h
|
||||
MDIWindow.cxx
|
||||
MDIWindow.h
|
||||
OcctWindow.cxx
|
||||
OcctWindow.h
|
||||
Transparency.cxx
|
||||
Transparency.h
|
||||
View.cxx
|
||||
View.h
|
@@ -1,8 +1,14 @@
|
||||
project(FuncDemo)
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
# Sample configuration
|
||||
set (EXECUTABLE_PROJECT ON)
|
||||
set (USE_QT ON)
|
||||
set (RELATIVE_DIR "samples/qt")
|
||||
set (TARGET_FOLDER "Samples")
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
|
||||
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
|
||||
if (BUILD_Inspector)
|
||||
target_link_libraries (FuncDemo TKTInspector)
|
||||
|
@@ -1,14 +0,0 @@
|
||||
TKBO
|
||||
TKBRep
|
||||
TKCAF
|
||||
TKCDF
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKernel
|
||||
TKLCAF
|
||||
TKMath
|
||||
TKMesh
|
||||
TKPrim
|
||||
TKTopAlgo
|
17
samples/qt/FuncDemo/EXTERNLIB.cmake
Normal file
17
samples/qt/FuncDemo/EXTERNLIB.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
# External dependencies for FuncDemo sample
|
||||
set(OCCT_FuncDemo_EXTERNAL_LIBS
|
||||
TKBO
|
||||
TKBRep
|
||||
TKCAF
|
||||
TKCDF
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKernel
|
||||
TKLCAF
|
||||
TKMath
|
||||
TKMesh
|
||||
TKPrim
|
||||
TKTopAlgo
|
||||
)
|
@@ -1,2 +0,0 @@
|
||||
EXTERNLIB
|
||||
PACKAGES
|
33
samples/qt/FuncDemo/FILES.cmake
Normal file
33
samples/qt/FuncDemo/FILES.cmake
Normal file
@@ -0,0 +1,33 @@
|
||||
# Source files for FuncDemo sample
|
||||
set(OCCT_FuncDemo_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
set(OCCT_FuncDemo_FILES
|
||||
src/BaseDriver.cpp
|
||||
src/BaseDriver.h
|
||||
src/CircleDriver.cpp
|
||||
src/CircleDriver.h
|
||||
src/ConeDriver.cpp
|
||||
src/ConeDriver.h
|
||||
src/CylinderDriver.cpp
|
||||
src/CylinderDriver.h
|
||||
src/edge.cpp
|
||||
src/edge.h
|
||||
src/FThread.cpp
|
||||
src/FThread.h
|
||||
src/FuncDemo.qrc
|
||||
src/graphwidget.cpp
|
||||
src/graphwidget.h
|
||||
src/main.cpp
|
||||
src/mainwindow.cpp
|
||||
src/mainwindow.h
|
||||
src/node.cpp
|
||||
src/node.h
|
||||
src/PointDriver.cpp
|
||||
src/PointDriver.h
|
||||
src/PrismDriver.cpp
|
||||
src/PrismDriver.h
|
||||
src/ShapeSaverDriver.cpp
|
||||
src/ShapeSaverDriver.h
|
||||
src/SimpleDriver.cpp
|
||||
src/SimpleDriver.h
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user