mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e4acd164ed |
2
.github/actions/ascii-check/action.yml
vendored
2
.github/actions/ascii-check/action.yml
vendored
@@ -78,7 +78,7 @@ runs:
|
||||
|
||||
- name: Upload non-ASCII report
|
||||
if: steps.ascii-check.outputs.has_non_ascii == 'true'
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: non-ascii-report
|
||||
path: non_ascii_report.txt
|
||||
|
4
.github/actions/build-docs/action.yml
vendored
4
.github/actions/build-docs/action.yml
vendored
@@ -47,14 +47,14 @@ runs:
|
||||
shell: cmd
|
||||
|
||||
- name: Upload refman documentation
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: refman-doc
|
||||
path: build/doc/refman
|
||||
retention-days: 90
|
||||
|
||||
- name: Upload overview documentation
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: overview-doc
|
||||
path: build/doc/overview
|
||||
|
2
.github/actions/build-occt/action.yml
vendored
2
.github/actions/build-occt/action.yml
vendored
@@ -78,7 +78,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload install directory
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: install
|
||||
|
@@ -13,7 +13,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
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.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
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.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
@@ -47,7 +47,7 @@ runs:
|
||||
)
|
||||
|
||||
- name: Upload MFC Sample
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: mfc-sample-${{ inputs.platform }}-x64
|
||||
path: samples/mfc/
|
||||
|
4
.github/actions/build-sample-qt/action.yml
vendored
4
.github/actions/build-sample-qt/action.yml
vendored
@@ -17,7 +17,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
@@ -116,7 +116,7 @@ runs:
|
||||
done
|
||||
|
||||
- name: Upload Qt Samples
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: qt-samples-${{ inputs.platform }}-x64
|
||||
path: |
|
||||
|
4
.github/actions/build-tinspector/action.yml
vendored
4
.github/actions/build-tinspector/action.yml
vendored
@@ -17,7 +17,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
@@ -102,7 +102,7 @@ runs:
|
||||
make install -j$(nproc)
|
||||
|
||||
- name: Upload TInspector installation
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
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.6.2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: format-patch
|
||||
path: format.patch
|
||||
|
@@ -15,7 +15,7 @@ runs:
|
||||
steps:
|
||||
|
||||
- name: Download vcpkg tar archive
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: ${{ inputs.build-directory }}
|
||||
|
6
.github/actions/retest-failures/action.yml
vendored
6
.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.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
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.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.results-artifact-name }}
|
||||
path: install/bin/results
|
||||
@@ -118,7 +118,7 @@ runs:
|
||||
|
||||
- name: Download and extract install directory
|
||||
if: steps.check_failures.outputs.failed_count > 0
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
|
11
.github/actions/run-gtest/action.yml
vendored
11
.github/actions/run-gtest/action.yml
vendored
@@ -25,7 +25,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
@@ -58,6 +58,7 @@ runs:
|
||||
run: |
|
||||
cd install
|
||||
call env.bat vc14 win64 release
|
||||
cd bin
|
||||
set GTEST_OUTPUT=""
|
||||
OpenCascadeGTest.exe --gtest_output=xml:gtest_results.xml > gtest_output.log 2>&1
|
||||
type gtest_output.log
|
||||
@@ -77,12 +78,12 @@ runs:
|
||||
cat gtest_output.log
|
||||
|
||||
- name: Upload GTest results
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: gtest-results-${{ inputs.platform }}-${{ inputs.compiler }}-${{ inputs.artifact-suffix }}
|
||||
path: |
|
||||
install/**/gtest_results.xml
|
||||
install/**/gtest_output.log
|
||||
install/bin/gtest_results.xml
|
||||
install/bin/gtest_output.log
|
||||
retention-days: 15
|
||||
|
||||
- name: Check for test failures on Windows
|
||||
@@ -90,7 +91,7 @@ runs:
|
||||
id: check-failures-windows
|
||||
shell: pwsh
|
||||
run: |
|
||||
cd install
|
||||
cd install/bin
|
||||
$log = Get-Content "gtest_output.log" -Raw
|
||||
if ($log -match "\[\s+FAILED\s+\]") {
|
||||
Write-Error "GTest failures detected in the output."
|
||||
|
6
.github/actions/run-tests/action.yml
vendored
6
.github/actions/run-tests/action.yml
vendored
@@ -53,7 +53,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: install
|
||||
@@ -145,7 +145,7 @@ runs:
|
||||
|
||||
- name: Upload test results (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: results-${{ inputs.test-directory-name }}
|
||||
path: |
|
||||
@@ -156,7 +156,7 @@ runs:
|
||||
|
||||
- name: Upload test results (macOS/Linux)
|
||||
if: ${{ inputs.platform == 'macos' || inputs.platform == 'linux' }}
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: results-${{ inputs.test-directory-name }}
|
||||
path: |
|
||||
|
4
.github/actions/test-summary/action.yml
vendored
4
.github/actions/test-summary/action.yml
vendored
@@ -23,7 +23,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Download and extract install directory
|
||||
uses: actions/download-artifact@v4.3.0
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: install-linux-clang-x64
|
||||
path: install
|
||||
@@ -88,7 +88,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload comparison results
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: test-compare-results
|
||||
retention-days: 15
|
||||
|
@@ -25,7 +25,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload vcpkg tar archive
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: ${{ inputs.build-directory }}/vcpkg-dependencies.tar.gz
|
||||
|
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.2.1
|
||||
|
||||
- name: Build documentation
|
||||
uses: ./.github/actions/build-docs
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -99,7 +99,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build TInspector
|
||||
uses: ./.github/actions/build-tinspector
|
||||
@@ -151,7 +151,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build TInspector
|
||||
uses: ./.github/actions/build-tinspector
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build CSharp Sample
|
||||
uses: ./.github/actions/build-sample-csharp
|
||||
@@ -181,7 +181,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build MFC Sample
|
||||
uses: ./.github/actions/build-sample-mfc
|
||||
@@ -196,7 +196,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build Qt Sample
|
||||
uses: ./.github/actions/build-sample-qt
|
||||
@@ -211,7 +211,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build Qt Sample
|
||||
uses: ./.github/actions/build-sample-qt
|
||||
@@ -226,7 +226,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -244,7 +244,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -262,7 +262,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -280,7 +280,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -298,7 +298,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
@@ -316,7 +316,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run retest
|
||||
uses: ./.github/actions/retest-failures
|
||||
@@ -334,7 +334,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -351,7 +351,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -368,7 +368,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Run GTests
|
||||
uses: ./.github/actions/run-gtest
|
||||
@@ -386,7 +386,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Generate Test Summary
|
||||
uses: ./.github/actions/test-summary
|
||||
|
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
@@ -37,11 +37,11 @@ jobs:
|
||||
configure-macos:
|
||||
name: Configure OCCT on macOS with Clang
|
||||
runs-on: macos-15
|
||||
if: github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
if: github.ref == 'refs/heads/IR' && github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
|
12
.github/workflows/master-validation.yml
vendored
12
.github/workflows/master-validation.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Setup Windows MSVC dependencies
|
||||
uses: ./.github/actions/setup-windows-msvc-deps
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: ./.github/actions/setup-msys2
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Setup Ubuntu dependencies
|
||||
uses: ./.github/actions/setup-ubuntu-deps
|
||||
@@ -207,7 +207,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Build OCCT with vcpkg
|
||||
uses: ./.github/actions/build-occt
|
||||
@@ -231,7 +231,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- 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
|
||||
@@ -272,7 +272,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Configure OCCT for analysis
|
||||
uses: ./.github/actions/configure-occt
|
||||
|
373
CMakeLists.txt
373
CMakeLists.txt
@@ -1,8 +1,5 @@
|
||||
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")
|
||||
@@ -34,7 +31,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 "${OCCT_ROOT_DIR}/adm/vcpkg/ports/opencascade")
|
||||
set (VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}/adm/vcpkg")
|
||||
|
||||
# Disable default features for vcpkg manifest
|
||||
set (VCPKG_MANIFEST_NO_DEFAULT_FEATURES 1)
|
||||
@@ -61,7 +58,7 @@ else()
|
||||
PROJECT (OCCT)
|
||||
endif()
|
||||
|
||||
set (CMAKE_MODULE_PATH "${OCCT_ROOT_DIR}/adm/cmake")
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
|
||||
|
||||
set (CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
@@ -89,7 +86,7 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# include cmake file
|
||||
macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
|
||||
include (${OCCT_ROOT_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
|
||||
endmacro()
|
||||
|
||||
# set using memory manager option for TKernel
|
||||
@@ -263,30 +260,7 @@ 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 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)
|
||||
SET_PROPERTY(CACHE INSTALL_DIR_LAYOUT PROPERTY STRINGS Windows Unix)
|
||||
endif()
|
||||
|
||||
# check INSTALL_DIR_LAYOUT changes and update INSTALL_DIR_* paths if necessary
|
||||
@@ -297,16 +271,6 @@ 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)
|
||||
@@ -342,7 +306,7 @@ elseif (NOT "${INSTALL_DIR_PREV}" STREQUAL "${INSTALL_DIR}")
|
||||
set (CMAKE_INSTALL_PREFIX_PREV "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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}")
|
||||
@@ -357,12 +321,10 @@ endif()
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE)
|
||||
|
||||
set (BIN_LETTER "")
|
||||
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()
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
set (BIN_LETTER "d")
|
||||
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
|
||||
set (BIN_LETTER "i")
|
||||
endif()
|
||||
|
||||
# the list of being built toolkits
|
||||
@@ -501,33 +463,12 @@ else()
|
||||
OCCT_CHECK_AND_UNSET (BUILD_YACCLEX)
|
||||
endif()
|
||||
|
||||
# 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()
|
||||
if (NOT DEFINED 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
|
||||
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
|
||||
else()
|
||||
# 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()
|
||||
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
|
||||
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
|
||||
endif()
|
||||
|
||||
# search for CSF variable in EXTERNLIB of each being used toolkit
|
||||
@@ -742,12 +683,7 @@ 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")
|
||||
@@ -823,17 +759,6 @@ 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
|
||||
@@ -858,6 +783,9 @@ if (APPLE)
|
||||
occt_set_apple_csf_vars()
|
||||
endif()
|
||||
|
||||
# copying clang-format file to the root of the project
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/.clang-format DESTINATION ${CMAKE_SOURCE_DIR})
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
@@ -865,7 +793,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 (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
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}")
|
||||
@@ -874,11 +802,8 @@ endif()
|
||||
|
||||
# define folder containing all shell/batch scripts
|
||||
if (NOT DEFINED INSTALL_DIR_SCRIPT)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -886,7 +811,7 @@ endif()
|
||||
|
||||
# place the libraries to <prefix>/lib folder for unix and leave old structure for windows
|
||||
if (NOT DEFINED INSTALL_DIR_LIB)
|
||||
if (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
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}")
|
||||
@@ -896,13 +821,11 @@ endif()
|
||||
# OCCT headers: <prefix>/inc for windows,
|
||||
# <prefix>/include/opencascade-7.0.0 for unix
|
||||
if (NOT DEFINED INSTALL_DIR_INCLUDE)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -911,13 +834,11 @@ endif()
|
||||
# OCCT resources: <prefix>/src for windows,
|
||||
# <prefix>/share/opencascade-7.0.0/resources for unix
|
||||
if (NOT DEFINED INSTALL_DIR_RESOURCE)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -925,13 +846,11 @@ endif()
|
||||
|
||||
# OCCT data
|
||||
if (NOT DEFINED INSTALL_DIR_DATA)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -939,13 +858,11 @@ endif()
|
||||
|
||||
# OCCT samples
|
||||
if (NOT DEFINED INSTALL_DIR_SAMPLES)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -953,13 +870,11 @@ endif()
|
||||
|
||||
# OCCT tests
|
||||
if (NOT DEFINED INSTALL_DIR_TESTS)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -967,13 +882,11 @@ endif()
|
||||
|
||||
# OCCT doc
|
||||
if (NOT DEFINED INSTALL_DIR_DOC)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -981,14 +894,12 @@ endif()
|
||||
|
||||
# define folder containing CMake configuration files
|
||||
if (NOT DEFINED INSTALL_DIR_CMAKE)
|
||||
if (LAYOUT_IS_UNIX)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "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()
|
||||
@@ -998,7 +909,7 @@ endif()
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_resources")
|
||||
|
||||
# install LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt files
|
||||
if (LAYOUT_IS_UNIX OR LAYOUT_IS_VCPKG)
|
||||
if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
|
||||
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()
|
||||
@@ -1076,63 +987,34 @@ endif()
|
||||
|
||||
# build directories
|
||||
if (SINGLE_GENERATOR)
|
||||
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()
|
||||
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()
|
||||
|
||||
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_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}/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_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}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${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")
|
||||
|
||||
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()
|
||||
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()
|
||||
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE} ...")
|
||||
message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
|
||||
# collect all the headers to <binary dir>/inc folder
|
||||
COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "src" "${INSTALL_DIR_INCLUDE}")
|
||||
@@ -1179,6 +1061,7 @@ 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}")
|
||||
@@ -1196,14 +1079,13 @@ 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 "${OCCT_ROOT_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}"
|
||||
install (FILES "${CMAKE_SOURCE_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)
|
||||
@@ -1242,103 +1124,8 @@ 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}")
|
||||
|
||||
@@ -1348,16 +1135,6 @@ 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
|
||||
@@ -1368,20 +1145,6 @@ 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
|
||||
@@ -1413,13 +1176,13 @@ if (BUILD_SAMPLES_QT)
|
||||
endforeach()
|
||||
|
||||
## Copy sources of OCCTOverview for using in the sample
|
||||
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")
|
||||
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")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1435,6 +1198,7 @@ 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")
|
||||
@@ -1448,6 +1212,11 @@ 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)
|
||||
@@ -1480,7 +1249,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 ${OCCT_ROOT_DIR})
|
||||
set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if (BUILD_SAMPLES_MFC)
|
||||
@@ -1498,18 +1267,6 @@ 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)
|
||||
@@ -1582,7 +1339,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("${OCCT_ROOT_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_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)")
|
||||
@@ -1626,7 +1383,7 @@ if (APPLE)
|
||||
endif()
|
||||
|
||||
# Configure and install cmake config file
|
||||
configure_file("${OCCT_ROOT_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADEConfig.cmake.in" "OpenCASCADEConfig.cmake" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADEConfig.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
||||
|
||||
# Configure cmake version file
|
||||
|
@@ -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 ${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)
|
||||
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)
|
||||
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" "${OCCT_ROOT_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||
configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF)
|
||||
endif()
|
||||
|
@@ -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 "${OCCT_ROOT_DIR}/dox/FILES_HTML.txt")
|
||||
set(FILES_HTML_PATH "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/dox/FILES_PDF.txt")
|
||||
set(FILES_PDF_PATH "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/dox/resources/occt_ug_html.doxyfile")
|
||||
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_DIR}/dox/resources/occt_ug_html.doxyfile")
|
||||
else()
|
||||
set(TEMPLATE_DOXYFILE "${OCCT_ROOT_DIR}/dox/resources/occt_rm.doxyfile")
|
||||
set(TEMPLATE_DOXYFILE "${CMAKE_SOURCE_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 = ${OCCT_ROOT_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_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 = ${OCCT_ROOT_DIR}/dox\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_DIR}/dox\n")
|
||||
endif()
|
||||
|
||||
# Collect image directories for overview
|
||||
set(OVERVIEW_INPUT_DIRS ${OCCT_ROOT_DIR}/dox)
|
||||
set(OVERVIEW_INPUT_DIRS ${CMAKE_SOURCE_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} ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OVERVIEW_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
else()
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
endif()
|
||||
|
||||
# Example paths
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${OCCT_ROOT_DIR}/src ${OCCT_ROOT_DIR}/samples\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "EXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_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 = ${OCCT_ROOT_DIR}/dox/resources/occ_logo.png\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "PROJECT_LOGO = ${CMAKE_SOURCE_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 = ${OCCT_ROOT_DIR}/src\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "INPUT = ${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/src/${TOOLKIT}")
|
||||
list(APPEND MODULE_PATHS "${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}/src)
|
||||
set(REFMAN_INPUT_DIRS ${CMAKE_SOURCE_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} ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${REFMAN_IMAGE_DIRS_STR} ${CMAKE_SOURCE_DIR}/dox/resources\n")
|
||||
else()
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${OCCT_ROOT_DIR}/dox/resources\n")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "IMAGE_PATH = ${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/dox/resources/custom.css")
|
||||
file(APPEND ${DOXYGEN_CONFIG_FILE} "HTML_EXTRA_STYLESHEET = ${OCCT_ROOT_DIR}/dox/resources/custom.css\n")
|
||||
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")
|
||||
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 "${OCCT_ROOT_DIR}/dox/resources/index.html" DESTINATION "${REFMAN_OUTPUT_DIR}")
|
||||
file(COPY "${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Copy index file to provide fast access to HTML documentation
|
||||
file(COPY "${OCCT_ROOT_DIR}/dox/resources/index.html" DESTINATION "${OVERVIEW_OUTPUT_DIR}")
|
||||
file(COPY "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/dox/resources/overview.html"
|
||||
install(FILES "${CMAKE_SOURCE_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=${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_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_OCCTBinPath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
||||
"CSF_OCCTLibPath=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
||||
"CSF_OCCTIncludePath=${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}"
|
||||
"CASROOT=${OCCT_ROOT_DIR}"
|
||||
"CASROOT=${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
# Build PATH environment variable
|
||||
@@ -215,12 +215,12 @@ function(OCCT_SET_GTEST_ENVIRONMENT)
|
||||
endif()
|
||||
|
||||
# Add DrawResources related environment if it exists
|
||||
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")
|
||||
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/DrawDefault")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWDEFAULT=${OCCT_ROOT_DIR}/resources/DrawResources/DrawDefault")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
|
||||
list(APPEND TEST_ENVIRONMENT "DRAWDEFAULT=${CMAKE_SOURCE_DIR}/resources/DrawResources/DrawDefault")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -3,9 +3,9 @@
|
||||
if(OCCT_MACROS_ALREADY_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(OCCT_MACROS_ALREADY_INCLUDED 1)
|
||||
|
||||
|
||||
macro (OCCT_CHECK_AND_UNSET VARNAME)
|
||||
if (DEFINED ${VARNAME})
|
||||
unset (${VARNAME} CACHE)
|
||||
@@ -34,16 +34,16 @@ endmacro()
|
||||
|
||||
function (FILE_TO_LIST FILE_NAME FILE_CONTENT)
|
||||
set (LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${FILE_OR_FOLDER_NAME}")
|
||||
set (${RESULT_PATH} "${OCCT_ROOT_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}")
|
||||
set (${RESULT_PATH} "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${RELATIVE_PATH}/${SEARCH_TEMPLATE}")
|
||||
file (GLOB ORIGIN_FILES "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
install (DIRECTORY "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}")
|
||||
install (DIRECTORY "${CMAKE_SOURCE_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
else()
|
||||
install (FILES "${OCCT_ROOT_DIR}/${BEING_INSTALLED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
install (FILES "${CMAKE_SOURCE_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("${OCCT_ROOT_DIR}/${BEING_CONGIRUGED_FILE}" "${BUILD_NAME}" @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT)
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}")
|
||||
file (STRINGS "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/adm/templates/header.in")
|
||||
set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${BEING_COPIED_OBJECT}")
|
||||
file (COPY "${OCCT_ROOT_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}")
|
||||
file (COPY "${CMAKE_SOURCE_DIR}/${BEING_COPIED_OBJECT}" DESTINATION "${DESTINATION_PATH}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_CONFIGURE BEING_CONGIRUGED_FILE FINAL_NAME)
|
||||
configure_file("${OCCT_ROOT_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/${BEING_CONGIRUGED_FILE}" "${FINAL_NAME}" @ONLY)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_ADD_SUBDIRECTORY BEING_ADDED_DIRECTORY)
|
||||
if (EXISTS "${OCCT_ROOT_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${OCCT_ROOT_DIR}/${BEING_ADDED_DIRECTORY})
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/${BEING_ADDED_DIRECTORY}/CMakeLists.txt")
|
||||
add_subdirectory (${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
|
||||
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_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 ${OCCT_ROOT_DIR}/${RELATIVE_SOURCES_DIR}/=")
|
||||
COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_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,17 +696,13 @@ macro (OCCT_UPDATE_TARGET_FILE)
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_INSERT_CODE_FOR_TARGET)
|
||||
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()
|
||||
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()")
|
||||
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 "${OCCT_ROOT_DIR}/resources/${CurrentResource}")
|
||||
file (STRINGS "${OCCT_ROOT_DIR}/resources/${CurrentResource}/FILES" RESOURCE_FILES)
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/resources/${CurrentResource}")
|
||||
file (STRINGS "${CMAKE_SOURCE_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: ${OCCT_ROOT_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}")
|
||||
message(STATUS "Info. Generating header file from resource file: ${CMAKE_SOURCE_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 "${OCCT_ROOT_DIR}/resources/${CurrentResource_Directory}/${RESOURCE_FILE}" RESOURCE_FILE_LINES_LIST)
|
||||
file (STRINGS "${CMAKE_SOURCE_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 ("${OCCT_ROOT_DIR}/adm/templates/header.in" "${HEADER_FILE}" @ONLY NEWLINE_STYLE LF)
|
||||
configure_file ("${CMAKE_SOURCE_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("${OCCT_ROOT_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/occt_toolkit.rc.in" "${USED_RCFILE}" @ONLY)
|
||||
endif()
|
||||
|
||||
set (CURRENT_MODULE)
|
||||
@@ -120,13 +120,8 @@ endif (USE_QT)
|
||||
if (EXECUTABLE_PROJECT)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES})
|
||||
|
||||
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()
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}")
|
||||
|
||||
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}")
|
||||
@@ -156,21 +151,12 @@ else()
|
||||
set (CMAKE_SHARED_LIBRARY_SUFFIX "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
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()
|
||||
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 (NOT WIN32)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "")
|
||||
|
18
adm/cmake/occt_toolkit_prepare_sample.cmake
Normal file
18
adm/cmake/occt_toolkit_prepare_sample.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
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,24 +79,8 @@ macro (FIND_AND_WRAP_TS_FILE RESOURCE_FILE_NAME TARGET_FOLDER QM_FILES)
|
||||
endmacro()
|
||||
|
||||
macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
# 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()
|
||||
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")
|
||||
|
||||
string (FIND "${OCCT_PACKAGE}" "/" _index)
|
||||
if (_index GREATER -1)
|
||||
@@ -108,17 +92,19 @@ macro (FIND_AND_INSTALL_QT_RESOURCES OCCT_PACKAGE RESOURCE_FILES)
|
||||
|
||||
#message("QRC files are: ${QRC_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (QRC_FILE ${QRC_FILES})
|
||||
if (EXISTS ${QRC_FILE})
|
||||
FIND_AND_WRAP_RESOURCE_FILE(${QRC_FILE} RCC_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)
|
||||
list (APPEND ${RESOURCE_FILES} "${RCC_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#message("TS files are: ${TS_FILES} in ${OCCT_PACKAGE}")
|
||||
foreach (TS_FILE ${TS_FILES})
|
||||
FIND_AND_WRAP_TS_FILE(${TS_FILE} "${TARGET_FOLDER}/${CURRENT_MODULE}" QM_FILES)
|
||||
if (EXISTS ${TS_FILE})
|
||||
list (APPEND ${RESOURCE_FILES} "${TS_FILE}")
|
||||
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}")
|
||||
list (APPEND ${RESOURCE_FILES} "${QM_FILES}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
@@ -1,9 +1,5 @@
|
||||
# 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
|
||||
@@ -60,7 +56,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.
|
||||
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).
|
||||
Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout).
|
||||
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=@OCCT_ROOT_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
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
|
||||
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
|
||||
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=@OCCT_ROOT_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
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
|
||||
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
|
||||
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=@OCCT_ROOT_DIR@
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
|
||||
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
|
||||
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
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
|
@@ -17,12 +17,11 @@ 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" + one level if "share".
|
||||
# location, by going up one level + one level if "cmake" + one level if "lib".
|
||||
# This is made to support different locations of CMake files:
|
||||
# - in UNIX style: $INSTALL_DIR/lib/cmake/@OCCT_PROJECT_NAME@-<version>
|
||||
# - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
|
||||
# - in Windows style: $INSTALL_DIR/cmake
|
||||
# - in vcpkg style: $INSTALL_DIR/share/@OCCT_PROJECT_NAME@
|
||||
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/@OCCT_PROJECT_NAME@-<version>
|
||||
# - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
|
||||
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
|
||||
@@ -31,9 +30,6 @@ 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,16 +25,23 @@ if /I "%VCVER%" == "@COMPILER@" (
|
||||
|
||||
rem CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
|
||||
rem multiple and single configuration builds
|
||||
@OCCT_CUSTOM_BUILD_BIN_LIB_PATHS@
|
||||
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"
|
||||
)
|
||||
|
||||
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"
|
||||
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"
|
||||
|
||||
rem for compatibility with external application using CASROOT
|
||||
set "CASROOT=@OCCT_ROOT_DIR@"
|
||||
set "CASROOT=@CMAKE_SOURCE_DIR@"
|
||||
)
|
||||
)
|
||||
|
@@ -14,25 +14,24 @@ 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@"
|
||||
|
||||
# CSF_OCCTBinPath and CSF_OCCTLibPath are defined differently for
|
||||
# multiple and single configuration builds
|
||||
@OCCT_CUSTOM_BUILD_BIN_LIB_PATHS@
|
||||
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
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"
|
||||
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"
|
||||
|
||||
# for compatibility with external application using CASROOT
|
||||
export CASROOT="@OCCT_ROOT_DIR@"
|
||||
export CASROOT="@CMAKE_SOURCE_DIR@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -25,9 +25,15 @@ 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@"
|
||||
|
||||
@OCCT_CUSTOM_BIN_LIB_PATHS@
|
||||
set "CSF_OCCTBinPath=%CASROOT%/@INSTALL_DIR_BIN@%3"
|
||||
set "CSF_OCCTLibPath=%CASROOT%/@INSTALL_DIR_LIB@%3"
|
||||
|
||||
@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@"
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -21,10 +21,14 @@ 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@"
|
||||
|
||||
# Set paths based on layout
|
||||
@OCCT_CUSTOM_BIN_LIB_PATHS@
|
||||
|
||||
@OCCT_CUSTOM_ADDITIONAL_PATHS@
|
||||
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@"
|
||||
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 "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" (
|
||||
call "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" %VCVER% %ARCH% %CASDEB%
|
||||
if exist "%CASROOT%\custom.bat" (
|
||||
call "%CASROOT%\custom.bat" %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" ] && [ "$anArch" != "arm64" ]; then
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ] && [ "$anArch" != "aarch64"]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
@@ -43,13 +43,14 @@ fi
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ]; then
|
||||
export WOKSTATION="mac";
|
||||
export ARCH="64";
|
||||
else
|
||||
export WOKSTATION="lin";
|
||||
fi
|
||||
|
||||
# ----- Set local settings -----
|
||||
if [ -e "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" ]; then
|
||||
source "@OCCT_CUSTOM_SCRIPT_PREFIX@@OCCT_CUSTOM_SCRIPT_PATH@" "${CASDEB}" "${ARCH}"
|
||||
if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
|
||||
source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
|
||||
fi
|
||||
|
||||
THRDPARTY_PATH=""
|
||||
|
@@ -21,4 +21,4 @@ export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../qt/OCCTOverview/code"
|
||||
export "CSF_OCCTOverviewSampleCodePath=${aSamplePath}/../../OCCTOverview/code"
|
||||
|
@@ -60,7 +60,7 @@ shopt -u nocasematch
|
||||
|
||||
# ----- Setup Environment Variables -----
|
||||
anArch=`uname -m`
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ] && [ "$anArch" != "aarch64" ] && [ "$anArch" != "arm64" ]; then
|
||||
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
||||
export ARCH="32";
|
||||
else
|
||||
export ARCH="64";
|
||||
@@ -68,6 +68,7 @@ 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}/qt/OCCTOverview/code"
|
||||
export CSF_OCCTOverviewSampleCodePath="${CSF_OCCTSamplesPath}/OCCTOverview/code"
|
||||
|
||||
cd ${aCurrentPath}
|
||||
"$EXE_PATH"
|
||||
|
@@ -1,86 +0,0 @@
|
||||
# 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"
|
||||
)
|
@@ -1,167 +0,0 @@
|
||||
{
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -13,9 +13,9 @@
|
||||
}
|
||||
],
|
||||
"overlay-ports": [
|
||||
"../../ports"
|
||||
"./ports"
|
||||
],
|
||||
"overlay-triplets": [
|
||||
"../../triplets"
|
||||
"./triplets"
|
||||
]
|
||||
}
|
139
adm/vcpkg/vcpkg.json
Normal file
139
adm/vcpkg/vcpkg.json
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"$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 OpenGL ES 2.0. Part of the module-visualization.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "angle",
|
||||
"platform": "!(linux & !static)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libx11",
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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 "${OCCT_ROOT_DIR}/dox")
|
||||
set (OCCT_OVERVIEW_DIR "${CMAKE_SOURCE_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 = ${OCCT_ROOT_DIR}/src")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nEXAMPLE_PATH = ${CMAKE_SOURCE_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/qt/OCCTOverview/code folder'.
|
||||
and the source code files for examples presented in subsections are stored at 'samples/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.
|
||||
|
48
samples/OCCTOverview/code/FILES
Normal file
48
samples/OCCTOverview/code/FILES
Normal file
@@ -0,0 +1,48 @@
|
||||
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
|
@@ -1,16 +1,9 @@
|
||||
project(AndroidQt)
|
||||
|
||||
# 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_prepare_sample)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
|
||||
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
|
||||
|
||||
# Target-specific definitions
|
||||
target_compile_definitions(AndroidQt PRIVATE -DNO_Common_EXPORTS)
|
||||
ADD_DEFINITIONS(-DNO_Common_EXPORTS)
|
||||
|
||||
|
||||
|
17
samples/qt/AndroidQt/EXTERNLIB
Normal file
17
samples/qt/AndroidQt/EXTERNLIB
Normal file
@@ -0,0 +1,17 @@
|
||||
TKernel
|
||||
TKMath
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKGeomBase
|
||||
TKBRep
|
||||
TKGeomAlgo
|
||||
TKTopAlgo
|
||||
TKShHealing
|
||||
TKService
|
||||
TKMesh
|
||||
TKHLR
|
||||
TKV3d
|
||||
TKOpenGl
|
||||
CSF_FreeImagePlus
|
||||
CSF_FREETYPE
|
||||
CSF_OpenGlLibs
|
@@ -1,20 +0,0 @@
|
||||
# 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
|
||||
)
|
2
samples/qt/AndroidQt/FILES
Normal file
2
samples/qt/AndroidQt/FILES
Normal file
@@ -0,0 +1,2 @@
|
||||
EXTERNLIB
|
||||
PACKAGES
|
@@ -1,14 +0,0 @@
|
||||
# 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
|
||||
)
|
1
samples/qt/AndroidQt/PACKAGES
Normal file
1
samples/qt/AndroidQt/PACKAGES
Normal file
@@ -0,0 +1 @@
|
||||
AndroidQt/src
|
@@ -1,4 +0,0 @@
|
||||
# Packages for AndroidQt sample
|
||||
set(OCCT_AndroidQt_LIST_OF_PACKAGES
|
||||
AndroidQt
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user