Compare commits

..
76 Commits
Author SHA1 Message Date
Clifford Yapp 98ddf300b2 Restore bundled Itcl and Itk 3 stack 2026-09-17 15:37:54 +00:00
Clifford Yapp 12115e6c59 Look for CMakeLists.txt in subdirectory 2026-09-17 06:50:02 -04:00
Clifford Yapp 1c7c8af7d0 Preserve timestamps for unchanged installed files
Avoid rewriting identical installed files during Tcl, Tk, and general
bext installs. Remove the unconditional build stamp so no-op builds do
not trigger a dependent BRL-CAD reconfigure.
2026-09-16 18:39:14 +00:00
Clifford Yapp fe3b288e65 Stabilize Tcl, Tk, and Itk builds across platforms
Initialize MSVC build environments reliably and keep Git Bash's link
utility from shadowing the MSVC linker. Route dependency patches
through a portable wrapper, normalize patch paths and line endings,
and split Tcl/Tk patches by platform.

Harden Windows Tcl package builds, install the complete Itk runtime
library, and keep repeated zlib patch steps idempotent.
2026-09-16 18:39:14 +00:00
Clifford Yapp 84a51b3601 Build the Tcl GUI stack with Itcl and Itk 4
Use Itcl 4.3.7 from Tcl's complete source distribution in place of the
separate Itcl 3 project and copied private headers. Build Itk 4.2.7
against matching Tcl, Tk, and Itcl sources, and adapt Iwidgets 4.1.1
for Itcl 4.

Require Itcl 4.3 and Itk 4.2.3 when selecting a system stack. Link
tclsh with a relocatable runtime search path and use BRL-CAD's Itk
mirror.
2026-09-16 18:39:14 +00:00
Clifford Yapp 05611e687e Upgrade Tcl and Tk source distributions to 8.6.18
Advance the full-source mirrors to the final Tcl/Tk 8.6 release. Refresh
the downstream source patches and add a wrapper for applying patches to
staged external projects.
2026-09-16 18:39:14 +00:00
Clifford Yapp 78421c1ecc Enable long pathnames on Windows 2026-09-16 14:30:08 -04:00
Clifford Yapp da3a1e98fd Break out eigen patch topics
(cherry picked from commit 45e24bc30669b64cfee6ceea20705f41001d9ffb)
2026-09-15 19:01:56 -04:00
Clifford Yapp 028c2e3c0a Support compact ELF PHDR relocation in LIEF
Some linkers may emit a compact non-PIE executable with both a
RELRO-backed BSS-like LOAD and a final data/BSS LOAD.  LIEF BSS_END
relocation rejected such valid binaries because it required exactly
one BSS-like segment.

Select the final LOAD using both file and virtual ordering and
require only that segment to be BSS-like.  Also constrain SEGMENT_GAP
growth by the smaller file and virtual gaps so a rewritten LOAD
cannot overlap its neighbor.  Backport the upstream PT_PHDR-size
correction so the relocated header segment describes its reserved
mapping.

This permits RPATH growth in Tcl 8.6 launchers and leaves them
executable after both BSS_END relocation and a later SEGMENT_GAP
relocation.
2026-09-14 22:32:55 -04:00
Clifford Yapp fa74b75c10 Prevent failed plief writes from corrupting binaries
Update plief to write, parse, and verify ELF changes in a temporary
file before replacing the input.  This keeps staged executables intact
when LIEF cannot grow their dynamic string table for a longer RUNPATH.
2026-09-14 22:32:46 -04:00
Clifford Yapp 51ab96ae0d Add an Xmin-backed Tk and Qt build profile
Xmin is the minimal X11/OpenGL compatibility SDK from
https://github.com/starseeker/Xmin

Allow bundled Tk and Qt to use Xmin's minimal X11 client and
software-direct OpenGL interfaces instead of host X11 and OpenGL
libraries. This provides a coherent, relocatable GUI toolkit stack
that does not silently acquire dependencies from the build host.

Select the profile with BEXT_XMIN_ROOT without changing which packages
are otherwise enabled. Patch Tk to use the Xmin client facade and
embedded fonts, and patch Qt's qxcb desktop-OpenGL path to consume the
SDK's imported targets.

Stage patched sources separately and invalidate generated state when
the profile or patch inputs change. Preserve Xmin in installed Qt
metadata. Audit built and installed libraries to reject unresolved
dependencies or accidental linkage to host X11, XCB, or OpenGL
libraries. Leave normal system discovery unchanged when the profile
is disabled.
2026-09-14 22:32:22 -04:00
Clifford Yapp 82945d86be Update lief patch for Apple's patch command
The pinned LIEF 1.0.0 source changed line 4 from enable_language(C) to
set_property(GLOBAL PROPERTY USE_FOLDERS ON), but
lief/lief_cmake.patch:1 retained the old context. GNU patch applies it
with fuzz, explaining Linux success.  Apple’s patch 2.0-12u11 anchors
start-of-file hunks and rejects that mismatch, producing the failure at
osx_failure.txt:1115. This behavior is explicit in Apple’s patch
implementation:

https://github.com/apple-oss-distributions/patch_cmds/blob/patch_cmds-45.120.3/patch/patch.c#L1539-L1557
2026-09-14 06:45:03 -04:00
Clifford Yapp d71febe142 Looking like problem was more with our patch file - remove sb_patch.patch 2026-09-14 06:43:37 -04:00
Clifford Yapp fe4d95add4 Hit an issue with sb_patch - adjust patch file and correct sb_patch. (Need to submit the latter upstream) 2026-09-10 18:15:03 +00:00
Clifford Yapp 102f97cb07 Permit legacy double accessors in permissive mode
Keep strict parsing compliant with glTF 2.0 while allowing permissive readers to recover files containing the historical non-standard DOUBLE component type. Add coverage for both modes.
2026-09-10 16:53:49 +00:00
Clifford Yapp 10e3a01fce TinyGLTF v3 was a major change - make some adjustments to better set it up for BRL-CAD use. 2026-09-10 15:59:30 +00:00
Clifford Yapp b37d4565d1 Make a stab at producing consumable binary artifacts for BRL-CAD builds. 2026-09-10 15:59:30 +00:00
Clifford Yapp 921f0045a2 Fix GTE patch 2026-09-10 15:59:30 +00:00
Clifford Yapp c5d91b13a1 Match latest upstream sb patch 2026-09-10 11:54:41 -04:00
Clifford Yapp d73b1762a9 Update stepcode sha1 to latest 2026-09-10 13:58:02 +00:00
Clifford Yapp f6d3f346d8 Backport upstream fix for major/minor macros 2026-09-10 13:46:46 +00:00
Clifford Yapp 9788dcf2a6 Add bigobj for Eigen debug building on MSVC 2026-09-10 13:33:06 +00:00
Clifford Yapp 116746de32 Remove some more branch=RELEASE markers where we're switching to using tags 2026-09-09 15:55:50 -04:00
Clifford Yapp 990f4c3639 Update to osmesa upstream sha1 bfa90de 2026-09-09 15:52:29 -04:00
Clifford Yapp f26c88f95b Update opennurbs to v8.34.26223.11001 2026-09-09 15:50:32 -04:00
Clifford Yapp 8307051b6a Update manifold patching for v3.5.3 2026-09-09 19:50:07 +00:00
Clifford Yapp 6aa9c192ed Update Manifold to v3.5.3 tag 2026-09-09 15:07:30 -04:00
Clifford Yapp 0995755d56 Remove xmltools 2026-09-09 15:04:37 -04:00
Clifford Yapp 333b86b81c Update PoissonRecon to v18.75 2026-09-09 13:46:30 -04:00
Clifford Yapp 4adc14081a Update GeometricTools to v8.2 tag 2026-09-09 13:42:21 -04:00
Clifford Yapp 7c25d80e2b Update Clipper2 to v1.5.4 2026-09-09 13:30:42 -04:00
Clifford Yapp 159e6213df Update OpenCV to v5.0.0 2026-09-09 13:25:22 -04:00
Clifford Yapp fd118bd1cf Update to pugixml v1.16 2026-09-09 12:57:19 -04:00
Clifford Yapp 8ac868da8b Update to tinygltf v3.0.1 2026-09-09 12:52:05 -04:00
Clifford Yapp 3b88d2086f Update GDAL to v3.13.3 2026-09-09 12:39:40 -04:00
Clifford Yapp 9b7024becb Update to PROJ v9.8.1 2026-09-09 11:59:14 -04:00
Clifford Yapp b0f9221dca Update to sqlite3 v3.53.4 2026-09-09 11:56:23 -04:00
Clifford Yapp d854219aa9 Switching to using tags rather than RELEASE branch for most cases 2026-09-09 11:54:11 -04:00
Clifford Yapp 056188d31e Update to oneTBB v2023.1.0 2026-09-09 11:47:56 -04:00
Clifford Yapp b466277ae9 Update Eigen to v5.0.1 2026-09-09 11:44:00 -04:00
Clifford Yapp 8c63fe7dcd Update LMDB to v1.0.1 2026-09-09 11:30:17 -04:00
Clifford Yapp 4d8cc8d980 Update to libtiff v4.7.2 2026-09-09 11:27:27 -04:00
Clifford Yapp 9a909d5e9d Update libpng to v1.6.58 2026-09-09 11:23:28 -04:00
Clifford Yapp 6bc1e3c838 Update libjpeg-turbo to v3.2.0 2026-09-09 11:21:22 -04:00
Clifford Yapp a0d2801f64 Update zlib to v1.3.2 2026-09-09 15:12:08 +00:00
Clifford Yapp ac076a890d Update to netpbm v10.86.50 2026-09-09 11:08:08 -04:00
Clifford Yapp f89ea26a1b Been using plief for a while - remove patchelf fallback 2026-09-09 10:05:01 -04:00
Clifford Yapp be80be1a24 Update LIEF to upstream tag v1.0.0 2026-09-09 10:03:24 -04:00
Clifford Yapp 0c0db6e986 Remove xmltools (we've switched off of docbook) 2026-09-09 09:56:10 -04:00
Clifford Yapp 4fca55f381 Update re2c to v4.6 2026-09-09 09:50:17 -04:00
Clifford Yapp c8f3497730 Update astyle to upstream tag v3.6.18 2026-09-09 09:26:08 -04:00
Clifford Yapp 7686500d1a Adjust Manifold handling of allocation failures
Release-mode allocation checks now throw std::bad_alloc, guard
byte-count overflow, and preserve storage ownership during failed
copies. Empty copy assignment also no longer leaves a dangling
allocation.
2026-09-06 00:31:41 -04:00
Clifford Yapp b9cebb4453 Add openvdb to DEPENDENCIES.md 2026-09-02 10:33:38 -04:00
Christopher Sean Morrison 679eb6fcd9 pass ZLIB_INCLUDE_DIR and ZLIB_LIBRARY forward so a system doesn't override ours 2026-09-01 07:58:03 -04:00
Christopher Sean Morrison 21ae7bea54 we need to find our zlib 2026-09-01 01:36:04 -04:00
Christopher Sean Morrison 0f6d38ec1a needs zlib 2026-09-01 01:36:04 -04:00
Christopher Sean Morrison 97d28467b8 switch from v13.0.0 tag to master since it's out of date with our tbb otherwise 2026-09-01 01:36:04 -04:00
Christopher Sean Morrison baddbbded1 enable openvdb for all the good things coming 2026-09-01 01:36:04 -04:00
Clifford Yapp 2db0665299 Get mmesh math fix 2026-08-31 19:24:41 +00:00
Clifford Yapp 82880179d2 Update DEPENDENCIES.md 2026-08-27 12:35:15 -04:00
Clifford Yapp e688399906 Tcl uses zlib and libpng 2026-08-26 19:20:12 +00:00
Clifford Yapp 462c1aa715 Adjust check for PLIEF being set 2026-08-25 14:02:25 +00:00
Clifford Yapp c5c2de9507 Add a finalization step to prepare bext for use by the BRL-CAD configure process
This is done to avoid every cold BRL-CAD configure staging process needing
to repeat the same (expensive) characterization and setup work.  Now it should
only need to do the parts specific to that build location.
2026-08-24 21:36:41 +00:00
Clifford Yapp 5771519119 Whoops - if manifold is libbg component enabled, clipper2 needs to be as well. 2026-08-21 12:04:47 -04:00
Clifford Yapp 99b39937c4 Add libbg to manifold components list 2026-08-21 09:47:31 -04:00
Clifford Yapp 6890172ba2 OpenNURBS wasn't handling some memory failures gracefully - need clean returns. 2026-08-21 08:16:20 -04:00
Christopher Sean Morrison 0f1eac972c turn off clang introspection tools 2026-08-16 00:00:04 -04:00
Christopher Sean Morrison 0d1da2084a move llvm about 20 deps earlier.
basically as early as possible so it's build can overlap with the other deps being compiled.  it needs zlib, which needs patch (and maybe m4/flex/bison).  this should cut the everything build down by 10-25%.
2026-08-15 23:25:23 -04:00
Christopher Sean Morrison bd388e91cf add a patch to skip runnning cat on windows, build failure 2026-08-12 13:33:35 -04:00
Christopher Sean Morrison dc99a85999 malformed, patch lines counts were off 2 2026-08-11 15:16:11 -04:00
Clifford Yapp f73f4a914a More Windows long string fixes 2026-08-07 19:18:17 +00:00
Clifford Yapp 29a10adaff Update stepcode to latest 2026-08-07 13:51:45 -04:00
Clifford Yapp d7bf07d0e6 Patches for stepcode + Clang 2026-08-07 14:47:35 +00:00
Clifford Yapp ad7aca815a oneTBB FreeBSD build adjustment 2026-08-06 14:58:25 +00:00
Clifford Yapp fda4fe0f17 Adjustments to OpenNURBS building 2026-08-06 14:22:02 +00:00
Christopher Sean Morrison 6f5ad5b668 expand the patch to mac builds also since latest libc++ there also needs it 2026-08-05 00:14:35 -04:00
143 changed files with 5348 additions and 10264 deletions
+1
View File
@@ -0,0 +1 @@
*.patch -whitespace
+214
View File
@@ -0,0 +1,214 @@
name: Binary dependencies
on:
push:
schedule:
- cron: '30 2 * * 3'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
env:
BEXT_ARCHIVE_RETENTION_DAYS: 90
jobs:
# Finalized package metadata retains its install prefix. runner.temp is
# stable between producer and consumer jobs on each pinned runner image.
linux_release:
name: Ubuntu GCC Release Build
runs-on: ubuntu-24.04
outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Setup - System
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
sudo apt-get clean
- name: Configure
run: cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON -DCMAKE_INSTALL_PREFIX="$RUNNER_TEMP/bext_output"
- name: Build
run: cmake --build build --parallel 2 --verbose
- name: Package dependency tree
if: github.ref == 'refs/heads/main'
shell: bash
env:
BEXT_CHANNEL: ubuntu-24.04-${{ runner.arch }}-release
working-directory: ${{ runner.temp }}/bext_output
run: |
test -d install
test -d noinstall
test -f bext-install-manifest.json
cmake -E tar cfz "$RUNNER_TEMP/bext-$BEXT_CHANNEL.tar.gz" --format=gnutar install noinstall bext-install-manifest.json
- name: Upload dependency tree
if: github.ref == 'refs/heads/main'
id: upload
uses: actions/upload-artifact@v4
with:
name: bext-ubuntu-24.04-${{ runner.arch }}-release-${{ github.sha }}
path: ${{ runner.temp }}/bext-ubuntu-24.04-${{ runner.arch }}-release.tar.gz
if-no-files-found: error
retention-days: ${{ env.BEXT_ARCHIVE_RETENTION_DAYS }}
compression-level: 0
windows_ninja_release:
name: MSVC - Ninja Release build
runs-on: windows-2025
outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Add github workspace to path
shell: pwsh
run: Add-Content -Path $env:GITHUB_PATH -Value $env:GITHUB_WORKSPACE
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
shell: pwsh
run: |
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Release -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DEXT_BUILD_VERBOSE=ON -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/bext_output"
# Ensure generated files are flushed before compilation begins.
Write-VolumeCache C
Write-VolumeCache D
- name: Build
shell: pwsh
run: cmake --build build --parallel 2 --verbose
- name: Package dependency tree
if: github.ref == 'refs/heads/main'
shell: bash
env:
BEXT_CHANNEL: windows-2025-${{ runner.arch }}-release
working-directory: ${{ runner.temp }}/bext_output
run: |
test -d install
test -d noinstall
test -f bext-install-manifest.json
cmake -E tar cfz "$RUNNER_TEMP/bext-$BEXT_CHANNEL.tar.gz" --format=gnutar install noinstall bext-install-manifest.json
- name: Upload dependency tree
if: github.ref == 'refs/heads/main'
id: upload
uses: actions/upload-artifact@v4
with:
name: bext-windows-2025-${{ runner.arch }}-release-${{ github.sha }}
path: ${{ runner.temp }}/bext-windows-2025-${{ runner.arch }}-release.tar.gz
if-no-files-found: error
retention-days: ${{ env.BEXT_ARCHIVE_RETENTION_DAYS }}
compression-level: 0
macos_release:
name: macOS Clang Release Build
runs-on: macos-14
outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Install Xquartz
run: brew install xquartz --cask
- name: Configure
env:
CC: clang
CXX: clang++
run: cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON -DCMAKE_INSTALL_PREFIX="$RUNNER_TEMP/bext_output"
- name: Build
run: cmake --build build --parallel 2 --verbose
- name: Package dependency tree
if: github.ref == 'refs/heads/main'
shell: bash
env:
BEXT_CHANNEL: macos-14-${{ runner.arch }}-release
working-directory: ${{ runner.temp }}/bext_output
run: |
test -d install
test -d noinstall
test -f bext-install-manifest.json
cmake -E tar cfz "$RUNNER_TEMP/bext-$BEXT_CHANNEL.tar.gz" --format=gnutar install noinstall bext-install-manifest.json
- name: Upload dependency tree
if: github.ref == 'refs/heads/main'
id: upload
uses: actions/upload-artifact@v4
with:
name: bext-macos-14-${{ runner.arch }}-release-${{ github.sha }}
path: ${{ runner.temp }}/bext-macos-14-${{ runner.arch }}-release.tar.gz
if-no-files-found: error
retention-days: ${{ env.BEXT_ARCHIVE_RETENTION_DAYS }}
compression-level: 0
publish:
name: Publish dependency set
if: github.ref == 'refs/heads/main'
needs: [linux_release, windows_ninja_release, macos_release]
runs-on: ubuntu-24.04
permissions:
actions: write
contents: read
steps:
- name: Record complete dependency set
run: echo "${{ github.sha }}" > "$RUNNER_TEMP/bext-production"
- name: Upload completion marker
id: marker
uses: actions/upload-artifact@v4
with:
name: bext-production-${{ github.sha }}
path: ${{ runner.temp }}/bext-production
if-no-files-found: error
retention-days: ${{ env.BEXT_ARCHIVE_RETENTION_DAYS }}
- name: Remove superseded dependency sets
shell: bash
env:
GH_TOKEN: ${{ github.token }}
CURRENT_ARTIFACT_IDS: ${{ needs.linux_release.outputs.artifact-id }},${{ needs.windows_ninja_release.outputs.artifact-id }},${{ needs.macos_release.outputs.artifact-id }},${{ steps.marker.outputs.artifact-id }}
run: |
set -euo pipefail
artifact_pattern='^bext-((ubuntu-24\.04|windows-2025|macos-14)-(X86|X64|ARM|ARM64)-release|production)-'
artifact_rows="$(gh api --paginate "repos/$GITHUB_REPOSITORY/actions/artifacts?per_page=100" --jq '.artifacts[] | [.id, .name] | @tsv')"
while IFS=$'\t' read -r artifact_id artifact_name; do
if [[ "$artifact_name" =~ $artifact_pattern && ",${CURRENT_ARTIFACT_IDS}," != *",${artifact_id},"* ]]; then
gh api --method DELETE "repos/$GITHUB_REPOSITORY/actions/artifacts/$artifact_id"
fi
done <<< "$artifact_rows"
+12 -110
View File
@@ -71,49 +71,6 @@ jobs:
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --preset ${{ matrix.preset }} -DGIT_SHALLOW_CLONE=ON -DEXT_BUILD_VERBOSE=ON
windows_ninja_release:
name: MSVC - Ninja Release build
runs-on: windows-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Add github workspace to path
# https://github.community/t/deprecated-add-path/136621
run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
shell: powershell
run: |
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DEXT_BUILD_VERBOSE=ON
# We do the following in order to help ensure files are "flushed"
# to disk before compilation is attempted
# https://superuser.com/a/1553374/1286142
powershell Write-VolumeCache C
powershell Write-VolumeCache D
- name: Build
shell: powershell
run: |
cd build; ninja -j2 -v
# TODO - if the loading isn't too extreme, it would be good to do a BRL-CAD
# build against the output of this...
# - name: Build - BRL-CAD
# run: |
# # TODO - figure out how to do this...
windows_ninja_debug:
name: MSVC - Ninja Debug build
runs-on: windows-latest
@@ -174,10 +131,15 @@ jobs:
# https://github.community/t/deprecated-add-path/136621
run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake -S . -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON
# We do the following in order to help ensure files are "flushed"
# to disk before compilation is attempted
@@ -188,7 +150,6 @@ jobs:
- name: Build
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake --build build --config Release -j2
windows_std_tools_debug:
@@ -207,10 +168,15 @@ jobs:
# https://github.community/t/deprecated-add-path/136621
run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake -S . -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Debug -DEXT_BUILD_VERBOSE=ON
# We do the following in order to help ensure files are "flushed"
# to disk before compilation is attempted
@@ -221,45 +187,9 @@ jobs:
- name: Build
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake --build build --config Debug -j2
linux_release:
name: Ubuntu GCC Release Build
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Setup - System
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
sudo apt-get clean
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build && ninja -j2 -v
linux_debug:
name: Ubuntu GCC Debug Build
runs-on: ubuntu-latest
@@ -297,34 +227,6 @@ jobs:
cd build && ninja -j2 -v
osx_release:
name: macOS Clang Release Build
runs-on: macos-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Install Xquartz
run: |
brew install xquartz --cask
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
export CC=clang
export CXX=clang++
cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build && ninja -j2 -v
osx_debug:
name: macOS Clang Debug Build
runs-on: macos-latest
+6 -21
View File
@@ -11,7 +11,6 @@
[submodule "lief/LIEF"]
path = lief/LIEF
url = https://github.com/BRL-CAD/LIEF
branch = RELEASE
ignore = dirty
shallow = true
[submodule "lemon/lemon"]
@@ -22,7 +21,6 @@
[submodule "re2c/re2c"]
path = re2c/re2c
url = https://github.com/BRL-CAD/re2c
branch = RELEASE
ignore = dirty
shallow = true
[submodule "perplex/perplex"]
@@ -40,11 +38,6 @@
url = https://github.com/BRL-CAD/strclear
ignore = dirty
shallow = true
[submodule "xmltools/xmltools"]
path = xmltools/xmltools
url = https://github.com/BRL-CAD/xmltools
ignore = dirty
shallow = true
[submodule "zlib/zlib"]
path = zlib/zlib
url = https://github.com/BRL-CAD/zlib
@@ -53,7 +46,6 @@
[submodule "png/libpng"]
path = png/libpng
url = https://github.com/BRL-CAD/libpng
branch = RELEASE
ignore = dirty
shallow = true
[submodule "netpbm/netpbm"]
@@ -70,13 +62,11 @@
[submodule "lmdb/lmdb"]
path = lmdb/lmdb
url = https://github.com/BRL-CAD/lmdb
branch = RELEASE
ignore = dirty
shallow = true
[submodule "eigen/eigen"]
path = eigen/eigen
url = https://github.com/BRL-CAD/eigen
branch = RELEASE
ignore = dirty
shallow = true
[submodule "stepcode/stepcode"]
@@ -93,13 +83,11 @@
[submodule "proj/PROJ"]
path = proj/PROJ
url = https://github.com/BRL-CAD/PROJ
branch = RELEASE
ignore = dirty
shallow = true
[submodule "gdal/gdal"]
path = gdal/gdal
url = https://github.com/BRL-CAD/gdal
branch = RELEASE
ignore = dirty
shallow = true
[submodule "assetimport/assimp"]
@@ -111,13 +99,17 @@
[submodule "opencv/opencv"]
path = opencv/opencv
url = https://github.com/BRL-CAD/opencv
branch = RELEASE
ignore = dirty
shallow = true
[submodule "opennurbs/opennurbs"]
path = opennurbs/opennurbs
url = https://github.com/BRL-CAD/opennurbs
branch = RELEASE
ignore = dirty
shallow = true
[submodule "openvdb/openvdb"]
path = openvdb/openvdb
url = https://github.com/BRL-CAD/openvdb
branch = master
ignore = dirty
shallow = true
[submodule "osmesa/osmesa"]
@@ -243,19 +235,16 @@
[submodule "jpeg/libjpeg-turbo"]
path = jpeg/libjpeg-turbo
url = https://github.com/BRL-CAD/libjpeg-turbo
branch = RELEASE
ignore = dirty
shallow = true
[submodule "tiff/libtiff"]
path = tiff/libtiff
url = https://github.com/BRL-CAD/libtiff
branch = RELEASE
ignore = dirty
shallow = true
[submodule "onetbb/oneTBB"]
path = onetbb/oneTBB
url = https://github.com/BRL-CAD/oneTBB
branch = RELEASE
ignore = dirty
shallow = true
[submodule "llvm/llvm-project"]
@@ -338,7 +327,6 @@
[submodule "manifold/manifold"]
path = manifold/manifold
url = https://github.com/BRL-CAD/manifold.git
branch = RELEASE
ignore = dirty
shallow = true
[submodule "appleseed/appleseed"]
@@ -359,19 +347,16 @@
[submodule "clipper2/Clipper2"]
path = clipper2/Clipper2
url = https://github.com/BRL-CAD/Clipper2.git
branch = RELEASE
ignore = dirty
shallow = true
[submodule "tinygltf/tinygltf"]
path = tinygltf/tinygltf
url = https://github.com/BRL-CAD/tinygltf.git
branch = release
ignore = dirty
shallow = true
[submodule "poissonrecon/PoissonRecon"]
path = poissonrecon/PoissonRecon
url = https://github.com/BRL-CAD/PoissonRecon
branch = RELEASE
ignore = dirty
shallow = true
[submodule "bullet/bullet3"]
+3
View File
@@ -78,6 +78,9 @@ if (GIT_SHALLOW_CLONE)
list(APPEND git_args --recommend-shallow)
endif (GIT_SHALLOW_CLONE)
list(APPEND git_args -- ${project_paths})
if (WIN32)
list(PREPEND git_args -c core.longpaths=true)
endif (WIN32)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${git_args}
+451
View File
@@ -0,0 +1,451 @@
# Finalize the bundled bext output and publish its file-processing manifest.
foreach(required_var
BEXT_INSTALL_ROOT
BEXT_MANIFEST
BEXT_SOURCE_ROOT
BEXT_BINARY_ROOT
BEXT_NOINSTALL_ROOT
BEXT_STRCLEAR
BEXT_SYSTEM_NAME
BIN_DIR
LIB_DIR)
if (NOT DEFINED ${required_var} OR "${${required_var}}" STREQUAL "")
message(FATAL_ERROR "${required_var} is required")
endif ()
endforeach()
function(bext_json_escape outvar value)
set(escaped "${value}")
string(REPLACE "\\" "\\\\" escaped "${escaped}")
string(REPLACE "\"" "\\\"" escaped "${escaped}")
string(REPLACE "\r" "\\r" escaped "${escaped}")
string(REPLACE "\n" "\\n" escaped "${escaped}")
set(${outvar} "${escaped}" PARENT_SCOPE)
endfunction()
function(bext_write_json_array manifest key values)
file(APPEND "${manifest}" " \"${key}\": [\n")
set(first TRUE)
foreach(value ${${values}})
bext_json_escape(escaped "${value}")
if (first)
set(first FALSE)
else ()
file(APPEND "${manifest}" ",\n")
endif ()
file(APPEND "${manifest}" " \"${escaped}\"")
endforeach()
file(APPEND "${manifest}" "\n ]")
endfunction()
function(bext_write_file_list outvar filename values)
file(WRITE "${filename}" "")
foreach(value ${${values}})
file(APPEND "${filename}" "${value}\n")
endforeach()
set(${outvar} "${filename}" PARENT_SCOPE)
endfunction()
function(bext_content_fingerprints outvar root label file_list_var)
set(records "")
foreach(relative IN LISTS ${file_list_var})
set(path "${root}/${relative}")
if (IS_SYMLINK "${path}")
file(READ_SYMLINK "${path}" value)
string(APPEND records "L ${label}/${relative} ${value}\n")
else ()
file(SHA256 "${path}" value)
string(APPEND records "F ${label}/${relative} ${value}\n")
endif ()
endforeach()
set(${outvar} "${records}" PARENT_SCOPE)
endfunction()
function(bext_relative_path outvar path)
file(RELATIVE_PATH relative "${BEXT_INSTALL_ROOT}" "${path}")
string(REPLACE "\\" "/" relative "${relative}")
set(${outvar} "${relative}" PARENT_SCOPE)
endfunction()
function(bext_is_skipped path outvar)
if ("${path}" MATCHES "(^|/)(encodings|include|man|msgs)(/|$)")
set(${outvar} TRUE PARENT_SCOPE)
else ()
set(${outvar} FALSE PARENT_SCOPE)
endif ()
endfunction()
function(bext_is_cmake_file path outvar)
if ("${path}" MATCHES "(Deps|Modules|Version|Targets|Config)\\.cmake$" OR
"${path}" MATCHES "\\.pc$")
set(${outvar} TRUE PARENT_SCOPE)
else ()
set(${outvar} FALSE PARENT_SCOPE)
endif ()
endfunction()
function(bext_run_binary_clear files)
if (NOT files)
return()
endif ()
set(clear_targets
"${BEXT_SOURCE_ROOT}"
"${BEXT_BINARY_ROOT}"
"${BEXT_NOINSTALL_ROOT}"
"${BEXT_INSTALL_ROOT}"
)
set(file_list "${BEXT_BINARY_ROOT}/CMakeFiles/bext-binary-files.txt")
bext_write_file_list(file_list "${file_list}" files)
set(command "${BEXT_STRCLEAR}" -p -b -c --files "${file_list}")
list(APPEND command ${clear_targets})
execute_process(
COMMAND ${command}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "strclear binary cleanup failed: ${error}${output}")
endif ()
endfunction()
function(bext_run_rpath_update files)
if (NOT files OR NOT BEXT_PLIEF)
return()
endif ()
execute_process(
COMMAND "${BEXT_PLIEF}" --help
RESULT_VARIABLE help_result
OUTPUT_VARIABLE help_output
ERROR_QUIET
)
if (NOT help_result EQUAL 0)
message(FATAL_ERROR "Unable to query ${BEXT_PLIEF}")
endif ()
set(rpath_args --set-rpath "${BEXT_INSTALL_ROOT}/${LIB_DIR}")
if ("${help_output}" MATCHES "--set-rpath-if-needed")
list(APPEND rpath_args
--set-rpath-if-needed
--stale-rpath-prefix "${BEXT_INSTALL_ROOT}"
--stale-rpath-prefix "${BEXT_BINARY_ROOT}"
)
if ("${help_output}" MATCHES "--set-rpath-if-needed-prepend")
list(APPEND rpath_args --set-rpath-if-needed-prepend)
endif ()
endif ()
if ("${help_output}" MATCHES "--files")
set(file_list "${BEXT_BINARY_ROOT}/CMakeFiles/bext-rpath-files.txt")
bext_write_file_list(file_list "${file_list}" files)
execute_process(
COMMAND "${BEXT_PLIEF}" ${rpath_args} --files "${file_list}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "RPATH update failed: ${error}${output}")
endif ()
else ()
foreach(file ${files})
execute_process(
COMMAND "${BEXT_PLIEF}" ${rpath_args} "${file}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "RPATH update failed for ${file}: ${error}${output}")
endif ()
endforeach()
endif ()
endfunction()
function(bext_run_text_replace files target replacement)
if (NOT files OR "${target}" STREQUAL "")
return()
endif ()
set(text_paths)
foreach(relative ${files})
list(APPEND text_paths "${BEXT_INSTALL_ROOT}/${relative}")
endforeach()
set(file_list "${BEXT_BINARY_ROOT}/CMakeFiles/bext-text-files.txt")
bext_write_file_list(file_list "${file_list}" text_paths)
execute_process(
COMMAND "${BEXT_STRCLEAR}" -p --files "${file_list}" "${target}" "${replacement}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "strclear text replacement failed for ${target}: ${error}${output}")
endif ()
endfunction()
file(MAKE_DIRECTORY "${BEXT_BINARY_ROOT}/CMakeFiles")
file(GLOB_RECURSE installed_files
LIST_DIRECTORIES false
RELATIVE "${BEXT_INSTALL_ROOT}"
"${BEXT_INSTALL_ROOT}/*"
)
list(SORT installed_files)
set(classify_files)
set(skipped_files)
foreach(relative ${installed_files})
set(path "${BEXT_INSTALL_ROOT}/${relative}")
if (IS_SYMLINK "${path}")
list(APPEND skipped_files "${relative}")
continue()
endif ()
bext_is_skipped("${relative}" skipped)
if (skipped)
list(APPEND skipped_files "${relative}")
else ()
list(APPEND classify_files "${path}")
endif ()
endforeach()
set(text_files)
set(binary_probe_files)
if (classify_files)
execute_process(
COMMAND "${BEXT_STRCLEAR}" --help
RESULT_VARIABLE strclear_help_result
OUTPUT_VARIABLE strclear_help
ERROR_QUIET
)
if (NOT strclear_help_result EQUAL 0)
message(FATAL_ERROR "Unable to query ${BEXT_STRCLEAR}")
endif ()
if ("${strclear_help}" MATCHES "--classify" AND "${strclear_help}" MATCHES "--files")
set(classify_list "${BEXT_BINARY_ROOT}/CMakeFiles/bext-classify-files.txt")
bext_write_file_list(classify_list "${classify_list}" classify_files)
execute_process(
COMMAND "${BEXT_STRCLEAR}" --classify --files "${classify_list}"
RESULT_VARIABLE classify_result
OUTPUT_VARIABLE classify_output
ERROR_VARIABLE classify_error
)
if (NOT classify_result EQUAL 0)
message(FATAL_ERROR "strclear classification failed: ${classify_error}${classify_output}")
endif ()
string(REPLACE "\r\n" "\n" classify_output "${classify_output}")
string(REPLACE "\n" ";" classify_records "${classify_output}")
foreach(record ${classify_records})
if ("${record}" STREQUAL "")
continue()
endif ()
string(JSON type ERROR_VARIABLE json_error GET "${record}" type)
string(JSON path ERROR_VARIABLE path_error GET "${record}" path)
if (NOT "${json_error}" STREQUAL "NOTFOUND" OR NOT "${path_error}" STREQUAL "NOTFOUND")
message(FATAL_ERROR "Invalid strclear classification record: ${record}")
endif ()
bext_relative_path(relative "${path}")
if ("${type}" STREQUAL "TEXT")
list(APPEND text_files "${relative}")
elseif ("${type}" STREQUAL "BINARY")
list(APPEND binary_probe_files "${relative}")
else ()
message(FATAL_ERROR "Unknown strclear classification: ${type}")
endif ()
endforeach()
else ()
foreach(path ${classify_files})
execute_process(
COMMAND "${BEXT_STRCLEAR}" -B "${path}"
RESULT_VARIABLE binary_result
ERROR_QUIET
)
bext_relative_path(relative "${path}")
if (binary_result EQUAL 0)
list(APPEND binary_probe_files "${relative}")
elseif (binary_result EQUAL 1)
list(APPEND text_files "${relative}")
else ()
message(FATAL_ERROR "strclear could not classify ${path}")
endif ()
endforeach()
endif ()
endif ()
set(rpath_files)
set(binary_files)
if (binary_probe_files)
if (BEXT_PLIEF)
execute_process(
COMMAND "${BEXT_PLIEF}" --help
RESULT_VARIABLE plief_help_result
OUTPUT_VARIABLE plief_help
ERROR_QUIET
)
else ()
set(plief_help_result 1)
endif ()
if (plief_help_result EQUAL 0 AND "${plief_help}" MATCHES "--classify" AND "${plief_help}" MATCHES "--files")
set(plief_list "${BEXT_BINARY_ROOT}/CMakeFiles/bext-plief-files.txt")
set(plief_paths)
foreach(relative ${binary_probe_files})
list(APPEND plief_paths "${BEXT_INSTALL_ROOT}/${relative}")
endforeach()
bext_write_file_list(plief_list "${plief_list}" plief_paths)
execute_process(
COMMAND "${BEXT_PLIEF}" --classify --files "${plief_list}"
RESULT_VARIABLE plief_result
OUTPUT_VARIABLE plief_output
ERROR_VARIABLE plief_error
)
if (NOT plief_result EQUAL 0)
message(FATAL_ERROR "plief classification failed: ${plief_error}${plief_output}")
endif ()
string(REPLACE "\r\n" "\n" plief_output "${plief_output}")
string(REPLACE "\n" ";" plief_records "${plief_output}")
foreach(record ${plief_records})
if ("${record}" STREQUAL "")
continue()
endif ()
string(JSON type ERROR_VARIABLE json_error GET "${record}" type)
string(JSON path ERROR_VARIABLE path_error GET "${record}" path)
if (NOT "${json_error}" STREQUAL "NOTFOUND" OR NOT "${path_error}" STREQUAL "NOTFOUND")
message(FATAL_ERROR "Invalid plief classification record: ${record}")
endif ()
bext_relative_path(relative "${path}")
if ("${type}" STREQUAL "ELF")
list(APPEND rpath_files "${relative}")
elseif ("${type}" STREQUAL "OTHER")
list(APPEND binary_files "${relative}")
else ()
message(FATAL_ERROR "Unknown plief classification: ${type}")
endif ()
endforeach()
else ()
if ("${BEXT_SYSTEM_NAME}" STREQUAL "Darwin")
foreach(relative ${binary_probe_files})
execute_process(
COMMAND otool -l "${BEXT_INSTALL_ROOT}/${relative}"
RESULT_VARIABLE otool_result
OUTPUT_VARIABLE otool_output
ERROR_QUIET
)
if (otool_result EQUAL 0 AND
NOT "${otool_output}" MATCHES "Archive|not an object")
list(APPEND rpath_files "${relative}")
else ()
list(APPEND binary_files "${relative}")
endif ()
endforeach()
else ()
list(APPEND binary_files ${binary_probe_files})
endif ()
endif ()
else ()
set(plief_help_result 1)
endif ()
list(SORT text_files)
list(SORT rpath_files)
list(SORT binary_files)
set(cmake_files)
set(plain_text_files)
foreach(relative ${text_files})
bext_is_cmake_file("${relative}" is_cmake)
if (is_cmake)
list(APPEND cmake_files "${relative}")
else ()
list(APPEND plain_text_files "${relative}")
endif ()
endforeach()
list(SORT cmake_files)
list(SORT plain_text_files)
# Replace paths that only have meaning while bext is being built. Keep the
# install prefix intact: downstream projects replace this canonical prefix
# with their own staging prefix after copying the finalized tree.
set(text_paths ${text_files})
foreach(clear_target
"${BEXT_SOURCE_ROOT}"
"${BEXT_BINARY_ROOT}"
"${BEXT_NOINSTALL_ROOT}")
bext_run_text_replace("${text_paths}" "${clear_target}" "${BEXT_INSTALL_ROOT}")
endforeach()
# Clear paths before restoring the canonical bext RPATH. Clearing the install
# root after the RPATH update would also clear the newly written RPATH.
set(all_binary_files ${rpath_files} ${binary_files})
set(binary_paths)
set(rpath_paths)
foreach(relative ${all_binary_files})
list(APPEND binary_paths "${BEXT_INSTALL_ROOT}/${relative}")
endforeach()
foreach(relative ${rpath_files})
list(APPEND rpath_paths "${BEXT_INSTALL_ROOT}/${relative}")
endforeach()
set(binary_cleanup_paths ${binary_paths})
if ("${BEXT_SYSTEM_NAME}" STREQUAL "Darwin" AND
NOT BEXT_PLIEF)
# Without plief, preserve Mach-O RPATH load commands for BRL-CAD's
# install_name_tool staging pass.
set(binary_cleanup_paths)
foreach(relative ${binary_files})
list(APPEND binary_cleanup_paths "${BEXT_INSTALL_ROOT}/${relative}")
endforeach()
endif ()
bext_run_binary_clear("${binary_cleanup_paths}")
bext_run_rpath_update("${rpath_paths}")
file(WRITE "${BEXT_MANIFEST}.tmp" "{\n")
file(APPEND "${BEXT_MANIFEST}.tmp" " \"schema\": 1,\n")
bext_json_escape(platform "${BEXT_SYSTEM_NAME}")
file(APPEND "${BEXT_MANIFEST}.tmp" " \"platform\": \"${platform}\",\n")
file(APPEND "${BEXT_MANIFEST}.tmp" " \"install_root\": \"install\",\n")
file(APPEND "${BEXT_MANIFEST}.tmp" " \"generated_by\": \"bext\",\n")
bext_write_json_array("${BEXT_MANIFEST}.tmp" "files" installed_files)
file(APPEND "${BEXT_MANIFEST}.tmp" ",\n")
bext_write_json_array("${BEXT_MANIFEST}.tmp" "rpath" rpath_files)
file(APPEND "${BEXT_MANIFEST}.tmp" ",\n")
bext_write_json_array("${BEXT_MANIFEST}.tmp" "binary" binary_files)
file(APPEND "${BEXT_MANIFEST}.tmp" ",\n")
bext_write_json_array("${BEXT_MANIFEST}.tmp" "cmake" cmake_files)
file(APPEND "${BEXT_MANIFEST}.tmp" ",\n")
bext_write_json_array("${BEXT_MANIFEST}.tmp" "text" plain_text_files)
file(APPEND "${BEXT_MANIFEST}.tmp" "\n}\n")
file(COPY_FILE "${BEXT_MANIFEST}.tmp" "${BEXT_MANIFEST}" ONLY_IF_DIFFERENT)
file(REMOVE "${BEXT_MANIFEST}.tmp")
# Existing files are watched by downstream builds. This list also detects
# additions and removals without changing its timestamp on a no-op build.
file(GLOB_RECURSE noinstall_files
LIST_DIRECTORIES false
RELATIVE "${BEXT_NOINSTALL_ROOT}"
"${BEXT_NOINSTALL_ROOT}/*"
)
list(REMOVE_ITEM noinstall_files "build-stamp")
list(SORT noinstall_files)
set(noinstall_inventory "${BEXT_BINARY_ROOT}/CMakeFiles/bext-noinstall-files.txt")
bext_write_file_list(noinstall_inventory "${noinstall_inventory}" noinstall_files)
file(COPY_FILE "${noinstall_inventory}" "${BEXT_NOINSTALL_ROOT}/build-stamp"
ONLY_IF_DIFFERENT)
# Finalized binaries and config files may be rewritten on every install even
# when their resulting bytes are unchanged. Publish one stable dependency for
# downstream builds instead of making them watch every output timestamp.
bext_content_fingerprints(installed_content "${BEXT_INSTALL_ROOT}" "install"
installed_files)
bext_content_fingerprints(noinstall_content "${BEXT_NOINSTALL_ROOT}" "noinstall"
noinstall_files)
file(SHA256 "${BEXT_MANIFEST}" manifest_digest)
string(SHA256 content_digest
"${installed_content}${noinstall_content}M ${manifest_digest}\n")
set(content_stamp "${BEXT_BINARY_ROOT}/bext-content-stamp")
file(WRITE "${content_stamp}.tmp" "${content_digest}\n")
file(COPY_FILE "${content_stamp}.tmp" "${content_stamp}" ONLY_IF_DIFFERENT)
file(REMOVE "${content_stamp}.tmp")
message(STATUS "Generated bext install manifest: ${BEXT_MANIFEST}")
-117
View File
@@ -1,117 +0,0 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindITCL
--------
This module finds if Itcl is installed and determines where the include
files and libraries are. It also determines what the name of the
library is. This code sets the following variables:
::
ITCL_FOUND = Itcl was found
ITCL_LIBRARY = path to Itcl library (tcl tcl80)
ITCL_INCLUDE_PATH = path to where itcl.h can be found
ITCL_STUB_LIBRARY = path to Itcl stub library
#]=======================================================================]
set(_ITCL_SEARCHES)
# Search ITCL_ROOT first if it is set.
if(ITCL_ROOT)
set(_ITCL_SEARCH_ROOT PATHS ${ITCL_ROOT} NO_DEFAULT_PATH)
list(APPEND _ITCL_SEARCHES _ITCL_SEARCH_ROOT)
endif()
set(ITCL_POSSIBLE_LIB_PATH_SUFFIXES
lib
lib/itcl
lib/itcl3.4
itcl
itcl3.4
)
set(ITCL_POSSIBLE_LIB_NAMES
itcl
itcl3
itcl3.4
)
if(NOT ITCL_LIBRARY)
foreach(search ${_ITCL_SEARCHES})
find_library(ITCL_LIBRARY
NAMES ${ITCL_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${ITCL_POSSIBLE_LIB_PATH_SUFFIXES})
endforeach()
endif()
if(NOT ITCL_LIBRARY)
find_library(ITCL_LIBRARY
NAMES ${ITCL_POSSIBLE_LIB_NAMES}
PATH_SUFFIXES ${ITCL_POSSIBLE_LIB_PATH_SUFFIXES}
)
endif(NOT ITCL_LIBRARY)
set(ITCLSTUB_POSSIBLE_LIB_NAMES
itclstub
itclstub3
itclstub3.4
)
if(NOT ITCL_STUB_LIBRARY)
foreach(search ${_ITCL_SEARCHES})
find_library(ITCL_STUB_LIBRARY
NAMES ${ITCLSTUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${ITCL_POSSIBLE_LIB_PATH_SUFFIXES}
)
endforeach()
endif()
if(NOT ITCL_STUB_LIBRARY)
find_library(ITCL_STUB_LIBRARY
NAMES ${ITCLSTUB_POSSIBLE_LIB_NAMES}
PATH_SUFFIXES ${ITCL_POSSIBLE_LIB_PATH_SUFFIXES}
)
endif()
set(ITCL_POSSIBLE_INCLUDE_PATH_SUFFIXES
include
include/itcl
include/itcl3
include/itcl3.4
)
foreach(search ${_ITCL_SEARCHES})
find_path(ITCL_INCLUDE_PATH
NAMES itcl.h ${${search}}
PATH_SUFFIXES ${ITCL_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
endforeach()
if (NOT ITCL_INCLUDE_PATH)
find_path(ITCL_INCLUDE_PATH
NAMES itcl.h
HINTS ${ITCL_POSSIBLE_INCLUDE_PATHS}
)
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ITCL
REQUIRED_VARS ITCL_LIBRARY ITCL_STUB_LIBRARY ITCL_INCLUDE_PATH
)
mark_as_advanced(
ITCL_INCLUDE_PATH
ITCL_LIBRARY
ITCL_STUB_LIBRARY
)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+175 -5
View File
@@ -4,22 +4,69 @@ if (NOT DEFINED BEXT_PATCH_NATIVE_EXECUTABLE OR NOT BEXT_PATCH_NATIVE_EXECUTABLE
message(FATAL_ERROR "BEXT_PATCH_NATIVE_EXECUTABLE is not defined")
endif()
if (NOT DEFINED BEXT_PATCH_CHECK_OPTION OR NOT BEXT_PATCH_CHECK_OPTION)
set(BEXT_PATCH_CHECK_OPTION "--dry-run")
endif()
set(patch_args)
set(seen_separator FALSE)
set(has_forward_flag FALSE)
set(has_reverse_flag FALSE)
set(has_noninteractive_flag FALSE)
set(has_check_flag FALSE)
set(has_input_file FALSE)
set(has_reject_file FALSE)
set(expect_input_file FALSE)
set(expect_reject_file FALSE)
set(input_file "")
math(EXPR last_arg "${CMAKE_ARGC} - 1")
foreach(arg_index RANGE 0 ${last_arg})
set(arg "${CMAKE_ARGV${arg_index}}")
if (seen_separator)
list(APPEND patch_args "${arg}")
# Some platform patch tools accept -p1 while others require -p 1.
# Normalize the compact form once here for every wrapped invocation.
if (arg MATCHES "^-p([0-9]+)$")
list(APPEND patch_args "-p" "${CMAKE_MATCH_1}")
else()
list(APPEND patch_args "${arg}")
endif()
if (expect_input_file)
set(input_file "${arg}")
set(expect_input_file FALSE)
elseif (expect_reject_file)
set(expect_reject_file FALSE)
elseif (arg STREQUAL "-i" OR arg STREQUAL "--input")
set(has_input_file TRUE)
set(expect_input_file TRUE)
elseif (arg MATCHES "^-i(.+)")
set(has_input_file TRUE)
set(input_file "${CMAKE_MATCH_1}")
elseif (arg MATCHES "^--input=(.+)")
set(has_input_file TRUE)
set(input_file "${CMAKE_MATCH_1}")
endif()
if (arg STREQUAL "-r" OR arg STREQUAL "--reject-file")
set(has_reject_file TRUE)
set(expect_reject_file TRUE)
elseif (arg MATCHES "^-r(.+)")
set(has_reject_file TRUE)
elseif (arg MATCHES "^--reject-file=(.+)")
set(has_reject_file TRUE)
endif()
if (arg STREQUAL "-N" OR arg STREQUAL "--forward")
set(has_forward_flag TRUE)
endif()
if (arg STREQUAL "-R" OR arg STREQUAL "--reverse")
set(has_reverse_flag TRUE)
endif()
if (arg STREQUAL "-f" OR arg STREQUAL "--force" OR
arg STREQUAL "-t" OR arg STREQUAL "--batch")
set(has_noninteractive_flag TRUE)
endif()
if (arg STREQUAL "-C" OR arg STREQUAL "--dry-run")
set(has_check_flag TRUE)
endif()
endif()
if (arg STREQUAL "--")
set(seen_separator TRUE)
@@ -34,6 +81,125 @@ if (NOT patch_args)
message(FATAL_ERROR "Patch wrapper did not receive any patch arguments")
endif()
if (expect_input_file)
message(FATAL_ERROR "Patch input option is missing its file path")
endif()
if (expect_reject_file)
message(FATAL_ERROR "Patch reject option is missing its file path")
endif()
set(reject_path "")
set(reject_log_path "")
if (input_file AND DEFINED BEXT_PATCH_REJECT_DIR AND
BEXT_PATCH_REJECT_DIR)
get_filename_component(patch_name "${input_file}" NAME)
get_filename_component(patch_context "${CMAKE_CURRENT_BINARY_DIR}" NAME)
string(REGEX REPLACE "[^A-Za-z0-9_.-]" "_" patch_context
"${patch_context}")
set(reject_path
"${BEXT_PATCH_REJECT_DIR}/${patch_context}-${patch_name}.rej")
set(reject_log_path "${reject_path}.log")
endif()
function(clear_reject_artifacts)
if (reject_path)
file(REMOVE "${reject_path}" "${reject_log_path}")
endif()
endfunction()
function(preserve_reject_artifacts)
if (NOT reject_path)
return()
endif()
# Keep a native reject file when patch emitted one. Applicability checks do
# not normally emit rejects, so fall back to preserving the full patch.
file(MAKE_DIRECTORY "${BEXT_PATCH_REJECT_DIR}")
if (EXISTS "${reject_path}")
file(SIZE "${reject_path}" reject_size)
else()
set(reject_size 0)
endif()
if (reject_size EQUAL 0)
configure_file("${input_file}" "${reject_path}" COPYONLY)
endif()
file(WRITE "${reject_log_path}"
"Patch file: ${input_file}\n"
"Working directory: ${CMAKE_CURRENT_BINARY_DIR}\n\n"
"${patch_failure_output}")
message(STATUS
"Saved failed patch and diagnostics to ${reject_path} and "
"${reject_log_path}")
endfunction()
clear_reject_artifacts()
if (reject_path AND NOT has_reject_file)
list(APPEND patch_args "-r" "${reject_path}")
endif()
# Patch commands run during configure/build steps cannot consult a user. The
# short -t form is accepted by the bundled and supported Unix patch tools.
# Preserve an explicit --force/-f choice if a caller has made one.
if (NOT has_noninteractive_flag)
list(PREPEND patch_args "-t")
endif()
# Preflight file-based patches so a bad patch cannot leave a source tree half
# modified. Stdin cannot be preflighted because it cannot be replayed for the
# real invocation.
if (has_input_file AND NOT has_check_flag)
set(forward_check_args ${patch_args})
list(PREPEND forward_check_args "${BEXT_PATCH_CHECK_OPTION}")
execute_process(
COMMAND "${BEXT_PATCH_NATIVE_EXECUTABLE}" ${forward_check_args}
RESULT_VARIABLE forward_check_result
OUTPUT_VARIABLE forward_check_stdout
ERROR_VARIABLE forward_check_stderr
)
if (NOT forward_check_result EQUAL 0)
if (forward_check_result EQUAL 1 AND has_forward_flag AND
NOT has_reverse_flag)
set(reverse_check_args)
foreach(arg IN LISTS patch_args)
if (arg STREQUAL "-N" OR arg STREQUAL "--forward")
continue()
endif()
list(APPEND reverse_check_args "${arg}")
endforeach()
list(PREPEND reverse_check_args "${BEXT_PATCH_CHECK_OPTION}" "-R")
execute_process(
COMMAND "${BEXT_PATCH_NATIVE_EXECUTABLE}" ${reverse_check_args}
RESULT_VARIABLE reverse_result
OUTPUT_QUIET
ERROR_QUIET
)
if (reverse_result EQUAL 0)
clear_reject_artifacts()
message(STATUS
"Patch already applied or reversed; continuing because -N/--forward was requested."
)
return()
endif()
endif()
set(patch_failure_output
"${forward_check_stdout}${forward_check_stderr}")
preserve_reject_artifacts()
if (forward_check_stdout)
message("${forward_check_stdout}")
endif()
if (forward_check_stderr)
message("${forward_check_stderr}")
endif()
message(FATAL_ERROR
"Patch preflight failed with exit code ${forward_check_result}"
)
endif()
endif()
execute_process(
COMMAND "${BEXT_PATCH_NATIVE_EXECUTABLE}" ${patch_args}
RESULT_VARIABLE patch_result
@@ -44,27 +210,29 @@ execute_process(
)
if (patch_result EQUAL 0)
clear_reject_artifacts()
return()
endif()
if (patch_result EQUAL 1 AND has_forward_flag AND NOT has_reverse_flag)
set(reverse_dry_run_args)
set(reverse_check_args)
foreach(arg IN LISTS patch_args)
if (arg STREQUAL "-N" OR arg STREQUAL "--forward")
continue()
endif()
list(APPEND reverse_dry_run_args "${arg}")
list(APPEND reverse_check_args "${arg}")
endforeach()
list(PREPEND reverse_dry_run_args "--dry-run" "-R")
list(PREPEND reverse_check_args "${BEXT_PATCH_CHECK_OPTION}" "-R")
execute_process(
COMMAND "${BEXT_PATCH_NATIVE_EXECUTABLE}" ${reverse_dry_run_args}
COMMAND "${BEXT_PATCH_NATIVE_EXECUTABLE}" ${reverse_check_args}
RESULT_VARIABLE reverse_result
OUTPUT_QUIET
ERROR_QUIET
)
if (reverse_result EQUAL 0)
clear_reject_artifacts()
execute_process(
COMMAND ${CMAKE_COMMAND} -E echo
"Patch already applied or reversed; continuing because -N/--forward was requested."
@@ -73,4 +241,6 @@ if (patch_result EQUAL 1 AND has_forward_flag AND NOT has_reverse_flag)
endif()
endif()
set(patch_failure_output "${patch_stdout}${patch_stderr}")
preserve_reject_artifacts()
message(FATAL_ERROR "Patch command failed with exit code ${patch_result}")
+15 -11
View File
@@ -107,17 +107,21 @@ function(git_submodule_init path checkfile)
if (NOT GIT_EXECUTABLE)
message(FATAL_ERROR "Need to populate Git submodule, but unable to find git executable")
endif (NOT GIT_EXECUTABLE)
if (NOT GIT_SHALLOW_CLONE)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive ${path}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else (NOT GIT_SHALLOW_CLONE)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --recommend-shallow ${path}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif (NOT GIT_SHALLOW_CLONE)
set(git_args submodule update --init --recursive)
if (GIT_SHALLOW_CLONE)
list(APPEND git_args --recommend-shallow)
endif (GIT_SHALLOW_CLONE)
if (WIN32)
list(PREPEND git_args -c core.longpaths=true)
endif (WIN32)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${git_args} ${path}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY
)
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${path}/${checkfile}")
message(FATAL_ERROR "Git submodule ${path} is missing ${checkfile} after checkout")
endif ()
execute_process(
COMMAND git log -1 --format=%H
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${path}
+102 -29
View File
@@ -200,8 +200,8 @@ include(ExternalProject)
# source patching or staging is needed.
# * Use a local URL when patching a submodule, so ExternalProject stages a
# build-tree copy before PATCH_COMMAND and other source modifications run.
# * A deliberate exception is a very large source tree such as Qt6, where the
# copy cost is significant and in-place patching/building is preferred.
# * A large source tree such as Qt6 is built in place when unmodified, but is
# staged when caller-supplied patches must be applied.
# Do not replace URL with SOURCE_DIR merely to avoid the local URL spelling;
# that can cause patches or generated-file changes to modify the checkout.
@@ -242,6 +242,12 @@ function(ExternalProject_Add name)
endif (ARGC GREATER 1)
string(APPEND ep_call ")")
cmake_language(EVAL CODE "${ep_call}")
if (TARGET ${name}-install)
get_property(_bext_install_targets GLOBAL PROPERTY BEXT_INSTALL_TARGETS)
list(APPEND _bext_install_targets ${name}-install)
list(REMOVE_DUPLICATES _bext_install_targets)
set_property(GLOBAL PROPERTY BEXT_INSTALL_TARGETS "${_bext_install_targets}")
endif (TARGET ${name}-install)
endfunction(ExternalProject_Add name)
# In case we need to pass some sort of reasonable parallel
@@ -271,11 +277,21 @@ if (NOT isMultiConfig)
set(BUILD_TYPE_SPECIFIER "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif (NOT isMultiConfig)
# With MSVC, some of the non-CMake subbuilds are going to need the vcvars bat
# file to set up the environment.
# With MSVC, some non-CMake subbuilds need the vcvars bat file to set up their
# environment. Always reinitialize the generated wrappers: a parent shell such
# as Git Bash can reorder PATH while leaving Visual Studio's environment markers
# intact. The wrappers also put the selected compiler's directory first so a
# POSIX utility named link cannot shadow MSVC's link.exe.
if(MSVC)
get_filename_component(COMPILER_DIR "${CMAKE_C_COMPILER}" DIRECTORY)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BEXT_MSVC_TARGET_ARCH x64)
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BEXT_MSVC_TARGET_ARCH x86)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
get_filename_component(BEXT_MSVC_COMPILER_BIN_DIR "${CMAKE_C_COMPILER}" DIRECTORY)
set(COMPILER_DIR "${BEXT_MSVC_COMPILER_BIN_DIR}")
get_filename_component(COMPILER_ROOT "${COMPILER_DIR}" NAME)
set(VCVARS_BAT "${COMPILER_DIR}/vcvars${COMPILER_ROOT}.bat")
if(NOT EXISTS "${VCVARS_BAT}")
@@ -285,11 +301,11 @@ if(MSVC)
get_filename_component(COMPILER_DIR "${COMPILER_DIR}" DIRECTORY)
endforeach(DIRS RANGE 0 5)
set(COMPILER_DIR "${COMPILER_DIR}/Auxiliary/Build")
if(CMAKE_CL_64)
if(BEXT_MSVC_TARGET_ARCH STREQUAL "x64")
set(VCVARS_BAT "${COMPILER_DIR}/vcvars64.bat")
else(CMAKE_CL_64)
else(BEXT_MSVC_TARGET_ARCH STREQUAL "x64")
set(VCVARS_BAT "${COMPILER_DIR}/vcvars32.bat")
endif(CMAKE_CL_64)
endif(BEXT_MSVC_TARGET_ARCH STREQUAL "x64")
if(NOT EXISTS "${VCVARS_BAT}")
message(FATAL_ERROR "Could not find vcvars bat file in ${COMPILER_DIR}")
endif(NOT EXISTS "${VCVARS_BAT}")
@@ -297,14 +313,6 @@ if(MSVC)
endif(MSVC)
# Add a target that will run every time we build and touch a file in
# noinstall to allow interested parent CMake builds to be aware of potential
# changes, even if all that happens is to add files - otherwise, add-only
# operations won't trigger a CMake reconfigure even if the client build is
# watching the install files.
file(MAKE_DIRECTORY ${CMAKE_NOBUNDLE_INSTALL_PREFIX})
add_custom_target(BuildStamp ALL COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_NOBUNDLE_INSTALL_PREFIX}/build-stamp)
# If configurations change after a build has been performed, we don't
# automatically scrub a pre-existing output directory to remove the files from
# the newly disabled components. This variable records whether we need to warn
@@ -345,6 +353,21 @@ option(USE_OSPRAY "OSPRay rendering system" OFF)
option(USE_QT "Qt graphical toolkit support" ON)
option(USE_TCL "Tcl/Tk support" ON)
# An Xmin prefix selects a coherent toolkit build profile. Individual
# dependency logic applies the version-matched patches only when that
# dependency is selected for a local build.
set(BEXT_XMIN_ROOT "" CACHE PATH "Installed Xmin SDK used by bundled Tk and Qt")
if (BEXT_XMIN_ROOT)
if (NOT UNIX OR APPLE)
message(FATAL_ERROR "The bext Xmin profile currently requires Linux or BSD")
endif ()
if (NOT IS_DIRECTORY "${BEXT_XMIN_ROOT}")
message(FATAL_ERROR "BEXT_XMIN_ROOT is not an installed SDK: ${BEXT_XMIN_ROOT}")
endif ()
file(REAL_PATH "${BEXT_XMIN_ROOT}" BEXT_XMIN_ROOT)
set(BEXT_XMIN_ROOT "${BEXT_XMIN_ROOT}" CACHE PATH "Installed Xmin SDK used by bundled Tk and Qt" FORCE)
endif ()
###############################################################################
# Python is a build-time dependency for both LLVM and ISPC. I think
@@ -437,7 +460,6 @@ add_project(lemon GROUPS "BRLCAD")
add_project(re2c GROUPS "BRLCAD")
add_project(perplex GROUPS "BRLCAD")
add_project(strclear GROUPS "BRLCAD")
add_project(xmltools GROUPS "BRLCAD_EXTRA") # Used for Docbook building
# RPATH editing - LIEF has the core capabilities, and plief exposes them via
# a command line utility with patchelf compatible options, so we can drop
@@ -445,11 +467,6 @@ add_project(xmltools GROUPS "BRLCAD_EXTRA") # Used for Docbook building
add_project(lief GROUPS "BRLCAD")
add_project(plief GROUPS "BRLCAD")
# Keeping this set up for easy turn-on until we're confident plief+LIEF has
# all of our use cases covered - plief is preferred, but we've already hit
# one case where a bug in LIEF had to be fixed.
#add_project(patchelf GROUPS "BRLCAD")
###############################################################################
# Build logic is broken out per-library, but the ordering is important. Some
# libraries will depend on others listed here (for example, we want openNURBS
@@ -460,7 +477,11 @@ add_project(plief GROUPS "BRLCAD")
# zlib compression/decompression library
# https://zlib.net
add_project(zlib GROUPS "APPLESEED;BRLCAD;OSPRAY")
add_project(zlib GROUPS "APPLESEED;BRLCAD;OSPRAY;TCL")
# LLVM - code generation support, add it as EARLY as possible
# https://llvm.org/
add_project(llvm GROUPS "APPLESEED;OSPRAY")
# zstd - fast lossless compression library
# https://github.com/facebook/zstd
@@ -522,7 +543,7 @@ add_project(jpeg GROUPS "APPLESEED;BRLCAD;GDAL")
# libpng - Portable Network Graphics image file support
# http://www.libpng.org/pub/png/libpng.html
add_project(png GROUPS "APPLESEED;BRLCAD")
add_project(png GROUPS "APPLESEED;BRLCAD;TCL")
# libtiff - Tag Image File Format (TIFF) support
# https://libtiff.gitlab.io/libtiff/
@@ -566,10 +587,6 @@ add_project(onetbb GROUPS "APPLESEED;OSPRAY;BRLCAD")
# https://github.com/ospray/rkcommon
add_project(rkcommon GROUPS "OSPRAY")
# LLVM - code generation support
# https://llvm.org/
add_project(llvm GROUPS "APPLESEED;OSPRAY")
# ISPC - Implicit SPMD Program Compiler
# https://ispc.github.io
# https://github.com/ispc/ispc
@@ -594,7 +611,7 @@ add_project(gdal GROUPS "GDAL")
# OpenVDB - storage and manipulation of sparse volumetric data discretized on
# three-dimensional grids
# https://github.com/AcademySoftwareFoundation/openvdb
#add_project(openvdb GROUPS "BRLCAD_EXTRA")
add_project(openvdb GROUPS "BRLCAD_EXTRA")
# tinygltf - tiny glTF library(loader/saver)
# https://github.com/syoyo/tinygltf
@@ -660,6 +677,9 @@ add_project(embree GROUPS "APPLESEED;OSPRAY")
# static lib building on so we get the stub libraries.
# https://www.tcl.tk
set(TCL_ENABLE_TK ON CACHE BOOL "enable tk")
set(BEXT_ITCL_MIN_VERSION "3.4")
set(BEXT_ITK_MIN_VERSION "3.4")
set(BEXT_TK_COMPONENTS "archer;mged;bwish;rtwizard;brlman")
add_project(tcl GROUPS "TCL")
add_project(tk GROUPS "TCL")
add_project(itcl GROUPS "TCL")
@@ -685,6 +705,59 @@ add_project(oidn GROUPS "OSPRAY")
add_project(ospray GROUPS "OSPRAY")
###############################################################################
# Finalize the bundled output after all external projects have installed.
# BRL-CAD can then consume the manifest without repeating file classification
# during every configure pass.
###############################################################################
set(BEXT_STRCLEAR_EXPECTED
"${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}/strclear${CMAKE_EXECUTABLE_SUFFIX}")
if (TARGET STRCLEAR_BLD)
set(BEXT_STRCLEAR_EXECUTABLE "${BEXT_STRCLEAR_EXPECTED}")
else ()
find_program(BEXT_STRCLEAR_EXECUTABLE NAMES strclear HINTS "${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}")
endif ()
if (NOT BEXT_STRCLEAR_EXECUTABLE)
message(FATAL_ERROR "bext finalization requires strclear")
endif ()
set(BEXT_PLIEF_EXPECTED
"${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}/plief${CMAKE_EXECUTABLE_SUFFIX}")
if (TARGET PLIEF_BLD)
set(BEXT_PLIEF_EXECUTABLE "${BEXT_PLIEF_EXPECTED}")
else ()
find_program(BEXT_PLIEF_EXECUTABLE NAMES plief patchelf HINTS "${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}")
endif ()
set(BEXT_INSTALL_MANIFEST "${CMAKE_INSTALL_PREFIX}/bext-install-manifest.json")
set(BEXT_FINALIZE_SCRIPT "${CMAKE_SOURCE_DIR}/CMake/FinalizeInstall.cmake")
get_property(BEXT_INSTALL_TARGETS GLOBAL PROPERTY BEXT_INSTALL_TARGETS)
list(REMOVE_DUPLICATES BEXT_INSTALL_TARGETS)
add_custom_target(bext_finalize ALL
COMMAND ${CMAKE_COMMAND}
-DBEXT_INSTALL_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}
-DBEXT_MANIFEST=${BEXT_INSTALL_MANIFEST}
-DBEXT_SOURCE_ROOT=${CMAKE_SOURCE_DIR}
-DBEXT_BINARY_ROOT=${CMAKE_BINARY_DIR}
-DBEXT_NOINSTALL_ROOT=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
-DBEXT_STRCLEAR=${BEXT_STRCLEAR_EXECUTABLE}
-DBEXT_PLIEF=${BEXT_PLIEF_EXECUTABLE}
-DBEXT_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR}
-P ${BEXT_FINALIZE_SCRIPT}
DEPENDS ${BEXT_INSTALL_TARGETS}
VERBATIM
)
if (TARGET STRCLEAR_BLD-install)
add_dependencies(bext_finalize STRCLEAR_BLD-install)
endif ()
if (TARGET PLIEF_BLD-install)
add_dependencies(bext_finalize PLIEF_BLD-install)
endif ()
###############################################################################
# Teach the built-in clean target how to reset generated ExternalProject state
# while preserving the top-level configure metadata and install trees.
+3 -3
View File
@@ -58,13 +58,14 @@ selection further.
| `openexr` | `USE_APPLESEED` | `install` | `deflate`, `patch` | [repository](https://github.com/BRL-CAD/openexr) |
| `openimageio` | `USE_APPLESEED` | `install` | `boost`, `fmt`, `jpeg`, `opencolorio`, `openexr`, `patch`, `png`, `tiff`, `zlib` | [repository](https://github.com/BRL-CAD/oiio) |
| `opennurbs` | `USE_BRLCAD` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/opennurbs) |
| `openvdb` | `USE_BRLCAD_EXTRA` | `install` | `onetbb`, `patch`, `zlib` | [repository](https://github.com/BRL-CAD/openvdb) |
| `osl` | `USE_APPLESEED` | `install` | `bison`, `boost`, `flex`, `llvm`, `openexr`, `openimageio`, `patch`, `pugixml`, `zlib` | [repository](https://github.com/BRL-CAD/OpenShadingLanguage) |
| `osmesa` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/osmesa) |
| `ospray` | `USE_OSPRAY` | `install` | `embree`, `ispc`, `oidn`, `onetbb`, `patch`, `rkcommon` | [repository](https://github.com/BRL-CAD/ospray) |
| `patch` | always considered | `noinstall` | — | [repository](https://github.com/BRL-CAD/patch) |
| `perplex` | `USE_BRLCAD` | `noinstall` | `patch`, `lemon`, `re2c` | [repository](https://github.com/BRL-CAD/perplex) |
| `plief` | `USE_BRLCAD` | `noinstall` | `lief`, `patch` | [repository](https://github.com/BRL-CAD/plief) |
| `png` | `USE_APPLESEED`, `USE_BRLCAD` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/libpng) |
| `png` | `USE_APPLESEED`, `USE_BRLCAD`, `USE_TCL` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/libpng) |
| `poissonrecon` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/PoissonRecon) |
| `proj` | `USE_GDAL` | `install` | `patch`, `sqlite3` | [repository](https://github.com/BRL-CAD/PROJ) |
| `pugixml` | `USE_BRLCAD`, `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/pugixml) |
@@ -83,9 +84,8 @@ selection further.
| `tkhtml` | `USE_TCL` | `install` | `patch`, `tcl`, `tk` | [repository](https://github.com/BRL-CAD/tkhtml) |
| `tktable` | `USE_TCL` | `install` | `patch`, `tcl`, `tk` | [repository](https://github.com/BRL-CAD/tktable) |
| `xerces-c` | `USE_APPLESEED` | `install` | `icu`, `patch` | [repository](https://github.com/BRL-CAD/xerces-c) |
| `xmltools` | `USE_BRLCAD_EXTRA` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/xmltools) |
| `yaml-cpp` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/yaml-cpp) |
| `zlib` | `USE_APPLESEED`, `USE_BRLCAD`, `USE_OSPRAY` | `install` | `patch` | [repository](https://github.com/BRL-CAD/zlib) |
| `zlib` | `USE_APPLESEED`, `USE_BRLCAD`, `USE_OSPRAY`, `USE_TCL` | `install` | `patch` | [repository](https://github.com/BRL-CAD/zlib) |
| `zstd` | `USE_APPLESEED`, `USE_OSPRAY` | `install` | `patch` | [repository](https://github.com/BRL-CAD/zstd) |
<!-- END GENERATED PROJECT TABLE -->
+4
View File
@@ -106,6 +106,10 @@ sudo apt install autotools-dev autoconf
If you enable Qt, Appleseed, or OSPRay, make sure Python 3 is installed and
available in the build environment.
Keep the source and build directories close to the drive root when possible.
Some Windows build tools still have path length limits, even though bext enables
Git's long path handling when it checks out submodules.
# macOS
Assuming XCode is installed, good to go.
+51
View File
@@ -61,6 +61,49 @@ When `bext` is driven from a BRL-CAD build, `BRLCAD_COMPONENTS` can further
narrow some BRL-CAD-related packages to only those needed by the requested
component set.
## Xmin-backed bundled toolkits
An installed Xmin SDK can provide the X11 and OpenGL surface for bext's
bundled Tk and Qt. Set `BEXT_XMIN_ROOT` to select the standard Xmin profile:
```sh
cmake -S /path/to/bext -B /path/to/bext-build \
-DBEXT_XMIN_ROOT=/absolute/path/to/xmin-sdk \
-DENABLE_TCL=ON -DENABLE_QT=ON
```
The profile affects only Tk and Qt packages selected for a local build. It
does not enable a package excluded by `USE_*`, `BRLCAD_COMPONENTS`, or an
explicit `DISABLE_*` setting.
* Tk is configured with `--with-xmin` and bext's matching Tk patch.
* Qt is built with the matching Xmin patch, the qxcb desktop-OpenGL profile,
and dependency audits that reject accidental host X11 or OpenGL linkage.
The patches are maintained next to the dependency build logic as
`tk/tk_xmin.patch` and `qt/qt_xmin.patch`. They are tied to the exact Tk
and Qt submodule revisions in this repository. Updating either dependency
therefore requires updating its patch; a stale patch fails during the patch
step rather than silently producing a mixed build.
The Xmin SDK must include toolkit-client support for Tk. Qt additionally
requires the Qt X11 compatibility client and client OpenGL support. Normal
system discovery is unchanged when `BEXT_XMIN_ROOT` is empty.
Qt's installed package metadata retains an explicit dependency on Xmin.
Downstream projects must therefore keep the same SDK discoverable with
`Xmin_DIR` or `CMAKE_PREFIX_PATH`; configuration fails instead of falling back
to host X libraries when that SDK is absent.
## Advanced toolkit patch controls
Unix builds may pass additional, semicolon-separated absolute patch paths in
`TK_EXTRA_PATCHES`, plus additional Tk `configure` arguments in
`TK_CONFIGURE_ARGS`. `QT_EXTRA_PATCHES` provides the corresponding Qt
hook. `QT_XMIN_ROOT` remains available for manually supplied Qt Xmin patches.
These low-level controls are not needed when `BEXT_XMIN_ROOT` selects the
standard profile.
# Official profiles
The supported configure entry points are:
@@ -131,6 +174,14 @@ output trees under that prefix:
* `install/` - files intended to be bundled with downstream software
* `noinstall/` - build-only tools and compile-time-only assets
* `bext-install-manifest.json` - relative file classifications and the
platform metadata needed by downstream staging builds
The normal build finalizes bundled binaries after all dependency install steps.
It uses `strclear` and, where available, `plief` to remove stale build paths and
normalize RPATH-bearing files before writing the manifest. Consumers should
continue to treat `install/` as read-only and perform their own staging-specific
path and RPATH edits on copied files.
The normal build also generates a dependency graph in the build directory as
`bext.dot`. When Graphviz `dot` is available, the build also emits rendered
+3
View File
@@ -33,6 +33,9 @@ if (ENABLE_ASTYLE)
-DCMAKE_INSTALL_PREFIX=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
-DCMAKE_INSTALL_LIBDIR:PATH=${LIB_DIR}
-DCMAKE_INSTALL_RPATH=${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${LIB_DIR}
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=OFF
-DBUILD_JAVA_LIBS=OFF
LOG_CONFIGURE ${EXT_BUILD_QUIET}
LOG_BUILD ${EXT_BUILD_QUIET}
LOG_INSTALL ${EXT_BUILD_QUIET}
+128 -31
View File
@@ -1,22 +1,74 @@
diff -Naur astyle/build/cmake/InstallOptions.cmake ASTYLE_BLD/build/cmake/InstallOptions.cmake
--- astyle/build/cmake/InstallOptions.cmake 2024-06-24 11:35:23.444068225 -0400
+++ ASTYLE_BLD/build/cmake/InstallOptions.cmake 2024-06-24 11:36:14.697228521 -0400
@@ -1,45 +1,10 @@
diff -Naur astyle/CMakeLists.txt ASTYLE_BLD/CMakeLists.txt
--- astyle/CMakeLists.txt 2026-09-09 09:23:57.197122193 -0400
+++ ASTYLE_BLD/CMakeLists.txt 2026-09-09 09:17:33.423173910 -0400
@@ -17,6 +17,8 @@
endif()
set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Linux Soname Version
set(MAJORVER 3)
@@ -72,151 +74,13 @@
target_compile_options(astyle PRIVATE /utf-8)
endif()
-# Set build-specific compile options
-if(BUILD_SHARED_LIBS OR BUILD_STATIC_LIBS)
- if(BUILD_JAVA_LIBS)
- find_package(JNI)
- if (NOT JNI_FOUND)
- set(err_jni "Use '-DJAVA_HOME=<JNI Directory>' to define the Java path")
- message(FATAL_ERROR ${err_jni})
- endif()
- target_compile_options(astyle PRIVATE -DASTYLE_JNI)
- target_include_directories(astyle PRIVATE ${JNI_INCLUDE_DIRS})
- else()
- target_compile_options(astyle PRIVATE -DASTYLE_LIB)
- endif()
- # Windows DLL exports removed
- set_property(TARGET astyle PROPERTY DEFINE_SYMBOL "")
- # Linux solib version added
- set_property(TARGET astyle PROPERTY VERSION ${SOLIBVER})
- set_property(TARGET astyle PROPERTY SOVERSION ${MAJORVER})
-endif()
-
-
-# Linker options:
-
-# Strip release builds
-if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
- if(NOT BUILD_STATIC_LIBS AND NOT BORLAND AND NOT MSVC)
- add_custom_command(TARGET astyle POST_BUILD
- COMMAND ${CMAKE_STRIP} $<TARGET_FILE_NAME:astyle>)
- endif()
-endif()
-# Shared library options
-if(BUILD_SHARED_LIBS)
- set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") # remove -rdynamic
- if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
- # need static linking because cannot find the intel libraries at runtime
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-intel")
- elseif(MINGW)
- # minGW dlls don't work
- # tdm-gcc dlls work with everything except python
- set(CMAKE_SHARED_LINKER_FLAGS
- "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--add-stdcall-alias -Wl,--dll")
- elseif(BORLAND)
- # use a development environment to compile Borland dlls
- endif()
-endif()
-
-
-# Installation options:
-
-# Define install directories
-# To uninstall 'xargs rm < install_manifest.txt'
-# Default linux install prefix is /usr/local"
-# This may be modified by -DCMAKE_INSTALL_PREFIX=
-# Default Win32 install prefix is not used (C:/Program Files (x86))
+install(TARGETS astyle
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+install(FILES ${DOCS} DESTINATION share/doc/astyle/html)
+if (MAN)
+ INSTALL(FILES ${MAN} DESTINATION man/man1)
+endif (MAN)
-
-option(INSTALL_DOC ON)
-
-if(BUILD_SHARED_LIBS OR BUILD_STATIC_LIBS)
@@ -56,21 +108,66 @@ diff -Naur astyle/build/cmake/InstallOptions.cmake ASTYLE_BLD/build/cmake/Instal
- endif()
- endif()
-endif()
diff -Naur astyle/CMakeLists.txt ASTYLE_BLD/CMakeLists.txt
--- astyle/CMakeLists.txt 2024-06-06 01:30:44.000000000 -0400
+++ ASTYLE_BLD/CMakeLists.txt 2024-06-28 12:11:49.297259511 -0400
@@ -6,9 +6,13 @@
-
-
-# output files:
+install(TARGETS astyle
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+install(FILES ${DOCS} DESTINATION share/doc/astyle/html)
+if (MAN)
+ INSTALL(FILES ${MAN} DESTINATION man/man1)
+endif (MAN)
project(astyle CXX)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
include( build/cmake/Options.cmake REQUIRED )
include( build/cmake/CompilerOptions.cmake REQUIRED )
-include( build/cmake/LinkerOptions.cmake REQUIRED )
+#include( build/cmake/LinkerOptions.cmake REQUIRED )
include( build/cmake/InstallOptions.cmake REQUIRED )
include( build/cmake/OutputFiles.cmake REQUIRED )
include( build/cmake/PrintInfo.cmake REQUIRED )
-# Set output file names if different than 'astyle'
-if(BUILD_JAVA_LIBS)
- if(WIN32)
- set_property(TARGET astyle PROPERTY OUTPUT_NAME AStyle32j)
- set_property(TARGET astyle PROPERTY PREFIX "")
- else()
- set_property(TARGET astyle PROPERTY OUTPUT_NAME astylej)
- endif()
-elseif(BUILD_SHARED_LIBS)
- if(WIN32)
- set_property(TARGET astyle PROPERTY OUTPUT_NAME AStyle32)
- set_property(TARGET astyle PROPERTY PREFIX "")
- endif()
-elseif(BUILD_STATIC_LIBS)
- if(WIN32)
- set_property(TARGET astyle PROPERTY OUTPUT_NAME AStyleLib)
- set_property(TARGET astyle PROPERTY PREFIX "")
- endif()
-else()
- if(WIN32)
- set_property(TARGET astyle PROPERTY OUTPUT_NAME AStyle)
- endif()
-endif()
-
-
-# print info:
-
-if(BUILD_JAVA_LIBS)
- SET(ASTYLE_BUILD_TYPE "Java Shared Library")
-elseif(BUILD_SHARED_LIBS)
- SET(ASTYLE_BUILD_TYPE "Shared Library")
-elseif(BUILD_STATIC_LIBS)
- SET(ASTYLE_BUILD_TYPE "Static Library")
-else()
- SET(ASTYLE_BUILD_TYPE "Executable")
-endif()
-
-# Display build information
-
-message( STATUS "---------- General Configuration ----------" )
-message( STATUS )
-message( STATUS "CMake Generator: ${CMAKE_GENERATOR}" )
-message( STATUS "CMake Compiler: ${CMAKE_CXX_COMPILER_ID}" )
-message( STATUS "AStyle Build: ${ASTYLE_BUILD_TYPE}" )
-message( STATUS "AStyle Configuration: ${CMAKE_BUILD_TYPE}" )
-if( BUILD_JAVA_LIBS )
- message( STATUS "Java Include Path: ${JAVA_INCLUDE_PATH}" )
-endif()
-message( STATUS )
-message( STATUS "-------------------------------------------" )
+1 -1
View File
@@ -1,5 +1,5 @@
# Decide if we're using clipper2
cad_enable(CLIPPER2 "librt")
cad_enable(CLIPPER2 "libbg;librt")
bext_enable(CLIPPER2)
+27 -2
View File
@@ -24,10 +24,36 @@ if (ENABLE_EIGEN)
RegisterDeps(EIGEN)
set(EIGEN_PATCH_FILES "${CMAKE_CURRENT_SOURCE_DIR}/eigen_common.patch")
if (APPLE)
list(APPEND EIGEN_PATCH_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/eigen_macos.patch")
endif (APPLE)
if (MSVC)
list(APPEND EIGEN_PATCH_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/eigen_msvc.patch")
endif (MSVC)
set(EIGEN_PATCH_COMMAND)
foreach(EIGEN_PATCH_FILE IN LISTS EIGEN_PATCH_FILES)
if (NOT EIGEN_PATCH_COMMAND)
set(EIGEN_PATCH_COMMAND
${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS} -i ${EIGEN_PATCH_FILE}
)
else ()
list(APPEND EIGEN_PATCH_COMMAND
COMMAND ${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS}
-i ${EIGEN_PATCH_FILE}
)
endif ()
endforeach ()
unset(EIGEN_PATCH_FILE)
unset(EIGEN_PATCH_FILES)
ExternalProject_Add(EIGEN_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/eigen"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/eigen.patch
PATCH_COMMAND ${EIGEN_PATCH_COMMAND}
CMAKE_ARGS
-DBUILD_TESTING=OFF
-DEIGEN_BUILD_DOC=OFF
@@ -61,4 +87,3 @@ endif (ENABLE_EIGEN)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-25
View File
@@ -1,25 +0,0 @@
diff -Naur eigen/CMakeLists.txt EIGEN_BLD/CMakeLists.txt
--- eigen/CMakeLists.txt 2024-04-16 20:37:46.506698007 -0400
+++ EIGEN_BLD/CMakeLists.txt 2024-04-16 20:38:21.574118370 -0400
@@ -635,7 +635,7 @@
export (TARGETS eigen NAMESPACE Eigen3:: FILE Eigen3Targets.cmake)
# Export Eigen3 package to CMake registry such that it can be easily found by
# CMake even if it has not been installed to a standard directory.
-export (PACKAGE Eigen3)
+#export (PACKAGE Eigen3)
install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
diff -Naur eigen/Eigen/src/Core/util/Memory.h EIGEN_BLD/Eigen/src/Core/util/Memory.h
--- eigen/Eigen/src/Core/util/Memory.h 2024-04-16 20:37:46.522697745 -0400
+++ EIGEN_BLD/Eigen/src/Core/util/Memory.h 2024-04-16 20:37:14.119233248 -0400
@@ -586,6 +586,9 @@
// to the appropriate stack allocation function
#if ! defined EIGEN_ALLOCA && ! defined EIGEN_GPU_COMPILE_PHASE
#if EIGEN_OS_LINUX || EIGEN_OS_MAC || (defined alloca)
+ #if EIGEN_OS_MAC
+ # include <alloca.h>
+ #endif
#define EIGEN_ALLOCA alloca
#elif EIGEN_COMP_MSVC
#define EIGEN_ALLOCA _alloca
+11
View File
@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -260,7 +260,7 @@
export (TARGETS eigen NAMESPACE Eigen3:: FILE Eigen3Targets.cmake)
# Export Eigen3 package to CMake registry such that it can be easily found by
# CMake even if it has not been installed to a standard directory.
- export (PACKAGE Eigen3)
+ #export (PACKAGE Eigen3)
install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})
+12
View File
@@ -0,0 +1,12 @@
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -647,6 +647,9 @@
// to the appropriate stack allocation function
#if !defined EIGEN_ALLOCA && !defined EIGEN_GPU_COMPILE_PHASE
#if EIGEN_OS_LINUX || EIGEN_OS_MAC || (defined alloca)
+#if EIGEN_OS_MAC
+# include <alloca.h>
+#endif
#define EIGEN_ALLOCA alloca
#elif EIGEN_COMP_MSVC
#define EIGEN_ALLOCA _alloca
+15
View File
@@ -0,0 +1,15 @@
--- a/lapack/CMakeLists.txt
+++ b/lapack/CMakeLists.txt
@@ -20,6 +20,12 @@
add_custom_target(lapack)
include_directories(../blas)
+
+# Eigen's template-heavy complex LAPACK sources can exceed the default COFF
+# section limit when compiled with MSVC, particularly in debug builds.
+if(MSVC)
+ set_property(SOURCE complex_single.cpp complex_double.cpp APPEND PROPERTY COMPILE_OPTIONS "/bigobj")
+endif()
set(EigenLapack_SRCS
dsecnd_INT_CPU_TIME.cpp second_INT_CPU_TIME.cpp single.cpp double.cpp complex_single.cpp complex_double.cpp
+8 -53
View File
@@ -1,47 +1,5 @@
diff -Naur gdal/apps/gdalalg_raster_tile.cpp GDAL_BLD/apps/gdalalg_raster_tile.cpp
--- gdal/apps/gdalalg_raster_tile.cpp 2026-02-04 16:36:48.022371225 -0500
+++ GDAL_BLD/apps/gdalalg_raster_tile.cpp 2026-02-04 16:36:21.803485814 -0500
@@ -326,37 +326,6 @@
.SetMaxValueIncluded(100)
.SetCategory(ADVANCED_RESAMPLING_CATEGORY);
- constexpr const char *ADVANCED_RESAMPLING_CATEGORY = "Advanced Resampling";
- auto &excludedValuesArg =
- AddArg("excluded-values", 0,
- _("Tuples of values (e.g. <R>,<G>,<B> or (<R1>,<G1>,<B1>),"
- "(<R2>,<G2>,<B2>)) that must beignored as contributing source "
- "pixels during (average) resampling"),
- &m_excludedValues)
- .SetCategory(ADVANCED_RESAMPLING_CATEGORY);
- auto &excludedValuesPctThresholdArg =
- AddArg(
- "excluded-values-pct-threshold", 0,
- _("Minimum percentage of source pixels that must be set at one of "
- "the --excluded-values to cause the excluded value to be used as "
- "the target pixel value"),
- &m_excludedValuesPctThreshold)
- .SetDefault(m_excludedValuesPctThreshold)
- .SetMinValueIncluded(0)
- .SetMaxValueIncluded(100)
- .SetCategory(ADVANCED_RESAMPLING_CATEGORY);
- auto &nodataValuesPctThresholdArg =
- AddArg(
- "nodata-values-pct-threshold", 0,
- _("Minimum percentage of source pixels that must be set at one of "
- "nodata (or alpha=0 or any other way to express transparent pixel"
- "to cause the target pixel value to be transparent"),
- &m_nodataValuesPctThreshold)
- .SetDefault(m_nodataValuesPctThreshold)
- .SetMinValueIncluded(0)
- .SetMaxValueIncluded(100)
- .SetCategory(ADVANCED_RESAMPLING_CATEGORY);
-
constexpr const char *PUBLICATION_CATEGORY = "Publication";
AddArg("webviewer", 0, _("Web viewer to generate"), &m_webviewers)
.SetDefault("all")
diff -Naur gdal/cmake/modules/packages/FindSQLite3.cmake GDAL_BLD/cmake/modules/packages/FindSQLite3.cmake
--- gdal/cmake/modules/packages/FindSQLite3.cmake 2026-02-04 16:36:47.818372116 -0500
+++ GDAL_BLD/cmake/modules/packages/FindSQLite3.cmake 2026-02-04 16:28:57.601427168 -0500
--- a/cmake/modules/packages/FindSQLite3.cmake
+++ b/cmake/modules/packages/FindSQLite3.cmake
@@ -57,7 +57,7 @@
NAMES sqlite3.h
HINTS ${PC_SQLITE3_INCLUDE_DIRS})
@@ -51,9 +9,8 @@ diff -Naur gdal/cmake/modules/packages/FindSQLite3.cmake GDAL_BLD/cmake/modules/
NAMES_PER_DIR
HINTS ${PC_SQLITE3_LIBRARY_DIRS})
endif()
diff -Naur gdal/gcore/gdal_multidomainmetadata.h GDAL_BLD/gcore/gdal_multidomainmetadata.h
--- gdal/gcore/gdal_multidomainmetadata.h 2026-02-05 09:46:40.132404369 -0500
+++ GDAL_BLD/gcore/gdal_multidomainmetadata.h 2026-02-05 09:48:20.477951010 -0500
--- a/gcore/gdal_multidomainmetadata.h
+++ b/gcore/gdal_multidomainmetadata.h
@@ -18,6 +18,15 @@
#include "cpl_port.h"
#include "cpl_string.h"
@@ -70,9 +27,8 @@ diff -Naur gdal/gcore/gdal_multidomainmetadata.h GDAL_BLD/gcore/gdal_multidomain
#include <map>
/*! @cond Doxygen_Suppress */
diff -Naur gdal/gdal.cmake GDAL_BLD/gdal.cmake
--- gdal/gdal.cmake 2026-02-04 16:36:47.825372086 -0500
+++ GDAL_BLD/gdal.cmake 2026-02-04 16:28:57.602427164 -0500
--- a/gdal.cmake
+++ b/gdal.cmake
@@ -238,12 +238,6 @@
set_property(TARGET ${GDAL_LIB_TARGET_NAME} PROPERTY PLUGIN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/gdalplugins")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gdalplugins")
@@ -86,9 +42,8 @@ diff -Naur gdal/gdal.cmake GDAL_BLD/gdal.cmake
if (MINGW AND BUILD_SHARED_LIBS)
set_target_properties(${GDAL_LIB_TARGET_NAME} PROPERTIES SUFFIX "-${GDAL_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif ()
diff -Naur gdal/port/cpl_port.h GDAL_BLD/port/cpl_port.h
--- gdal/port/cpl_port.h 2026-02-04 16:36:47.823372095 -0500
+++ GDAL_BLD/port/cpl_port.h 2026-02-04 16:28:57.603427159 -0500
--- a/port/cpl_port.h
+++ b/port/cpl_port.h
@@ -1019,7 +1019,7 @@
#define TRUE 1
#endif
+4 -6
View File
@@ -1,6 +1,5 @@
diff -Naur gdal/frmts/png/pngdataset.cpp GDAL_BLD/frmts/png/pngdataset.cpp
--- gdal/frmts/png/pngdataset.cpp 2026-05-29 11:02:04.453453107 -0400
+++ GDAL_BLD/frmts/png/pngdataset.cpp 2026-05-29 11:02:51.019304367 -0400
--- a/frmts/png/pngdataset.cpp
+++ b/frmts/png/pngdataset.cpp
@@ -42,7 +42,9 @@
#pragma clang diagnostic pop
#endif
@@ -12,9 +11,8 @@ diff -Naur gdal/frmts/png/pngdataset.cpp GDAL_BLD/frmts/png/pngdataset.cpp
#include <algorithm>
#include <limits>
diff -Naur gdal/frmts/png/pngdataset.h GDAL_BLD/frmts/png/pngdataset.h
--- gdal/frmts/png/pngdataset.h 2026-05-29 11:02:04.454453104 -0400
+++ GDAL_BLD/frmts/png/pngdataset.h 2026-05-29 11:02:42.415331850 -0400
--- a/frmts/png/pngdataset.h
+++ b/frmts/png/pngdataset.h
@@ -40,7 +40,9 @@
#include "png.h"
+1 -1
View File
@@ -6,7 +6,7 @@ diff -Naur GeometricTools/CMakeLists.txt GTE_BLD/CMakeLists.txt
+
+project(GTE)
+
+file(GLOB GTE_MFILES "${CMAKE_SOURCE_DIR}/GTE/Mathematics/*")
+file(GLOB GTE_MFILES LIST_DIRECTORIES false "${CMAKE_SOURCE_DIR}/GTE/Mathematics/*")
+
+if(NOT DEFINED INCLUDE_DIR)
+ set(INCLUDE_DIR include)
+22
View File
@@ -41,3 +41,25 @@ index 042e6dd..0d3a2ca 100644
# Link against Clang libraries
foreach(clangLib ${CLANG_LIBRARY_LIST})
# Preferred way to build ISPC is to link it with individual clang static
diff --git a/src/util.cpp b/src/util.cpp
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -51,4 +51,4 @@
void std::__libcpp_verbose_abort(char const *format, ...)
-#if ISPC_LLVM_VERSION >= ISPC_LLVM_20_0
+#if defined(__APPLE__) || ISPC_LLVM_VERSION >= ISPC_LLVM_20_0
noexcept
#endif
diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake
--- a/cmake/GenerateBuiltins.cmake
+++ b/cmake/GenerateBuiltins.cmake
@@ -357,7 +357,7 @@ function(builtin_xe_to_cpp os)
add_custom_command(
OUTPUT ${bc}
- COMMAND cat ${input} | \"${LLVM_AS_EXECUTABLE}\" -o ${bc}
+ COMMAND "${LLVM_AS_EXECUTABLE}" ${input} -o ${bc}
DEPENDS ${input}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
+7 -5
View File
@@ -1,7 +1,7 @@
if (USE_BRLCAD)
# Decide if we're using ITcl
cad_enable(ITCL "archer;mged;bwish;rtwizard;brlman")
cad_enable(ITCL "${BEXT_TK_COMPONENTS}")
else (USE_BRLCAD)
@@ -11,6 +11,12 @@ else (USE_BRLCAD)
endif (USE_BRLCAD)
# A bundled Tcl requires the matching bundled Itcl, even when a system
# installation advertises the same package name.
if (TARGET TCL_BLD AND NOT DISABLE_ITCL)
set(ENABLE_ITCL ON)
endif ()
if (NOT ENABLE_ITCL AND NOT DEFINED DISABLE_ITCL)
find_package(ITCL)
@@ -48,7 +54,6 @@ if (ENABLE_ITCL)
endif (EXISTS ${HDRS_CANDIDATE_DIR})
endif (NOT TARGET TCL_BLD)
# message("TCL HEADERS1: ${TCL_PRIVATE_HDRS}")
# If we can't find them from the system, see if we have a local
# clone of Tcl to use
@@ -62,7 +67,6 @@ if (ENABLE_ITCL)
endif(NOT WIN32)
endif (NOT TCL_PRIVATE_HDRS AND EXISTS ${CMAKE_SOURCE_DIR}/tcl/tcl)
# message("TCL HEADERS2: ${TCL_PRIVATE_HDRS}")
# We need to know where the ITcl sources will wind up for some of
@@ -86,7 +90,6 @@ if (ENABLE_ITCL)
endif(NOT WIN32)
endif (NOT TCL_PRIVATE_HDRS)
# message("TCL HEADERS3: ${TCL_PRIVATE_HDRS}")
# When building ITCL, its path setup must take into account the subdirectory
# in which we are storing the library.
@@ -143,4 +146,3 @@ mark_as_advanced(ITCL_VERSION)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-1
View File
@@ -220,4 +220,3 @@ install(FILES ${ITCL_HDRS} DESTINATION ${INCLUDE_DIR})
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+1 -1
View File
@@ -2623,7 +2623,7 @@ typedef struct ProcessGlobalValue {
Tcl_Encoding encoding; /* system encoding when global string was
* initialized. */
TclInitProcessGlobalValueProc *proc;
/* A procedure to initialize the global string
/* A procedure to initialize the global string
* copy when a "get" request comes in before
* any "set" request has been received. */
Tcl_Mutex mutex; /* Enforce orderly access from multiple
-1
View File
@@ -1,3 +1,2 @@
PATCH
TCL
+9 -23
View File
@@ -1,29 +1,11 @@
# Unfortunately, there does not appear to be a reliable way to test for the
# presence of the Itk package on a system Tcl/Tk. We key off of the presence
# of the TK_BLD and ITCL_BLD targets, but that may produce a false negative if
# those builds are both off but we still need Itk. As far as I can tell the
# "package require Itk" test (which is what is required to properly test for an
# available Itk package) can ONLY be performed successfully on a system that
# supports creation of a graphics window. Window creation isn't typically
# available on continuous integration runners, which means the test will always
# fail there even when it shouldn't.
# We try to find the itk library, since that's the only test we can do without
# needing the graphical invocation. Unfortunately, even a find_library search
# looking for libitk isn't completely reliable, since the presence of a shared
# library is not a guarantee it is correctly hooked into the "package require"
# mechanism of the system Tcl/Tk we want to use. (It is possible to have more
# than one Tcl/Tk on a system - this situation is known to have occurred on the
# Mac when 3rd party package managers are used, for example.)
# Hopefully situations where a user has a complex Itcl/Itk setup are rare
# enough that it won't be a significant issue, since there appears to be
# only so much we can do to sort it out...
# Itk 3 uses private Tcl and Itcl interfaces, so a local Tcl, Tk, or Itcl
# build must be matched by a local Itk build. A system stack is accepted only
# after the Tcl package path advertises Itcl 3 and Itk 3.
if (USE_BRLCAD)
# Decide if we're using Itk
cad_enable(ITK "archer;mged;bwish;rtwizard;brlman")
cad_enable(ITK "${BEXT_TK_COMPONENTS}")
else (USE_BRLCAD)
@@ -33,6 +15,11 @@ else (USE_BRLCAD)
endif (USE_BRLCAD)
# Itk uses private interfaces from the selected Tk and Itcl builds.
if ((TARGET ITCL_BLD OR TARGET TK_BLD) AND NOT DISABLE_ITK)
set(ENABLE_ITK ON)
endif ()
if (NOT ENABLE_ITK AND NOT DISABLE_ITCL AND NOT DISABLE_TCL)
find_library(ITK_SYS_LIBRARY NAMES itk3)
@@ -111,4 +98,3 @@ mark_as_advanced(ITK_VERSION)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-1
View File
@@ -277,4 +277,3 @@ install(FILES ${ITK_HDRS} DESTINATION ${INCLUDE_DIR})
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+5 -5
View File
@@ -11,7 +11,7 @@
* it encourages better organization of Tcl applications through the
* object-oriented paradigm, leading to code that is easier to
* understand and maintain.
*
*
* ADDING [incr Tcl] TO A Tcl-BASED APPLICATION:
*
* To add [incr Tcl] facilities to a Tcl application, modify the
@@ -27,12 +27,12 @@
* if (Itcl_Init(interp) == TCL_ERROR) {
* return TCL_ERROR;
* }
*
*
* 3) Link your application with libitcl.a
*
* NOTE: An example file "tclAppInit.c" containing the changes shown
* above is included in this distribution.
*
*
* ========================================================================
* AUTHOR: Michael J. McLennan
* Bell Labs Innovations for Lucent Technologies
@@ -68,8 +68,8 @@
#define ITCL_VERSION "3.4"
#define ITCL_PATCH_LEVEL "3.4.3"
/*
* A special definition used to allow this header file to be included
/*
* A special definition used to allow this header file to be included
* in resource files so that they can get obtain version information from
* this file. Resource compilers don't like all the C stuff, like typedefs
* and procedure declarations, that occur below.
+14 -15
View File
@@ -35,25 +35,25 @@ TCL_EXTERN(int) Itcl_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
#ifndef Itcl_RegisterC_TCL_DECLARED
#define Itcl_RegisterC_TCL_DECLARED
/* 2 */
TCL_EXTERN(int) Itcl_RegisterC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_CmdProc * proc,
ClientData clientData,
TCL_EXTERN(int) Itcl_RegisterC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_CmdProc * proc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
#endif
#ifndef Itcl_RegisterObjC_TCL_DECLARED
#define Itcl_RegisterObjC_TCL_DECLARED
/* 3 */
TCL_EXTERN(int) Itcl_RegisterObjC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_ObjCmdProc * proc,
ClientData clientData,
TCL_EXTERN(int) Itcl_RegisterObjC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_ObjCmdProc * proc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
#endif
#ifndef Itcl_FindC_TCL_DECLARED
#define Itcl_FindC_TCL_DECLARED
/* 4 */
TCL_EXTERN(int) Itcl_FindC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_CmdProc ** argProcPtr,
Tcl_ObjCmdProc ** objProcPtr,
TCL_EXTERN(int) Itcl_FindC _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, Tcl_CmdProc ** argProcPtr,
Tcl_ObjCmdProc ** objProcPtr,
ClientData * cDataPtr));
#endif
#ifndef Itcl_InitStack_TCL_DECLARED
@@ -69,7 +69,7 @@ TCL_EXTERN(void) Itcl_DeleteStack _ANSI_ARGS_((Itcl_Stack * stack));
#ifndef Itcl_PushStack_TCL_DECLARED
#define Itcl_PushStack_TCL_DECLARED
/* 7 */
TCL_EXTERN(void) Itcl_PushStack _ANSI_ARGS_((ClientData cdata,
TCL_EXTERN(void) Itcl_PushStack _ANSI_ARGS_((ClientData cdata,
Itcl_Stack * stack));
#endif
#ifndef Itcl_PopStack_TCL_DECLARED
@@ -85,7 +85,7 @@ TCL_EXTERN(ClientData) Itcl_PeekStack _ANSI_ARGS_((Itcl_Stack * stack));
#ifndef Itcl_GetStackValue_TCL_DECLARED
#define Itcl_GetStackValue_TCL_DECLARED
/* 10 */
TCL_EXTERN(ClientData) Itcl_GetStackValue _ANSI_ARGS_((Itcl_Stack * stack,
TCL_EXTERN(ClientData) Itcl_GetStackValue _ANSI_ARGS_((Itcl_Stack * stack,
int pos));
#endif
#ifndef Itcl_InitList_TCL_DECLARED
@@ -113,7 +113,7 @@ TCL_EXTERN(Itcl_ListElem*) Itcl_DeleteListElem _ANSI_ARGS_((
#ifndef Itcl_InsertList_TCL_DECLARED
#define Itcl_InsertList_TCL_DECLARED
/* 15 */
TCL_EXTERN(Itcl_ListElem*) Itcl_InsertList _ANSI_ARGS_((Itcl_List * listPtr,
TCL_EXTERN(Itcl_ListElem*) Itcl_InsertList _ANSI_ARGS_((Itcl_List * listPtr,
ClientData val));
#endif
#ifndef Itcl_InsertListElem_TCL_DECLARED
@@ -125,7 +125,7 @@ TCL_EXTERN(Itcl_ListElem*) Itcl_InsertListElem _ANSI_ARGS_((
#ifndef Itcl_AppendList_TCL_DECLARED
#define Itcl_AppendList_TCL_DECLARED
/* 17 */
TCL_EXTERN(Itcl_ListElem*) Itcl_AppendList _ANSI_ARGS_((Itcl_List * listPtr,
TCL_EXTERN(Itcl_ListElem*) Itcl_AppendList _ANSI_ARGS_((Itcl_List * listPtr,
ClientData val));
#endif
#ifndef Itcl_AppendListElem_TCL_DECLARED
@@ -143,7 +143,7 @@ TCL_EXTERN(void) Itcl_SetListValue _ANSI_ARGS_((
#ifndef Itcl_EventuallyFree_TCL_DECLARED
#define Itcl_EventuallyFree_TCL_DECLARED
/* 20 */
TCL_EXTERN(void) Itcl_EventuallyFree _ANSI_ARGS_((ClientData cdata,
TCL_EXTERN(void) Itcl_EventuallyFree _ANSI_ARGS_((ClientData cdata,
Tcl_FreeProc * fproc));
#endif
#ifndef Itcl_PreserveData_TCL_DECLARED
@@ -329,4 +329,3 @@ TCL_EXTERNC ItclStubs *itclStubsPtr;
/* !END!: Do not edit above this line. */
#endif /* _ITCLDECLS */
+7 -7
View File
@@ -11,7 +11,7 @@
* it encourages better organization of Tcl applications through the
* object-oriented paradigm, leading to code that is easier to
* understand and maintain.
*
*
* ADDING [incr Tcl] TO A Tcl-BASED APPLICATION:
*
* To add [incr Tcl] facilities to a Tcl application, modify the
@@ -27,12 +27,12 @@
* if (Itcl_Init(interp) == TCL_ERROR) {
* return TCL_ERROR;
* }
*
*
* 3) Link your application with libitcl.a
*
* NOTE: An example file "tclAppInit.c" containing the changes shown
* above is included in this distribution.
*
*
* ========================================================================
* AUTHOR: Michael J. McLennan
* Bell Labs Innovations for Lucent Technologies
@@ -121,7 +121,7 @@
(varPtr)->flags = 0
#define ItclInitVarArgument(varPtr) \
(varPtr)->flags = VAR_ARGUMENT
(varPtr)->flags = VAR_ARGUMENT
#define ItclVarHashCreateVar(tablePtr, key, newPtr) \
TclVarHashCreateVar((tablePtr), (key), (newPtr))
@@ -137,7 +137,7 @@
#define itclVarInHashSize sizeof(VarInHash)
#define itclVarLocalSize sizeof(Var)
#else /* Compiling on Tcl8.x, x<5 */
#else /* Compiling on Tcl8.x, x<5 */
typedef struct Itcl_CallFrame {
Tcl_Namespace *nsPtr;
@@ -184,7 +184,7 @@ typedef struct ItclVarInHash {
#define itclOldRuntime (itclVarFlagOffset!=0)
extern int itclVarFlagOffset;
extern int itclVarFlagOffset;
extern int itclVarRefCountOffset;
extern int itclVarInHashSize;
extern int itclVarLocalSize;
@@ -245,7 +245,7 @@ extern int itclVarValueOffset;
#define MODULE_SCOPE
#endif
MODULE_SCOPE Var * ItclVarHashCreateVar (TclVarHashTable * tablePtr,
MODULE_SCOPE Var * ItclVarHashCreateVar (TclVarHashTable * tablePtr,
const char * key, int * newPtr);
#endif /* Version dependent defs and macros */
+149 -149
View File
@@ -39,13 +39,13 @@ TCL_EXTERN(int) Itcl_IsClass _ANSI_ARGS_((Tcl_Command cmd));
#ifndef Itcl_FindClass_TCL_DECLARED
#define Itcl_FindClass_TCL_DECLARED
/* 2 */
TCL_EXTERN(ItclClass*) Itcl_FindClass _ANSI_ARGS_((Tcl_Interp* interp,
TCL_EXTERN(ItclClass*) Itcl_FindClass _ANSI_ARGS_((Tcl_Interp* interp,
CONST char* path, int autoload));
#endif
#ifndef Itcl_FindObject_TCL_DECLARED
#define Itcl_FindObject_TCL_DECLARED
/* 3 */
TCL_EXTERN(int) Itcl_FindObject _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_FindObject _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, ItclObject ** roPtr));
#endif
#ifndef Itcl_IsObject_TCL_DECLARED
@@ -56,13 +56,13 @@ TCL_EXTERN(int) Itcl_IsObject _ANSI_ARGS_((Tcl_Command cmd));
#ifndef Itcl_ObjectIsa_TCL_DECLARED
#define Itcl_ObjectIsa_TCL_DECLARED
/* 5 */
TCL_EXTERN(int) Itcl_ObjectIsa _ANSI_ARGS_((ItclObject * contextObj,
TCL_EXTERN(int) Itcl_ObjectIsa _ANSI_ARGS_((ItclObject * contextObj,
ItclClass * cdefn));
#endif
#ifndef Itcl_Protection_TCL_DECLARED
#define Itcl_Protection_TCL_DECLARED
/* 6 */
TCL_EXTERN(int) Itcl_Protection _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_Protection _ANSI_ARGS_((Tcl_Interp * interp,
int newLevel));
#endif
#ifndef Itcl_ProtectionStr_TCL_DECLARED
@@ -73,14 +73,14 @@ TCL_EXTERN(char*) Itcl_ProtectionStr _ANSI_ARGS_((int pLevel));
#ifndef Itcl_CanAccess_TCL_DECLARED
#define Itcl_CanAccess_TCL_DECLARED
/* 8 */
TCL_EXTERN(int) Itcl_CanAccess _ANSI_ARGS_((ItclMember* memberPtr,
TCL_EXTERN(int) Itcl_CanAccess _ANSI_ARGS_((ItclMember* memberPtr,
Tcl_Namespace* fromNsPtr));
#endif
#ifndef Itcl_CanAccessFunc_TCL_DECLARED
#define Itcl_CanAccessFunc_TCL_DECLARED
/* 9 */
TCL_EXTERN(int) Itcl_CanAccessFunc _ANSI_ARGS_((
ItclMemberFunc* mfunc,
ItclMemberFunc* mfunc,
Tcl_Namespace* fromNsPtr));
#endif
#ifndef Itcl_GetTrueNamespace_TCL_DECLARED
@@ -92,56 +92,56 @@ TCL_EXTERN(Tcl_Namespace*) Itcl_GetTrueNamespace _ANSI_ARGS_((
#ifndef Itcl_ParseNamespPath_TCL_DECLARED
#define Itcl_ParseNamespPath_TCL_DECLARED
/* 11 */
TCL_EXTERN(void) Itcl_ParseNamespPath _ANSI_ARGS_((CONST char * name,
Tcl_DString * buffer, char ** head,
TCL_EXTERN(void) Itcl_ParseNamespPath _ANSI_ARGS_((CONST char * name,
Tcl_DString * buffer, char ** head,
char ** tail));
#endif
#ifndef Itcl_DecodeScopedCommand_TCL_DECLARED
#define Itcl_DecodeScopedCommand_TCL_DECLARED
/* 12 */
TCL_EXTERN(int) Itcl_DecodeScopedCommand _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * name,
Tcl_Interp * interp, CONST char * name,
Tcl_Namespace ** rNsPtr, char ** rCmdPtr));
#endif
#ifndef Itcl_EvalArgs_TCL_DECLARED
#define Itcl_EvalArgs_TCL_DECLARED
/* 13 */
TCL_EXTERN(int) Itcl_EvalArgs _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_EvalArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_CreateArgs_TCL_DECLARED
#define Itcl_CreateArgs_TCL_DECLARED
/* 14 */
TCL_EXTERN(Tcl_Obj*) Itcl_CreateArgs _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * string, int objc,
TCL_EXTERN(Tcl_Obj*) Itcl_CreateArgs _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * string, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_PushContext_TCL_DECLARED
#define Itcl_PushContext_TCL_DECLARED
/* 15 */
TCL_EXTERN(int) Itcl_PushContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclMember * member,
ItclClass * contextClass,
ItclObject * contextObj,
TCL_EXTERN(int) Itcl_PushContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclMember * member,
ItclClass * contextClass,
ItclObject * contextObj,
ItclContext * contextPtr));
#endif
#ifndef Itcl_PopContext_TCL_DECLARED
#define Itcl_PopContext_TCL_DECLARED
/* 16 */
TCL_EXTERN(void) Itcl_PopContext _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(void) Itcl_PopContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclContext * contextPtr));
#endif
#ifndef Itcl_GetContext_TCL_DECLARED
#define Itcl_GetContext_TCL_DECLARED
/* 17 */
TCL_EXTERN(int) Itcl_GetContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass ** cdefnPtr,
TCL_EXTERN(int) Itcl_GetContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass ** cdefnPtr,
ItclObject ** odefnPtr));
#endif
#ifndef Itcl_InitHierIter_TCL_DECLARED
#define Itcl_InitHierIter_TCL_DECLARED
/* 18 */
TCL_EXTERN(void) Itcl_InitHierIter _ANSI_ARGS_((ItclHierIter * iter,
TCL_EXTERN(void) Itcl_InitHierIter _ANSI_ARGS_((ItclHierIter * iter,
ItclClass * cdefn));
#endif
#ifndef Itcl_DeleteHierIter_TCL_DECLARED
@@ -159,63 +159,63 @@ TCL_EXTERN(ItclClass*) Itcl_AdvanceHierIter _ANSI_ARGS_((
#define Itcl_FindClassesCmd_TCL_DECLARED
/* 21 */
TCL_EXTERN(int) Itcl_FindClassesCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_FindObjectsCmd_TCL_DECLARED
#define Itcl_FindObjectsCmd_TCL_DECLARED
/* 22 */
TCL_EXTERN(int) Itcl_FindObjectsCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ProtectionCmd_TCL_DECLARED
#define Itcl_ProtectionCmd_TCL_DECLARED
/* 23 */
TCL_EXTERN(int) Itcl_ProtectionCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_DelClassCmd_TCL_DECLARED
#define Itcl_DelClassCmd_TCL_DECLARED
/* 24 */
TCL_EXTERN(int) Itcl_DelClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_DelClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_DelObjectCmd_TCL_DECLARED
#define Itcl_DelObjectCmd_TCL_DECLARED
/* 25 */
TCL_EXTERN(int) Itcl_DelObjectCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_DelObjectCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ScopeCmd_TCL_DECLARED
#define Itcl_ScopeCmd_TCL_DECLARED
/* 26 */
TCL_EXTERN(int) Itcl_ScopeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ScopeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_CodeCmd_TCL_DECLARED
#define Itcl_CodeCmd_TCL_DECLARED
/* 27 */
TCL_EXTERN(int) Itcl_CodeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_CodeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_StubCreateCmd_TCL_DECLARED
#define Itcl_StubCreateCmd_TCL_DECLARED
/* 28 */
TCL_EXTERN(int) Itcl_StubCreateCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_StubExistsCmd_TCL_DECLARED
#define Itcl_StubExistsCmd_TCL_DECLARED
/* 29 */
TCL_EXTERN(int) Itcl_StubExistsCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_IsStub_TCL_DECLARED
@@ -226,14 +226,14 @@ TCL_EXTERN(int) Itcl_IsStub _ANSI_ARGS_((Tcl_Command cmd));
#ifndef Itcl_CreateClass_TCL_DECLARED
#define Itcl_CreateClass_TCL_DECLARED
/* 31 */
TCL_EXTERN(int) Itcl_CreateClass _ANSI_ARGS_((Tcl_Interp* interp,
CONST char* path, ItclObjectInfo * info,
TCL_EXTERN(int) Itcl_CreateClass _ANSI_ARGS_((Tcl_Interp* interp,
CONST char* path, ItclObjectInfo * info,
ItclClass ** rPtr));
#endif
#ifndef Itcl_DeleteClass_TCL_DECLARED
#define Itcl_DeleteClass_TCL_DECLARED
/* 32 */
TCL_EXTERN(int) Itcl_DeleteClass _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_DeleteClass _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass * cdefnPtr));
#endif
#ifndef Itcl_FindClassNamespace_TCL_DECLARED
@@ -245,32 +245,32 @@ TCL_EXTERN(Tcl_Namespace*) Itcl_FindClassNamespace _ANSI_ARGS_((
#ifndef Itcl_HandleClass_TCL_DECLARED
#define Itcl_HandleClass_TCL_DECLARED
/* 34 */
TCL_EXTERN(int) Itcl_HandleClass _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_HandleClass _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassCmdResolver_TCL_DECLARED
#define Itcl_ClassCmdResolver_TCL_DECLARED
/* 35 */
TCL_EXTERN(int) Itcl_ClassCmdResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Command * rPtr));
#endif
#ifndef Itcl_ClassVarResolver_TCL_DECLARED
#define Itcl_ClassVarResolver_TCL_DECLARED
/* 36 */
TCL_EXTERN(int) Itcl_ClassVarResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Var * rPtr));
#endif
#ifndef Itcl_ClassCompiledVarResolver_TCL_DECLARED
#define Itcl_ClassCompiledVarResolver_TCL_DECLARED
/* 37 */
TCL_EXTERN(int) Itcl_ClassCompiledVarResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* name,
int length, Tcl_Namespace * context,
Tcl_Interp * interp, CONST char* name,
int length, Tcl_Namespace * context,
Tcl_ResolvedVarInfo ** rPtr));
#endif
#ifndef Itcl_BuildVirtualTables_TCL_DECLARED
@@ -282,8 +282,8 @@ TCL_EXTERN(void) Itcl_BuildVirtualTables _ANSI_ARGS_((
#ifndef Itcl_CreateVarDefn_TCL_DECLARED
#define Itcl_CreateVarDefn_TCL_DECLARED
/* 39 */
TCL_EXTERN(int) Itcl_CreateVarDefn _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass* cdefn, char* name, char* init,
TCL_EXTERN(int) Itcl_CreateVarDefn _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass* cdefn, char* name, char* init,
char* config, ItclVarDefn** vdefnPtr));
#endif
#ifndef Itcl_DeleteVarDefn_TCL_DECLARED
@@ -294,13 +294,13 @@ TCL_EXTERN(void) Itcl_DeleteVarDefn _ANSI_ARGS_((ItclVarDefn * vdefn));
#ifndef Itcl_GetCommonVar_TCL_DECLARED
#define Itcl_GetCommonVar_TCL_DECLARED
/* 41 */
TCL_EXTERN(CONST char*) Itcl_GetCommonVar _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(CONST char*) Itcl_GetCommonVar _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * name, ItclClass * contextClass));
#endif
#ifndef Itcl_CreateMember_TCL_DECLARED
#define Itcl_CreateMember_TCL_DECLARED
/* 42 */
TCL_EXTERN(ItclMember*) Itcl_CreateMember _ANSI_ARGS_((Tcl_Interp* interp,
TCL_EXTERN(ItclMember*) Itcl_CreateMember _ANSI_ARGS_((Tcl_Interp* interp,
ItclClass * cdefn, CONST char* name));
#endif
#ifndef Itcl_DeleteMember_TCL_DECLARED
@@ -311,87 +311,87 @@ TCL_EXTERN(void) Itcl_DeleteMember _ANSI_ARGS_((ItclMember * memPtr));
#ifndef Itcl_CreateObject_TCL_DECLARED
#define Itcl_CreateObject_TCL_DECLARED
/* 44 */
TCL_EXTERN(int) Itcl_CreateObject _ANSI_ARGS_((Tcl_Interp * interp,
CONST char* name, ItclClass * cdefn,
int objc, Tcl_Obj *CONST objv[],
TCL_EXTERN(int) Itcl_CreateObject _ANSI_ARGS_((Tcl_Interp * interp,
CONST char* name, ItclClass * cdefn,
int objc, Tcl_Obj *CONST objv[],
ItclObject ** roPtr));
#endif
#ifndef Itcl_DeleteObject_TCL_DECLARED
#define Itcl_DeleteObject_TCL_DECLARED
/* 45 */
TCL_EXTERN(int) Itcl_DeleteObject _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_DeleteObject _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj));
#endif
#ifndef Itcl_DestructObject_TCL_DECLARED
#define Itcl_DestructObject_TCL_DECLARED
/* 46 */
TCL_EXTERN(int) Itcl_DestructObject _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_DestructObject _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj, int flags));
#endif
#ifndef Itcl_HandleInstance_TCL_DECLARED
#define Itcl_HandleInstance_TCL_DECLARED
/* 47 */
TCL_EXTERN(int) Itcl_HandleInstance _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_GetInstanceVar_TCL_DECLARED
#define Itcl_GetInstanceVar_TCL_DECLARED
/* 48 */
TCL_EXTERN(CONST char*) Itcl_GetInstanceVar _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * name,
ItclObject * contextObj,
Tcl_Interp * interp, CONST char * name,
ItclObject * contextObj,
ItclClass * contextClass));
#endif
#ifndef Itcl_ScopedVarResolver_TCL_DECLARED
#define Itcl_ScopedVarResolver_TCL_DECLARED
/* 49 */
TCL_EXTERN(int) Itcl_ScopedVarResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * name,
Tcl_Namespace * contextNs, int flags,
Tcl_Interp * interp, CONST char * name,
Tcl_Namespace * contextNs, int flags,
Tcl_Var * rPtr));
#endif
#ifndef Itcl_BodyCmd_TCL_DECLARED
#define Itcl_BodyCmd_TCL_DECLARED
/* 50 */
TCL_EXTERN(int) Itcl_BodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ConfigBodyCmd_TCL_DECLARED
#define Itcl_ConfigBodyCmd_TCL_DECLARED
/* 51 */
TCL_EXTERN(int) Itcl_ConfigBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ConfigBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_CreateMethod_TCL_DECLARED
#define Itcl_CreateMethod_TCL_DECLARED
/* 52 */
TCL_EXTERN(int) Itcl_CreateMethod _ANSI_ARGS_((Tcl_Interp* interp,
ItclClass * cdefn, CONST char* name,
TCL_EXTERN(int) Itcl_CreateMethod _ANSI_ARGS_((Tcl_Interp* interp,
ItclClass * cdefn, CONST char* name,
CONST char* arglist, CONST char* body));
#endif
#ifndef Itcl_CreateProc_TCL_DECLARED
#define Itcl_CreateProc_TCL_DECLARED
/* 53 */
TCL_EXTERN(int) Itcl_CreateProc _ANSI_ARGS_((Tcl_Interp* interp,
ItclClass * cdefn, CONST char* name,
TCL_EXTERN(int) Itcl_CreateProc _ANSI_ARGS_((Tcl_Interp* interp,
ItclClass * cdefn, CONST char* name,
CONST char* arglist, CONST char* body));
#endif
#ifndef Itcl_CreateMemberFunc_TCL_DECLARED
#define Itcl_CreateMemberFunc_TCL_DECLARED
/* 54 */
TCL_EXTERN(int) Itcl_CreateMemberFunc _ANSI_ARGS_((
Tcl_Interp* interp, ItclClass * cdefn,
CONST char* name, CONST char* arglist,
Tcl_Interp* interp, ItclClass * cdefn,
CONST char* name, CONST char* arglist,
CONST char* body, ItclMemberFunc** mfuncPtr));
#endif
#ifndef Itcl_ChangeMemberFunc_TCL_DECLARED
#define Itcl_ChangeMemberFunc_TCL_DECLARED
/* 55 */
TCL_EXTERN(int) Itcl_ChangeMemberFunc _ANSI_ARGS_((
Tcl_Interp* interp, ItclMemberFunc* mfunc,
Tcl_Interp* interp, ItclMemberFunc* mfunc,
CONST char* arglist, CONST char* body));
#endif
#ifndef Itcl_DeleteMemberFunc_TCL_DECLARED
@@ -403,8 +403,8 @@ TCL_EXTERN(void) Itcl_DeleteMemberFunc _ANSI_ARGS_((CONST char* cdata));
#define Itcl_CreateMemberCode_TCL_DECLARED
/* 57 */
TCL_EXTERN(int) Itcl_CreateMemberCode _ANSI_ARGS_((
Tcl_Interp* interp, ItclClass * cdefn,
CONST char* arglist, CONST char* body,
Tcl_Interp* interp, ItclClass * cdefn,
CONST char* arglist, CONST char* body,
ItclMemberCode** mcodePtr));
#endif
#ifndef Itcl_DeleteMemberCode_TCL_DECLARED
@@ -415,29 +415,29 @@ TCL_EXTERN(void) Itcl_DeleteMemberCode _ANSI_ARGS_((char* cdata));
#ifndef Itcl_GetMemberCode_TCL_DECLARED
#define Itcl_GetMemberCode_TCL_DECLARED
/* 59 */
TCL_EXTERN(int) Itcl_GetMemberCode _ANSI_ARGS_((Tcl_Interp* interp,
TCL_EXTERN(int) Itcl_GetMemberCode _ANSI_ARGS_((Tcl_Interp* interp,
ItclMember* member));
#endif
/* Slot 60 is reserved */
#ifndef Itcl_EvalMemberCode_TCL_DECLARED
#define Itcl_EvalMemberCode_TCL_DECLARED
/* 61 */
TCL_EXTERN(int) Itcl_EvalMemberCode _ANSI_ARGS_((Tcl_Interp * interp,
ItclMemberFunc * mfunc, ItclMember * member,
ItclObject * contextObj, int objc,
TCL_EXTERN(int) Itcl_EvalMemberCode _ANSI_ARGS_((Tcl_Interp * interp,
ItclMemberFunc * mfunc, ItclMember * member,
ItclObject * contextObj, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_CreateArgList_TCL_DECLARED
#define Itcl_CreateArgList_TCL_DECLARED
/* 62 */
TCL_EXTERN(int) Itcl_CreateArgList _ANSI_ARGS_((Tcl_Interp* interp,
CONST char* decl, int* argcPtr,
TCL_EXTERN(int) Itcl_CreateArgList _ANSI_ARGS_((Tcl_Interp* interp,
CONST char* decl, int* argcPtr,
CompiledLocal** argPtr));
#endif
#ifndef Itcl_CreateArg_TCL_DECLARED
#define Itcl_CreateArg_TCL_DECLARED
/* 63 */
TCL_EXTERN(CompiledLocal*) Itcl_CreateArg _ANSI_ARGS_((CONST char* name,
TCL_EXTERN(CompiledLocal*) Itcl_CreateArg _ANSI_ARGS_((CONST char* name,
CONST char* init));
#endif
#ifndef Itcl_DeleteArgList_TCL_DECLARED
@@ -449,57 +449,57 @@ TCL_EXTERN(void) Itcl_DeleteArgList _ANSI_ARGS_((
#ifndef Itcl_ArgList_TCL_DECLARED
#define Itcl_ArgList_TCL_DECLARED
/* 65 */
TCL_EXTERN(Tcl_Obj*) Itcl_ArgList _ANSI_ARGS_((int argc,
TCL_EXTERN(Tcl_Obj*) Itcl_ArgList _ANSI_ARGS_((int argc,
CompiledLocal* arglist));
#endif
#ifndef Itcl_EquivArgLists_TCL_DECLARED
#define Itcl_EquivArgLists_TCL_DECLARED
/* 66 */
TCL_EXTERN(int) Itcl_EquivArgLists _ANSI_ARGS_((CompiledLocal* arg1,
TCL_EXTERN(int) Itcl_EquivArgLists _ANSI_ARGS_((CompiledLocal* arg1,
int arg1c, CompiledLocal* arg2, int arg2c));
#endif
#ifndef Itcl_GetMemberFuncUsage_TCL_DECLARED
#define Itcl_GetMemberFuncUsage_TCL_DECLARED
/* 67 */
TCL_EXTERN(void) Itcl_GetMemberFuncUsage _ANSI_ARGS_((
ItclMemberFunc * mfunc,
ItclMemberFunc * mfunc,
ItclObject * contextObj, Tcl_Obj * objPtr));
#endif
#ifndef Itcl_ExecMethod_TCL_DECLARED
#define Itcl_ExecMethod_TCL_DECLARED
/* 68 */
TCL_EXTERN(int) Itcl_ExecMethod _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ExecMethod _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ExecProc_TCL_DECLARED
#define Itcl_ExecProc_TCL_DECLARED
/* 69 */
TCL_EXTERN(int) Itcl_ExecProc _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ExecProc _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_AssignArgs_TCL_DECLARED
#define Itcl_AssignArgs_TCL_DECLARED
/* 70 */
TCL_EXTERN(int) Itcl_AssignArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[],
TCL_EXTERN(int) Itcl_AssignArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[],
ItclMemberFunc * mfunc));
#endif
#ifndef Itcl_ConstructBase_TCL_DECLARED
#define Itcl_ConstructBase_TCL_DECLARED
/* 71 */
TCL_EXTERN(int) Itcl_ConstructBase _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj,
TCL_EXTERN(int) Itcl_ConstructBase _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj,
ItclClass * contextClass));
#endif
#ifndef Itcl_InvokeMethodIfExists_TCL_DECLARED
#define Itcl_InvokeMethodIfExists_TCL_DECLARED
/* 72 */
TCL_EXTERN(int) Itcl_InvokeMethodIfExists _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * name,
ItclClass * contextClass,
ItclObject * contextObj, int objc,
Tcl_Interp * interp, CONST char * name,
ItclClass * contextClass,
ItclObject * contextObj, int objc,
Tcl_Obj *CONST objv[]));
#endif
/* Slot 73 is reserved */
@@ -507,84 +507,84 @@ TCL_EXTERN(int) Itcl_InvokeMethodIfExists _ANSI_ARGS_((
#define Itcl_ReportFuncErrors_TCL_DECLARED
/* 74 */
TCL_EXTERN(int) Itcl_ReportFuncErrors _ANSI_ARGS_((
Tcl_Interp* interp, ItclMemberFunc * mfunc,
Tcl_Interp* interp, ItclMemberFunc * mfunc,
ItclObject * contextObj, int result));
#endif
#ifndef Itcl_ParseInit_TCL_DECLARED
#define Itcl_ParseInit_TCL_DECLARED
/* 75 */
TCL_EXTERN(int) Itcl_ParseInit _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_ParseInit _ANSI_ARGS_((Tcl_Interp * interp,
ItclObjectInfo * info));
#endif
#ifndef Itcl_ClassCmd_TCL_DECLARED
#define Itcl_ClassCmd_TCL_DECLARED
/* 76 */
TCL_EXTERN(int) Itcl_ClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassInheritCmd_TCL_DECLARED
#define Itcl_ClassInheritCmd_TCL_DECLARED
/* 77 */
TCL_EXTERN(int) Itcl_ClassInheritCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassProtectionCmd_TCL_DECLARED
#define Itcl_ClassProtectionCmd_TCL_DECLARED
/* 78 */
TCL_EXTERN(int) Itcl_ClassProtectionCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassConstructorCmd_TCL_DECLARED
#define Itcl_ClassConstructorCmd_TCL_DECLARED
/* 79 */
TCL_EXTERN(int) Itcl_ClassConstructorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassDestructorCmd_TCL_DECLARED
#define Itcl_ClassDestructorCmd_TCL_DECLARED
/* 80 */
TCL_EXTERN(int) Itcl_ClassDestructorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassMethodCmd_TCL_DECLARED
#define Itcl_ClassMethodCmd_TCL_DECLARED
/* 81 */
TCL_EXTERN(int) Itcl_ClassMethodCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassProcCmd_TCL_DECLARED
#define Itcl_ClassProcCmd_TCL_DECLARED
/* 82 */
TCL_EXTERN(int) Itcl_ClassProcCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_ClassProcCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassVariableCmd_TCL_DECLARED
#define Itcl_ClassVariableCmd_TCL_DECLARED
/* 83 */
TCL_EXTERN(int) Itcl_ClassVariableCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ClassCommonCmd_TCL_DECLARED
#define Itcl_ClassCommonCmd_TCL_DECLARED
/* 84 */
TCL_EXTERN(int) Itcl_ClassCommonCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_ParseVarResolver_TCL_DECLARED
#define Itcl_ParseVarResolver_TCL_DECLARED
/* 85 */
TCL_EXTERN(int) Itcl_ParseVarResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * contextNs, int flags,
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * contextNs, int flags,
Tcl_Var* rPtr));
#endif
#ifndef Itcl_BiInit_TCL_DECLARED
@@ -601,85 +601,85 @@ TCL_EXTERN(int) Itcl_InstallBiMethods _ANSI_ARGS_((
#ifndef Itcl_BiIsaCmd_TCL_DECLARED
#define Itcl_BiIsaCmd_TCL_DECLARED
/* 88 */
TCL_EXTERN(int) Itcl_BiIsaCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiIsaCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiConfigureCmd_TCL_DECLARED
#define Itcl_BiConfigureCmd_TCL_DECLARED
/* 89 */
TCL_EXTERN(int) Itcl_BiConfigureCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiCgetCmd_TCL_DECLARED
#define Itcl_BiCgetCmd_TCL_DECLARED
/* 90 */
TCL_EXTERN(int) Itcl_BiCgetCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiCgetCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiChainCmd_TCL_DECLARED
#define Itcl_BiChainCmd_TCL_DECLARED
/* 91 */
TCL_EXTERN(int) Itcl_BiChainCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiChainCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoClassCmd_TCL_DECLARED
#define Itcl_BiInfoClassCmd_TCL_DECLARED
/* 92 */
TCL_EXTERN(int) Itcl_BiInfoClassCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoClassCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoInheritCmd_TCL_DECLARED
#define Itcl_BiInfoInheritCmd_TCL_DECLARED
/* 93 */
TCL_EXTERN(int) Itcl_BiInfoInheritCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoInheritCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoHeritageCmd_TCL_DECLARED
#define Itcl_BiInfoHeritageCmd_TCL_DECLARED
/* 94 */
TCL_EXTERN(int) Itcl_BiInfoHeritageCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoHeritageCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoFunctionCmd_TCL_DECLARED
#define Itcl_BiInfoFunctionCmd_TCL_DECLARED
/* 95 */
TCL_EXTERN(int) Itcl_BiInfoFunctionCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoFunctionCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoVariableCmd_TCL_DECLARED
#define Itcl_BiInfoVariableCmd_TCL_DECLARED
/* 96 */
TCL_EXTERN(int) Itcl_BiInfoVariableCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoVariableCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoBodyCmd_TCL_DECLARED
#define Itcl_BiInfoBodyCmd_TCL_DECLARED
/* 97 */
TCL_EXTERN(int) Itcl_BiInfoBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_BiInfoArgsCmd_TCL_DECLARED
#define Itcl_BiInfoArgsCmd_TCL_DECLARED
/* 98 */
TCL_EXTERN(int) Itcl_BiInfoArgsCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_BiInfoArgsCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_DefaultInfoCmd_TCL_DECLARED
#define Itcl_DefaultInfoCmd_TCL_DECLARED
/* 99 */
TCL_EXTERN(int) Itcl_DefaultInfoCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_DefaultInfoCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_EnsembleInit_TCL_DECLARED
@@ -690,24 +690,24 @@ TCL_EXTERN(int) Itcl_EnsembleInit _ANSI_ARGS_((Tcl_Interp * interp));
#ifndef Itcl_CreateEnsemble_TCL_DECLARED
#define Itcl_CreateEnsemble_TCL_DECLARED
/* 101 */
TCL_EXTERN(int) Itcl_CreateEnsemble _ANSI_ARGS_((Tcl_Interp * interp,
TCL_EXTERN(int) Itcl_CreateEnsemble _ANSI_ARGS_((Tcl_Interp * interp,
CONST char* ensName));
#endif
#ifndef Itcl_AddEnsemblePart_TCL_DECLARED
#define Itcl_AddEnsemblePart_TCL_DECLARED
/* 102 */
TCL_EXTERN(int) Itcl_AddEnsemblePart _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* ensName,
CONST char* partName, CONST char* usageInfo,
Tcl_ObjCmdProc * objProc,
ClientData clientData,
Tcl_Interp * interp, CONST char* ensName,
CONST char* partName, CONST char* usageInfo,
Tcl_ObjCmdProc * objProc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
#endif
#ifndef Itcl_GetEnsemblePart_TCL_DECLARED
#define Itcl_GetEnsemblePart_TCL_DECLARED
/* 103 */
TCL_EXTERN(int) Itcl_GetEnsemblePart _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * ensName,
Tcl_Interp * interp, CONST char * ensName,
CONST char * partName, Tcl_CmdInfo * infoPtr));
#endif
#ifndef Itcl_IsEnsemble_TCL_DECLARED
@@ -719,35 +719,35 @@ TCL_EXTERN(int) Itcl_IsEnsemble _ANSI_ARGS_((Tcl_CmdInfo* infoPtr));
#define Itcl_GetEnsembleUsage_TCL_DECLARED
/* 105 */
TCL_EXTERN(int) Itcl_GetEnsembleUsage _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * ensName,
Tcl_Interp * interp, CONST char * ensName,
Tcl_Obj * objPtr));
#endif
#ifndef Itcl_GetEnsembleUsageForObj_TCL_DECLARED
#define Itcl_GetEnsembleUsageForObj_TCL_DECLARED
/* 106 */
TCL_EXTERN(int) Itcl_GetEnsembleUsageForObj _ANSI_ARGS_((
Tcl_Interp * interp, Tcl_Obj * ensObjPtr,
Tcl_Interp * interp, Tcl_Obj * ensObjPtr,
Tcl_Obj * objPtr));
#endif
#ifndef Itcl_EnsembleCmd_TCL_DECLARED
#define Itcl_EnsembleCmd_TCL_DECLARED
/* 107 */
TCL_EXTERN(int) Itcl_EnsembleCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_EnsembleCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_EnsPartCmd_TCL_DECLARED
#define Itcl_EnsPartCmd_TCL_DECLARED
/* 108 */
TCL_EXTERN(int) Itcl_EnsPartCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_EnsPartCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_EnsembleErrorCmd_TCL_DECLARED
#define Itcl_EnsembleErrorCmd_TCL_DECLARED
/* 109 */
TCL_EXTERN(int) Itcl_EnsembleErrorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
#endif
/* Slot 110 is reserved */
@@ -762,7 +762,7 @@ TCL_EXTERN(Itcl_CallFrame*) _Tcl_GetCallFrame _ANSI_ARGS_((
#define _Tcl_ActivateCallFrame_TCL_DECLARED
/* 113 */
TCL_EXTERN(Itcl_CallFrame*) _Tcl_ActivateCallFrame _ANSI_ARGS_((
Tcl_Interp * interp,
Tcl_Interp * interp,
Itcl_CallFrame * framePtr));
#endif
#ifndef _TclNewVar_TCL_DECLARED
@@ -773,21 +773,21 @@ TCL_EXTERN(Var*) _TclNewVar _ANSI_ARGS_((void));
#ifndef Itcl_Assert_TCL_DECLARED
#define Itcl_Assert_TCL_DECLARED
/* 115 */
TCL_EXTERN(void) Itcl_Assert _ANSI_ARGS_((CONST char * testExpr,
TCL_EXTERN(void) Itcl_Assert _ANSI_ARGS_((CONST char * testExpr,
CONST char * fileName, int lineNum));
#endif
#ifndef Itcl_IsObjectCmd_TCL_DECLARED
#define Itcl_IsObjectCmd_TCL_DECLARED
/* 116 */
TCL_EXTERN(int) Itcl_IsObjectCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_IsObjectCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
#ifndef Itcl_IsClassCmd_TCL_DECLARED
#define Itcl_IsClassCmd_TCL_DECLARED
/* 117 */
TCL_EXTERN(int) Itcl_IsClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
TCL_EXTERN(int) Itcl_IsClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
#endif
-1
View File
@@ -58,4 +58,3 @@ endif (ENABLE_IWIDGETS)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+1
View File
@@ -24,6 +24,7 @@ if (ENABLE_JPEG)
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
-DCMAKE_INSTALL_LIBDIR:PATH=${LIB_DIR}
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
LOG_CONFIGURE ${EXT_BUILD_QUIET}
LOG_BUILD ${EXT_BUILD_QUIET}
LOG_INSTALL ${EXT_BUILD_QUIET}
+5 -2
View File
@@ -16,9 +16,12 @@ if (NOT MSVC)
URL "${CMAKE_CURRENT_SOURCE_DIR}/LIEF"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_cmake.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_elf_symbol_demangle_guard.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_fscale_macro_fix.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_gnuhash_debug_fix.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_major_minor_macro_fix.patch
# FreeBSD linkers can emit multiple BSS-like LOAD segments. LIEF 1.0
# rejects those binaries during PHDR relocation, and its gap relocator
# can extend a LOAD beyond the next segment's virtual address.
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/lief_elf_phdr_relocation.patch
CMAKE_ARGS
${BUILD_TYPE_SPECIFIER}
-DBIN_DIR=${BIN_DIR}
+5 -4
View File
@@ -1,9 +1,10 @@
diff -Naur LIEF/CMakeLists.txt LIEF_BLD/CMakeLists.txt
--- LIEF/CMakeLists.txt 2026-02-05 12:03:01.774599713 -0500
+++ LIEF_BLD/CMakeLists.txt 2026-02-05 12:03:42.945448427 -0500
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 334f6f83..d9b0db12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.24)
+cmake_minimum_required(VERSION 3.22)
project(LIEF LANGUAGES C CXX)
enable_language(C)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+97
View File
@@ -0,0 +1,97 @@
diff --git a/src/ELF/Binary.cpp b/src/ELF/Binary.cpp
index 5ce58838d2..241eedb35e 100644
--- a/src/ELF/Binary.cpp
+++ b/src/ELF/Binary.cpp
@@ -3018,21 +3018,30 @@ uint64_t Binary::relocate_phdr_table_v2() {
sizeof(details::ELF64::Elf_Phdr);
- std::vector<Segment*> load_seg;
- Segment* bss_segment = nullptr;
- size_t bss_cnt = 0;
+ Segment* last_file_load = nullptr;
+ Segment* last_virtual_load = nullptr;
for (std::unique_ptr<Segment>& segment : segments_) {
- if (segment->is_load()) {
- load_seg.push_back(segment.get());
- if (segment->physical_size() < segment->virtual_size()) {
- bss_segment = segment.get();
- ++bss_cnt;
- }
+ if (!segment->is_load()) {
+ continue;
}
+ if (last_file_load == nullptr ||
+ last_file_load->file_offset() < segment->file_offset()) {
+ last_file_load = segment.get();
+ }
+ if (last_virtual_load == nullptr ||
+ last_virtual_load->virtual_address() < segment->virtual_address()) {
+ last_virtual_load = segment.get();
+ }
+ }
+
+ if (last_file_load == nullptr || last_file_load != last_virtual_load) {
+ LIEF_ERR("Unable to identify a unique final LOAD segment");
+ return 0;
}
- if (bss_cnt != 1 || bss_segment == nullptr) {
- LIEF_ERR("Expected exactly 1 BSS-like segment");
+ Segment* bss_segment = last_file_load;
+ if (bss_segment->physical_size() >= bss_segment->virtual_size()) {
+ LIEF_ERR("The final LOAD segment is not BSS-like");
return 0;
}
@@ -3159,6 +3168,11 @@ uint64_t Binary::relocate_phdr_table_v2() {
phdr_segment->file_offset(nsegment_addr->file_offset());
phdr_segment->virtual_address(nsegment_addr->virtual_address());
phdr_segment->physical_address(nsegment_addr->physical_address());
+ // PT_PHDR must describe the area we just reserved. Otherwise, it would
+ // keep the size of its previous location which is likely to no longer be
+ // wrapped by a PT_LOAD segment.
+ phdr_segment->physical_size(nsegment_addr->physical_size());
+ phdr_segment->virtual_size(nsegment_addr->virtual_size());
phdr_segment->clear();
}
@@ -3238,14 +3252,20 @@ uint64_t Binary::relocate_phdr_table_v1() {
continue;
}
Segment* adjacent = load_seg[i + 1];
- const int64_t gap = adjacent->file_offset() -
- (current->file_offset() + current->physical_size());
- if (gap <= 0) {
+ const int64_t file_gap = adjacent->file_offset() -
+ (current->file_offset() + current->physical_size());
+ const int64_t virtual_gap = adjacent->virtual_address() -
+ (current->virtual_address() + current->virtual_size());
+ if (file_gap <= 0 || virtual_gap <= 0) {
continue;
}
+ // Extending the segment through a larger file gap would overlap the next
+ // LOAD in memory when their file and virtual layouts differ.
+ const int64_t gap = std::min(file_gap, virtual_gap);
const size_t nb_seg_gap = gap / phdr_size;
- LIEF_DEBUG("Gap between {:d} <-> {:d}: {:x} ({:d} segments)", i, i + 1, gap,
+ LIEF_DEBUG("Gap between {:d} <-> {:d}: file={:x}, virtual={:x} "
+ "({:d} segments usable)", i, i + 1, file_gap, virtual_gap,
nb_seg_gap);
if (nb_seg_gap > potential_size) {
seg_to_extend = current;
@@ -3275,8 +3295,11 @@ uint64_t Binary::relocate_phdr_table_v1() {
// Extend the segment that wraps the next PHDR table so that it is contiguous
// with the next segment.
- int64_t delta = next_to_extend->file_offset() -
- (seg_to_extend->file_offset() + seg_to_extend->physical_size());
+ const int64_t file_gap = next_to_extend->file_offset() -
+ (seg_to_extend->file_offset() + seg_to_extend->physical_size());
+ const int64_t virtual_gap = next_to_extend->virtual_address() -
+ (seg_to_extend->virtual_address() + seg_to_extend->virtual_size());
+ const int64_t delta = std::min(file_gap, virtual_gap);
if (delta <= 0) {
return 0;
}
-26
View File
@@ -1,26 +0,0 @@
diff -Naur LIEF/src/ELF/Symbol.cpp LIEF_BLD/src/ELF/Symbol.cpp
--- LIEF/src/ELF/Symbol.cpp 2026-07-01 09:26:59.559741917 -0400
+++ LIEF_BLD/src/ELF/Symbol.cpp 2026-07-01 09:28:31.414010111 -0400
@@ -90,15 +90,20 @@
} else {
#if defined(__unix__)
int status;
- const std::string& name = this->name().c_str();
+ const std::string& name = this->name();
+ if (name.rfind("_Z", 0) != 0) {
+ return name;
+ }
+
char* demangled_name = abi::__cxa_demangle(name.c_str(), nullptr, nullptr, &status);
- if (status == 0) {
+ if (status == 0 && demangled_name != nullptr) {
std::string realname = demangled_name;
free(demangled_name);
return realname;
}
+ free(demangled_name); // NOLINT(cppcoreguidelines-no-malloc)
return name;
#else
return "";
-16
View File
@@ -1,16 +0,0 @@
diff -Naur LIEF/src/ELF/ExeLayout.hpp LIEF_BLD/src/ELF/ExeLayout.hpp
--- LIEF/src/ELF/ExeLayout.hpp 2026-07-01 09:31:32.857666677 -0400
+++ LIEF_BLD/src/ELF/ExeLayout.hpp 2026-07-01 09:32:35.642528989 -0400
@@ -380,7 +380,11 @@
std::vector<uint32_t> hash_values(dynamic_symbols.size() - symndx, 0);
for (size_t i = symndx; i < dynamic_symbols.size(); ++i) {
- LIEF_DEBUG("Dealing with symbol {}", to_string(dynamic_symbols[i]));
+ // Avoid stringifying the symbol here: Symbol::operator<< demangles
+ // names, and this debug argument is evaluated even when debug logging
+ // is disabled. The GNU hash rebuild only needs the raw symbol name.
+ // Causes a crash with QtCore-style malformed symbols.
+ LIEF_DEBUG("Dealing with symbol {}", dynamic_symbols[i].name());
const uint32_t hash = dl_new_hash(dynamic_symbols[i].name().c_str());
int bucket = hash % nb_buckets;
+34
View File
@@ -0,0 +1,34 @@
diff --git a/include/LIEF/runtime/osx/Host.hpp b/include/LIEF/runtime/osx/Host.hpp
index bc366a58..7e155749 100644
--- a/include/LIEF/runtime/osx/Host.hpp
+++ b/include/LIEF/runtime/osx/Host.hpp
@@ -32,9 +32,9 @@ class LIEF_API Host {
uint32_t patch = 0;
version_t(uint32_t major, uint32_t minor, uint32_t patch) :
- major(major),
- minor(minor),
- patch(patch) {}
+ major{major},
+ minor{minor},
+ patch{patch} {}
bool operator<=(const version_t& rhs) const;
bool operator>(const version_t& rhs) const {
diff --git a/include/LIEF/runtime/windows/Host.hpp b/include/LIEF/runtime/windows/Host.hpp
index ba5c8694..8c37cbad 100644
--- a/include/LIEF/runtime/windows/Host.hpp
+++ b/include/LIEF/runtime/windows/Host.hpp
@@ -35,9 +35,9 @@ class LIEF_API Host {
version_t() = default;
version_t(uint32_t major, uint32_t minor, uint32_t build_number) :
- major(major),
- minor(minor),
- build_number(build_number) {}
+ major{major},
+ minor{minor},
+ build_number{build_number} {}
bool operator<=(const version_t& rhs) const;
bool operator>(const version_t& rhs) const {
+2
View File
@@ -59,6 +59,7 @@ if (ENABLE_LLVM)
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_DOCS=OFF
-DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF
-DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -116,6 +117,7 @@ if (ENABLE_LLVM)
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_DOCS=OFF
-DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF
-DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+1 -1
View File
@@ -3,7 +3,7 @@ bext_enable(LZ4)
if (ENABLE_LZ4)
git_submodule_init(lz4 CMakeLists.txt)
git_submodule_init(lz4 build/cmake/CMakeLists.txt)
RegisterDeps(LZ4)
+3 -2
View File
@@ -1,5 +1,5 @@
# Decide if we're using Manifold
cad_enable(MANIFOLD "librt;libged")
cad_enable(MANIFOLD "libbg;librt;libged")
bext_enable(MANIFOLD)
@@ -16,7 +16,8 @@ if (ENABLE_MANIFOLD)
ExternalProject_Add(MANIFOLD_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/manifold"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/manifold.patch
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/manifold_static.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/manifold_alloc.patch
CMAKE_ARGS
${BUILD_TYPE_SPECIFIER}
$<$<BOOL:${CLIPPER2_TARGET}>:-DClipper2_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}>
-78
View File
@@ -1,78 +0,0 @@
diff -Naur MANIFOLD/CMakeLists.txt MANIFOLD_BLD/CMakeLists.txt
--- MANIFOLD/CMakeLists.txt 2026-04-30 12:43:33.539859541 -0400
+++ MANIFOLD_BLD/CMakeLists.txt 2026-04-30 12:48:59.647836994 -0400
@@ -36,6 +36,9 @@
"${MANIFOLD_VERSION_MAJOR}.${MANIFOLD_VERSION_MINOR}.${MANIFOLD_VERSION_PATCH}"
)
+# Toggle to also build a static library
+option(BUILD_STATIC_LIBS "Build a static library (manifold-static) alongside the shared library" OFF)
+
# Primary user facing options
option(MANIFOLD_CROSS_SECTION "Build CrossSection for 2D support" ON)
option(MANIFOLD_DEBUG "Enable debug tracing/timing" OFF)
diff -Naur MANIFOLD/src/CMakeLists.txt MANIFOLD_BLD/src/CMakeLists.txt
--- MANIFOLD/src/CMakeLists.txt 2026-04-30 12:43:33.531859567 -0400
+++ MANIFOLD_BLD/src/CMakeLists.txt 2026-04-30 12:53:50.548912999 -0400
@@ -102,6 +102,60 @@
PRIVATE ${MANIFOLD_INCLUDE_DIRS}
)
+install(TARGETS manifold EXPORT manifoldTargets)
+
exportlib(manifold)
-install(TARGETS manifold EXPORT manifoldTargets)
+# -----------------------------------------------------------------------
+# Optional static library target
+# -----------------------------------------------------------------------
+if(BUILD_STATIC_LIBS)
+ add_library(manifold_static STATIC
+ ${MANIFOLD_SRCS} ${MANIFOLD_PRIVATE_HDRS}
+ )
+
+ set_target_properties(manifold_static PROPERTIES
+ OUTPUT_NAME manifold
+ EXPORT_NAME manifold-static
+ )
+
+ target_compile_features(manifold_static PUBLIC cxx_std_17)
+ target_compile_options(manifold_static PRIVATE ${MANIFOLD_FLAGS})
+
+ # Reuse the OPTIONS list already set above for the shared target.
+ foreach(OPT IN LISTS OPTIONS)
+ if(${${OPT}})
+ target_compile_definitions(manifold_static PUBLIC ${OPT})
+ endif()
+ endforeach()
+ if(MANIFOLD_PAR)
+ target_compile_definitions(manifold_static PUBLIC MANIFOLD_PAR=1)
+ else()
+ target_compile_definitions(manifold_static PUBLIC MANIFOLD_PAR=-1)
+ endif()
+
+ target_include_directories(manifold_static
+ PUBLIC
+ $<INSTALL_INTERFACE:include>
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ PRIVATE
+ ${MANIFOLD_INCLUDE_DIRS}
+ )
+
+ target_link_libraries(manifold_static
+ PUBLIC
+ $<$<BOOL:${TRACY_ENABLE}>:TracyClient>
+ PRIVATE
+ $<$<BOOL:${MANIFOLD_CROSS_SECTION}>:Clipper2::Clipper2-static>
+ $<$<BOOL:${MANIFOLD_PAR}>:TBB::tbb>
+ $<$<BOOL:${MANIFOLD_EXPORT}>:assimp::assimp>
+ )
+
+ install(TARGETS manifold_static EXPORT manifoldTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+
+endif()
+
+167
View File
@@ -0,0 +1,167 @@
--- MANIFOLD/src/vec.h
+++ MANIFOLD_BLD/src/vec.h
@@ -31,6 +31,10 @@
#define ZoneScoped
#define ZoneScopedN(name)
#endif
+#include <cstdlib>
+#include <limits>
+#include <memory>
+#include <new>
#include <vector>
#include "manifold/vec_view.h"
@@ -70,16 +74,14 @@
// Note that the vector constructed with this constructor will contain
// uninitialized memory. Please specify `val` if you need to make sure that
// the data is initialized.
- inline Vec(size_t size) : VecView<T>() {
+ inline Vec(size_t size) : Vec() {
ZoneScopedN("Vec(size)");
- if constexpr (shared) count_ = new std::atomic<int>(1);
reserve(size);
this->size_ = size;
}
- inline Vec(size_t size, T val) : VecView<T>() {
+ inline Vec(size_t size, T val) : Vec() {
ZoneScopedN("Vec(size, val)");
- if constexpr (shared) count_ = new std::atomic<int>(1);
resize(size, val);
}
@@ -112,17 +114,15 @@
moveContent(other);
}
- inline Vec(const VecView<const T>& vec) : VecView<T>() {
+ inline Vec(const VecView<const T>& vec) : Vec() {
ZoneScopedN("Vec(const VecView&)");
- if constexpr (shared) this->count_ = new std::atomic<int>(1);
this->size_ = vec.size();
this->capacity_ = this->size_;
auto policy = autoPolicy(this->size_);
if (this->size_ != 0) {
- this->ptr_ = reinterpret_cast<T*>(malloc(this->size_ * sizeof(T)));
- ASSERT(this->ptr_ != nullptr, std::bad_alloc());
- TracyAllocS(this->ptr_, this->size_ * sizeof(T), 3);
- copy(policy, vec.begin(), vec.end(), this->ptr_);
+ auto buffer = allocate(this->size_);
+ copy(policy, vec.begin(), vec.end(), buffer.get());
+ this->ptr_ = buffer.release();
}
}
@@ -137,8 +137,8 @@
Vec& operator=(const Vec& other) {
ZoneScopedN("Vec operator=(other)");
if (&other == this) return *this;
- dealloc();
if constexpr (shared) {
+ dealloc();
other.count_->fetch_add(1);
this->count_ = other.count_;
this->ptr_ = other.ptr_;
@@ -146,29 +146,15 @@
this->capacity_ = other.capacity_;
return *this;
}
- this->size_ = other.size_;
- this->capacity_ = other.size_;
- if (this->size_ != 0) {
- this->ptr_ = reinterpret_cast<T*>(malloc(this->size_ * sizeof(T)));
- ASSERT(this->ptr_ != nullptr, std::bad_alloc());
- TracyAllocS(this->ptr_, this->size_ * sizeof(T), 3);
- manifold::copy(other.begin(), other.end(), this->ptr_);
- }
+ Vec replacement(other.view());
+ swap(replacement);
return *this;
}
inline Vec<T, shared>& operator=(const Vec<T, !shared>& other) {
ZoneScopedN("Vec operator=(other)");
- dealloc();
- if constexpr (shared) this->count_ = new std::atomic<int>(1);
- this->size_ = other.size_;
- this->capacity_ = other.size_;
- if (this->size_ != 0) {
- this->ptr_ = reinterpret_cast<T*>(malloc(this->size_ * sizeof(T)));
- ASSERT(this->ptr_ != nullptr, std::bad_alloc());
- TracyAllocS(this->ptr_, this->size_ * sizeof(T), 3);
- manifold::copy(other.begin(), other.end(), this->ptr_);
- }
+ Vec replacement(other.view());
+ *this = std::move(replacement);
return *this;
}
@@ -221,17 +207,15 @@
void reserve(size_t n) {
AssertUnique();
if (n > capacity_) {
- T* newBuffer = reinterpret_cast<T*>(malloc(n * sizeof(T)));
- ASSERT(newBuffer != nullptr, std::bad_alloc());
- TracyAllocS(newBuffer, n * sizeof(T), 3);
+ auto newBuffer = allocate(n);
if (this->size_ > 0)
manifold::copy(autoPolicy(this->size_), this->ptr_,
- this->ptr_ + this->size_, newBuffer);
+ this->ptr_ + this->size_, newBuffer.get());
if (this->ptr_ != nullptr) {
TracyFreeS(this->ptr_, 3);
free(this->ptr_);
}
- this->ptr_ = newBuffer;
+ this->ptr_ = newBuffer.release();
capacity_ = n;
}
}
@@ -269,18 +253,16 @@
void shrink_to_fit() {
AssertUnique();
- T* newBuffer = nullptr;
+ Buffer newBuffer;
if (this->size_ > 0) {
- newBuffer = reinterpret_cast<T*>(malloc(this->size_ * sizeof(T)));
- ASSERT(newBuffer != nullptr, std::bad_alloc());
- TracyAllocS(newBuffer, this->size_ * sizeof(T), 3);
- manifold::copy(this->ptr_, this->ptr_ + this->size_, newBuffer);
+ newBuffer = allocate(this->size_);
+ manifold::copy(this->ptr_, this->ptr_ + this->size_, newBuffer.get());
}
if (this->ptr_ != nullptr) {
TracyFreeS(this->ptr_, 3);
free(this->ptr_);
}
- this->ptr_ = newBuffer;
+ this->ptr_ = newBuffer.release();
capacity_ = this->size_;
}
@@ -297,6 +279,24 @@
}
private:
+ struct BufferDeleter {
+ void operator()(T* pointer) const noexcept {
+ TracyFreeS(pointer, 3);
+ free(pointer);
+ }
+ };
+ using Buffer = std::unique_ptr<T, BufferDeleter>;
+
+ static Buffer allocate(size_t count) {
+ if (count > std::numeric_limits<size_t>::max() / sizeof(T))
+ throw std::bad_alloc();
+ T* pointer = reinterpret_cast<T*>(malloc(count * sizeof(T)));
+ // Allocation failures must be handled in release builds as well.
+ if (pointer == nullptr) throw std::bad_alloc();
+ TracyAllocS(pointer, count * sizeof(T), 3);
+ return Buffer(pointer);
+ }
+
size_t capacity_ = 0;
// Normally empty structs have size 1 (1 byte) to ensure every field has a
+81
View File
@@ -0,0 +1,81 @@
--- MANIFOLD/CMakeLists.txt
+++ MANIFOLD_BLD/CMakeLists.txt
@@ -114,6 +114,12 @@
option(CMAKE_BUILD_TYPE "Build type" Release)
# default to building shared library
option(BUILD_SHARED_LIBS "Build shared library" ON)
+# optionally build a static library alongside the shared library
+option(
+ BUILD_STATIC_LIBS
+ "Build a static library (manifold-static) alongside the shared library"
+ OFF
+)
# Set some option values in the CMake cache
set(MANIFOLD_FLAGS "" CACHE STRING "Manifold compiler flags")
--- MANIFOLD/src/CMakeLists.txt
+++ MANIFOLD_BLD/src/CMakeLists.txt
@@ -131,3 +131,63 @@
exportlib(manifold)
install(TARGETS manifold EXPORT manifoldTargets)
+
+if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
+ add_library(manifold_static STATIC ${MANIFOLD_SRCS} ${MANIFOLD_PRIVATE_HDRS})
+
+ set_target_properties(
+ manifold_static
+ PROPERTIES OUTPUT_NAME manifold EXPORT_NAME manifold-static
+ )
+
+ target_link_libraries(
+ manifold_static PUBLIC $<$<BOOL:${TRACY_ENABLE}>:TracyClient>
+ )
+
+ set(MANIFOLD_STATIC_CROSS_SECTION_LIBS ${MANIFOLD_CROSS_SECTION_LIBS})
+ if(
+ MANIFOLD_CROSS_SECTION
+ AND MANIFOLD_CROSS_SECTION_BACKEND STREQUAL "clipper2"
+ AND TARGET Clipper2::Clipper2-static
+ )
+ set(MANIFOLD_STATIC_CROSS_SECTION_LIBS Clipper2::Clipper2-static)
+ endif()
+ target_link_libraries(
+ manifold_static
+ PRIVATE
+ $<$<BOOL:${MANIFOLD_PAR}>:TBB::tbb>
+ ${MANIFOLD_STATIC_CROSS_SECTION_LIBS}
+ )
+
+ target_compile_options(manifold_static PRIVATE ${MANIFOLD_FLAGS})
+ target_compile_features(manifold_static PUBLIC cxx_std_17)
+ foreach(OPT IN LISTS OPTIONS)
+ if(${${OPT}})
+ target_compile_definitions(manifold_static PUBLIC ${OPT})
+ endif()
+ endforeach()
+ if(MANIFOLD_PAR)
+ target_compile_definitions(manifold_static PUBLIC MANIFOLD_PAR=1)
+ else()
+ target_compile_definitions(manifold_static PUBLIC MANIFOLD_PAR=-1)
+ endif()
+ if(MANIFOLD_NO_IOSTREAM)
+ target_compile_definitions(manifold_static PUBLIC MANIFOLD_NO_FILESYSTEM)
+ endif()
+
+ target_include_directories(
+ manifold_static
+ PUBLIC
+ $<INSTALL_INTERFACE:include>
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ PRIVATE ${MANIFOLD_INCLUDE_DIRS}
+ )
+
+ install(
+ TARGETS manifold_static
+ EXPORT manifoldTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+endif()
+12
View File
@@ -21,6 +21,17 @@ if (ENABLE_ONETBB)
RegisterDeps(ONETBB)
# lld treats undefined symbols named by a version script as an error. The
# oneTBB scripts include optional Intel runtime symbols that are not emitted
# by Clang builds, so retain the scripts while allowing those entries to be
# absent.
set(ONETBB_LINKER_ARGS)
if (CMAKE_CXX_COMPILER_LINKER_ID STREQUAL "LLD" OR
CMAKE_LINKER MATCHES "(^|/)ld\\.lld$")
list(APPEND ONETBB_LINKER_ARGS
-DCMAKE_SHARED_LINKER_FLAGS:STRING=-Wl,--undefined-version)
endif ()
ExternalProject_Add(ONETBB_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/oneTBB"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -30,6 +41,7 @@ if (ENABLE_ONETBB)
-DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR}
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
${ONETBB_LINKER_ARGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
+2 -2
View File
@@ -49,7 +49,7 @@ if (ENABLE_OPENCV)
-DBUILD_opencv_apps=ON
-DBUILD_opencv_calib3d=OFF
-DBUILD_opencv_core=ON
-DBUILD_opencv_dnn=ON
-DBUILD_opencv_dnn=OFF
-DBUILD_opencv_features2d=ON
-DBUILD_opencv_flann=ON
-DBUILD_opencv_highgui=ON
@@ -79,7 +79,7 @@ if (ENABLE_OPENCV)
-DWITH_CUDA=OFF
-DWITH_EIGEN=OFF
-DWITH_FFMPEG=OFF
-DWITH_FLATBUFFERS=ON
-DWITH_FLATBUFFERS=OFF
-DWITH_FREETYPE=OFF
-DWITH_GDAL=OFF
-DWITH_GDCM=OFF
-11
View File
@@ -36,17 +36,6 @@ diff -Naur opencv/CMakeLists.txt OPENCV_BLD/CMakeLists.txt
include(cmake/OpenCVMinDepVersions.cmake)
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
@@ -68,6 +70,10 @@
cmake_policy(SET CMP0071 NEW) # CMake 3.10+: Let `AUTOMOC` and `AUTOUIC` process `GENERATED` files.
endif()
+if (POLICY CMP0074)
+ cmake_policy(SET CMP0074 NEW) # CMake 3.12+: find_package() uses <PackageName>_ROOT variables.
+endif (POLICY CMP0074)
+
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) # CMake 3.12+: Include file check macros honor `CMAKE_REQUIRED_LIBRARIES`
endif()
@@ -1154,7 +1160,7 @@
if(ANDROID OR NOT UNIX)
install(FILES ${OPENCV_LICENSE_FILE}
+1
View File
@@ -28,6 +28,7 @@ if (ENABLE_OPENNURBS)
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_example_gl.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_file_utilities.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_font.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_memory.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_locale.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_object_history.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_optimize.patch
+85 -62
View File
@@ -1,20 +1,19 @@
diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
--- opennurbs/CMakeLists.txt 2025-06-25 09:11:59.869998909 -0400
+++ OPENNURBS_BLD/CMakeLists.txt 2025-06-23 21:34:18.813402896 -0400
--- opennurbs/CMakeLists.txt
+++ OPENNURBS_BLD/CMakeLists.txt
@@ -1,16 +1,57 @@
cmake_minimum_required (VERSION 3.16)
#set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
-project(opennurbs CXX)
+project(opennurbs C CXX)
+
+# Where to look for CMake modules
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
+
# specify the C++ standard
+set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
+# Generate position independent code by default (i.e. -fPIC)
+set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+
@@ -34,7 +33,7 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
if (UNIX AND NOT APPLE)
set(LINUX TRUE)
endif()
+# these are files no longer in upstream openNURBS but retained for reference
+set(OPENNURBS_REF
+ #opennurbs_basic.cpp
@@ -78,24 +77,27 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
opennurbs_xform.h
@@ -183,6 +226,7 @@
)
set( OPENNURBS_PUBLIC_SOURCES
+ ${OPENNURBS_REF}
opennurbs_3dm_attributes.cpp
opennurbs_3dm_properties.cpp
opennurbs_3dm_settings.cpp
@@ -378,6 +422,7 @@
@@ -378,6 +422,10 @@
opennurbs_zlib_memory.cpp
)
+list(REMOVE_ITEM OPENNURBS_PUBLIC_HEADERS ${OPENNURBS_OFF})
+list(REMOVE_ITEM OPENNURBS_PUBLIC_SOURCES ${OPENNURBS_OFF})
+
+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_plus.h)
set( OPENNURBS_PLUS_HEADERS
opennurbsRhino.pch
@@ -406,6 +451,10 @@
@@ -406,6 +454,10 @@
opennurbs_plus_x.h
)
+if (NOT HAVE_UUID_GENERATE AND NOT MSVC)
+ install(FILES android_uuid/uuid.h DESTINATION include/OpenNURBS/android_uuid)
+endif (NOT HAVE_UUID_GENERATE AND NOT MSVC)
@@ -103,10 +105,10 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
if (BUILD_TESTING)
LIST(APPEND OPENNURBS_PLUS_HEADERS opennurbs_plus_testheader.h)
endif(BUILD_TESTING)
@@ -469,12 +518,57 @@
@@ -469,13 +521,75 @@
)
endif() #OpenNURBS plus source files
-if (ANDROID OR LINUX)
- add_subdirectory(android_uuid)
- add_subdirectory(freetype263)
@@ -125,8 +127,25 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+endif(HAVE_SYS_STAT_H)
+
+find_package(ZLIB REQUIRED)
+set(OPENNURBS_LINKLIBRARIES ${ZLIB_LIBRARIES})
+
+if(TARGET ZLIB::ZLIB_SHARED)
+ set(OPENNURBS_LINKLIBRARIES ZLIB::ZLIB_SHARED)
+elseif(TARGET ZLIB::ZLIB)
+ set(OPENNURBS_LINKLIBRARIES ZLIB::ZLIB)
+else()
+ set(OPENNURBS_LINKLIBRARIES ${ZLIB_LIBRARIES})
endif()
+if(TARGET ZLIB::ZLIB_STATIC)
+ set(OPENNURBS_STATIC_LINKLIBRARIES ZLIB::ZLIB_STATIC)
+elseif(ZLIB_STATIC_LIBRARIES)
+ set(OPENNURBS_STATIC_LINKLIBRARIES ${ZLIB_STATIC_LIBRARIES})
+else()
+ set(OPENNURBS_STATIC_LINKLIBRARIES ${ZLIB_LIBRARIES})
+endif()
+find_package(Threads REQUIRED)
+list(APPEND OPENNURBS_LINKLIBRARIES Threads::Threads)
+list(APPEND OPENNURBS_STATIC_LINKLIBRARIES Threads::Threads)
-add_subdirectory(zlib)
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag(-O3 HAVE_O3)
@@ -134,17 +153,17 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+ endif(HAVE_O3)
+endif("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+
+if (MSVC)
+ # opennurbs_brep.cpp requires this flag when compiling with Visual C++
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
+ #add_compile_options(\bigobj)
+ add_definitions(-DUNICODE)
+ add_definitions(-D_UNICODE)
+ set(OPENNURBS_LINKLIBRARIES ${OPENNURBS_LINKLIBRARIES} Rpcrt4 Shlwapi Usp10)
endif()
-add_subdirectory(zlib)
+ list(APPEND OPENNURBS_LINKLIBRARIES Rpcrt4 Shlwapi Usp10)
+ list(APPEND OPENNURBS_STATIC_LINKLIBRARIES Rpcrt4 Shlwapi Usp10)
+endif()
+
+add_definitions(-DON_CMAKE_BUILD)
+
+if (MSVC)
@@ -162,13 +181,14 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+ add_compile_options(-Wno-writable-strings)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch")
+endif()
+
## opennurbs static library
add_library( opennurbsStatic STATIC
@@ -495,34 +589,37 @@
${OPENNURBS_PUBLIC_HEADERS}
@@ -495,34 +609,38 @@
opennurbs_dll.cpp
)
-if (MSVC)
- # opennurbs_brep.cpp requires this flag when compiling with Visual C++
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
@@ -199,36 +219,37 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+ android_uuid/uuid_time.c
+ )
+ endif (WIN32)
+
-if (ANDROID)
- include_directories("freetype263/include")
-endif()
+ add_library(uuid_fallback OBJECT
+ ${UUID_SOURCES}
+ )
+ target_include_directories(uuid_fallback PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+ target_sources(OpenNURBS PRIVATE $<TARGET_OBJECTS:uuid_fallback>)
-if (ANDROID)
- include_directories("freetype263/include")
-endif()
+endif (NOT HAVE_UUID_GENERATE AND NOT MSVC)
if( APPLE)
+ target_sources(opennurbsStatic PRIVATE $<TARGET_OBJECTS:uuid_fallback>)
-if( APPLE)
- find_library( CORE_GRAPHICS_LIBRARY CoreGraphics)
- message( STATUS "CORE_GRAPHICS_LIBRARY is ${CORE_GRAPHICS_LIBRARY}")
- find_library( CORE_TEXT_LIBRARY CoreText)
- message( STATUS "CORE_TEXT_LIBRARY is ${CORE_TEXT_LIBRARY}")
- find_library( FOUNDATION_LIBRARY Foundation)
- message( STATUS "FOUNDATION_LIBRARY is ${FOUNDATION_LIBRARY}")
-
+endif (NOT HAVE_UUID_GENERATE AND NOT MSVC)
- set( OPENNURBS_APPLE_DEPENDENCIES
- ${CORE_GRAPHICS_LIBRARY}
- ${CORE_TEXT_LIBRARY}
- ${FOUNDATION_LIBRARY}
- )
-
+if( APPLE)
set( OPENNURBS_APPLE_DEFINES
ON_COMPILER_CLANG
ON_RUNTIME_APPLE
@@ -531,98 +628,36 @@
@@ -531,98 +649,39 @@
)
target_compile_definitions(opennurbsStatic PRIVATE ${OPENNURBS_APPLE_DEFINES})
target_compile_definitions(OpenNURBS PRIVATE ${OPENNURBS_APPLE_DEFINES})
@@ -257,9 +278,9 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
- XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES"
- XCODE_ATTRIBUTE_ENABLE_STRICT_OBJC_MSGSEND "YES"
- )
-endif()
-
-
endif()
-if (MSVC)
- # warning level 4 and all warnings as errors
- add_compile_options(/W4)
@@ -274,19 +295,19 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
- add_compile_options(-Wno-parentheses)
- add_compile_options(-Wno-writable-strings)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch")
endif()
-target_compile_definitions(opennurbsStatic PRIVATE ON_COMPILING_OPENNURBS Z_PREFIX MY_ZCALLOC)
-target_compile_definitions(OpenNURBS PRIVATE OPENNURBS_EXPORTS Z_PREFIX MY_ZCALLOC)
-endif()
+target_compile_definitions(opennurbsStatic PRIVATE ON_COMPILING_OPENNURBS)
+target_compile_definitions(OpenNURBS PRIVATE OPENNURBS_EXPORTS ON_COMPILING_OPENNURBS)
-target_include_directories(opennurbsStatic PUBLIC .)
-target_include_directories(OpenNURBS PUBLIC .)
+target_include_directories(opennurbsStatic PUBLIC . ${ZLIB_INCLUDE_DIRS})
+target_include_directories(OpenNURBS PUBLIC . ${ZLIB_INCLUDE_DIRS})
-target_compile_definitions(opennurbsStatic PRIVATE ON_COMPILING_OPENNURBS Z_PREFIX MY_ZCALLOC)
-target_compile_definitions(OpenNURBS PRIVATE OPENNURBS_EXPORTS Z_PREFIX MY_ZCALLOC)
-
-target_include_directories(opennurbsStatic PUBLIC .)
-target_include_directories(OpenNURBS PUBLIC .)
-
set(PRECOMPILED_HEADERS opennurbs.h)
-if (BUILD_TESTING)
- LIST(APPEND PRECOMPILED_HEADERS opennurbs_plus_testheader.h)
@@ -294,7 +315,7 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
-
target_precompile_headers(opennurbsStatic PRIVATE ${PRECOMPILED_HEADERS})
target_precompile_headers(OpenNURBS PRIVATE ${PRECOMPILED_HEADERS})
-install( TARGETS opennurbsStatic DESTINATION "lib")
-install( FILES ${OPENNURBS_PUBLIC_HEADERS} DESTINATION "include/opennurbsStatic")
-
@@ -302,24 +323,27 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
-if (ANDROID)
-target_link_libraries( OpenNURBS zlib opennurbs_public_freetype android_uuid android)
-target_link_libraries( opennurbsStatic zlib opennurbs_public_freetype android_uuid android)
-endif()
+if (OPENNURBS_LINKLIBRARIES)
+ target_link_libraries(OpenNURBS PRIVATE ${OPENNURBS_LINKLIBRARIES})
endif()
-if (LINUX AND NOT ANDROID)
-target_link_libraries( OpenNURBS zlib opennurbs_public_freetype android_uuid)
-target_link_libraries( opennurbsStatic zlib opennurbs_public_freetype android_uuid)
-endif()
+if (OPENNURBS_STATIC_LINKLIBRARIES)
+ target_link_libraries(opennurbsStatic PUBLIC ${OPENNURBS_STATIC_LINKLIBRARIES})
endif()
-if (APPLE)
-target_link_libraries( OpenNURBS ${OPENNURBS_APPLE_DEPENDENCIES} zlib)
-target_link_libraries( opennurbsStatic ${OPENNURBS_APPLE_DEPENDENCIES} zlib)
+if (OPENNURBS_LINKLIBRARIES)
+ target_link_libraries( OpenNURBS ${OPENNURBS_LINKLIBRARIES})
+if (UUID_LIBRARY AND HAVE_UUID_GENERATE)
+ target_link_libraries(OpenNURBS PRIVATE ${UUID_LIBRARY})
+ target_link_libraries(opennurbsStatic PUBLIC ${UUID_LIBRARY})
endif()
-if (WIN32)
-target_link_libraries( OpenNURBS Shlwapi Usp10 zlib)
-target_link_libraries( opennurbsStatic Shlwapi Usp10 zlib)
+if (UUID_LBIRARY)
+ target_link_libraries(OpenNURBS ${UUID_LIBRARY})
endif()
-endif()
-if (APPLE)
- set_target_properties( OpenNURBS PROPERTIES
-FRAMEWORK TRUE
@@ -333,7 +357,12 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+ RUNTIME DESTINATION ${BIN_DIR}
+ LIBRARY DESTINATION ${LIB_DIR}
+ ARCHIVE DESTINATION ${LIB_DIR})
+
- install( TARGETS OpenNURBS DESTINATION "Frameworks")
-else()
- install( TARGETS OpenNURBS DESTINATION "lib" )
- install( FILES ${OPENNURBS_PUBLIC_HEADERS} DESTINATION "include/OpenNURBS")
-endif()
+install(TARGETS opennurbsStatic
+ RUNTIME DESTINATION ${BIN_DIR}
+ LIBRARY DESTINATION ${LIB_DIR}
@@ -341,9 +370,3 @@ diff -Naur opennurbs/CMakeLists.txt OPENNURBS_BLD/CMakeLists.txt
+
+install( FILES ${OPENNURBS_PUBLIC_HEADERS} DESTINATION "include/OpenNURBS")
+install( FILES android_uuid/uuid.h DESTINATION "include/OpenNURBS/android_uuid")
- install( TARGETS OpenNURBS DESTINATION "Frameworks")
-else()
- install( TARGETS OpenNURBS DESTINATION "lib" )
- install( FILES ${OPENNURBS_PUBLIC_HEADERS} DESTINATION "include/OpenNURBS")
-endif()
+81
View File
@@ -0,0 +1,81 @@
--- opennurbs/opennurbs_curve.cpp
+++ OPENNURBS_BLD/opennurbs_curve.cpp
@@ -154,7 +154,8 @@
ON_NurbsCurve N;
if ( 0 == GetNurbForm(N) )
return false;
- if ( N.m_order < 2 || N.m_cv_count < N.m_order )
+ if ( N.m_order < 2 || N.m_cv_count < N.m_order
+ || nullptr == N.m_knot || nullptr == N.m_cv )
return false;
ON_BezierCurve B;
--- opennurbs/opennurbs_nurbscurve.cpp
+++ OPENNURBS_BLD/opennurbs_nurbscurve.cpp
@@ -41,7 +41,11 @@
const int knot_capacity = (nullptr != src.m_knot) ? src.KnotCount() : 0;
if (knot_capacity > 0)
{
- ReserveKnotCapacity(knot_capacity);
+ if ( !ReserveKnotCapacity(knot_capacity) )
+ {
+ Destroy();
+ return;
+ }
if ( nullptr != m_knot )
memcpy( m_knot, src.m_knot, knot_capacity*sizeof(m_knot[0]) );
}
@@ -57,7 +61,11 @@
const int cv_capacity = (nullptr != src.m_cv) ? (cv_count*cv_stride) : 0;
if (cv_capacity > 0)
{
- ReserveCVCapacity(cv_capacity);
+ if ( !ReserveCVCapacity(cv_capacity) )
+ {
+ Destroy();
+ return;
+ }
if ( nullptr != m_cv )
{
// copy cv array
@@ -2293,10 +2301,13 @@
const int current_capacity = (nullptr != m_cv && m_cv_capacity > 0) ? m_cv_capacity : 0;
if ( desired_capacity > current_capacity )
{
- m_cv = (0 == current_capacity)
+ double* cv = (0 == current_capacity)
? (double*)onmalloc(desired_capacity*sizeof(*m_cv))
: (double*)onrealloc(m_cv,desired_capacity*sizeof(*m_cv));
- m_cv_capacity = ( nullptr != m_cv ) ? desired_capacity : 0;
+ if ( nullptr == cv )
+ return false;
+ m_cv = cv;
+ m_cv_capacity = desired_capacity;
}
const bool rc = (m_cv_capacity >= desired_capacity);
@@ -2354,7 +2365,9 @@
= ( 0 == current_knot_capacity )
? (double*)onmalloc(desired_capacity*sizeof(knot[0]))
: (double*)onrealloc(m_knot,desired_capacity*sizeof(knot[0]));
- this->ManageKnotForExperts((nullptr != knot) ? desired_capacity : 0, knot);
+ if ( nullptr == knot )
+ return false;
+ this->ManageKnotForExperts(desired_capacity, knot);
}
bool rc = (nullptr != m_knot && KnotCapacity() >= desired_capacity);
@@ -3299,6 +3312,13 @@
if (this != &curve)
{
curve.Internal_DeepCopyFrom(*this); // does not copy user data
+ if ( curve.m_order != m_order || curve.m_cv_count != m_cv_count
+ || (nullptr != m_knot && nullptr == curve.m_knot)
+ || (nullptr != m_cv && nullptr == curve.m_cv) )
+ {
+ curve.Destroy();
+ return 0;
+ }
}
if ( subdomain )
@@ -1,17 +1,5 @@
--- opennurbs/opennurbs_precompiledheader.cpp 2024-09-24 11:00:03.440753786 -0400
+++ OPENNURBS_BLD/opennurbs_precompiledheader.cpp 2024-09-24 10:59:40.545148988 -0400
@@ -28,9 +28,9 @@
#error Incorrect _M_... setting for x64 build
#endif
-#if !defined(_M_X64)
+#if !defined(_M_X64) && !defined(_M_ARM64)
// This should be automatically defined by the compiler
-#error _M_X64 should be defined for x64 builds
+#error _M_X64 or _M_ARM64 should be defined for x64 or ARM64 builds
#endif
// All opennurbs code uses the "offical" _M_X64. Unfortunately,
@@ -39,9 +39,9 @@
// _M_X64 and _M_AMD64 for the WIN64 platform. If it doesn't,
// then we have a serious problem because some system header
@@ -33,18 +21,6 @@
#error Incorrect _M_... setting for 32 bit Windows build.
#endif
@@ -104,9 +104,9 @@
#error Incorrect _M_... setting for x64 build
#endif
-#if !defined(_M_X64)
+#if !defined(_M_X64) && !defined(_M_ARM64)
// This should be automatically defined by the compiler
-#error _M_X64 should be defined for x64 builds
+#error _M_X64 or _M_ARM64 should be defined for x64 or ARM64 builds
#endif
// All opennurbs code uses the "offical" _M_X64. Unfortunately,
@@ -115,9 +115,9 @@
// _M_X64 and _M_AMD64 for the WIN64 platform. If it doesn't,
// then we have a serious problem because some system header
-18
View File
@@ -12,24 +12,6 @@
#endif
/*
//
@@ -132,7 +137,7 @@
#define ON_RUNTIME_WIN_WINOS
#endif
-#if defined(_M_X64) || defined(_WIN64)
+#if defined(_M_X64) || defined(_M_ARM64) || defined(_WIN64)
#define ON_64BIT_RUNTIME
#elif defined(_M_X86) || defined(_WIN32)
#define ON_32BIT_RUNTIME
@@ -141,7 +146,7 @@
#endif
#if !defined(ON_LITTLE_ENDIAN)
-#if (defined(_M_X64) || defined(_M_IX86) || defined (__i386__) || defined( __x86_64__ ))
+#if (defined(_M_X64) || defined(_M_ARM64) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__) || defined(__x86_64))
#define ON_LITTLE_ENDIAN
#endif
#endif
@@ -151,7 +156,7 @@
#define ON_RUNTIME_LINUX
#endif
+12 -12
View File
@@ -1,23 +1,23 @@
--- opennurbs/opennurbs_zlib.cpp 2024-06-25 15:44:35.958646126 -0400
+++ OPENNURBS_BLD/opennurbs_zlib.cpp 2024-06-25 15:44:06.155134199 -0400
@@ -23,6 +23,7 @@
#include "opennurbs_zlib.h"
--- opennurbs/opennurbs_zlib.cpp 2026-09-09 15:31:14.185083448 -0400
+++ OPENNURBS_BLD/opennurbs_zlib.cpp 2026-09-09 15:41:51.335267196 -0400
@@ -30,6 +30,7 @@
// ON_CMAKE_BUILD should be renamed "ON_NOT_USING_MSVC_LINK_LIB_PRAGMA"
// This whole thing should be reworked so MSVC builds also use build properties,
// instead of this non-portable pragma.
+#if 0
#if defined(ON_COMPILER_MSC) && !defined(ON_CMAKE_BUILD)
#if !defined(OPENNURBS_ZLIB_LIB_DIR)
@@ -52,6 +53,8 @@
@@ -60,6 +61,8 @@
#endif
#endif // defined(ON_COMPILER_MSC) && !defined(ON_CMAKE_BUILD)
+#endif
+
// compressed buffer I/O uses zlib 1.1.3 inflate()/deflate()
class ON_CompressorImplementation
{
@@ -319,11 +322,11 @@
@@ -327,11 +332,11 @@
// no uncompressed input is left - switch to finish mode
flush = Z_FINISH;
}
@@ -31,7 +31,7 @@
rc = false;
break;
}
@@ -519,11 +522,11 @@
@@ -527,11 +532,11 @@
// no compressed input is left - switch to finish mode
flush = Z_FINISH;
}
@@ -45,7 +45,7 @@
rc = false;
break;
}
@@ -1200,11 +1203,11 @@
@@ -1208,11 +1213,11 @@
// no uncompressed input is left - switch to finish mode
flush = Z_FINISH;
}
@@ -59,7 +59,7 @@
rc = false;
break;
}
@@ -1333,11 +1336,11 @@
@@ -1341,11 +1346,11 @@
// no compressed input is left - switch to finish mode
flush = Z_FINISH;
}
+4 -1
View File
@@ -17,11 +17,14 @@ if (ENABLE_OPENVDB)
ExternalProject_Add(OPENVDB_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/openvdb"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
#PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/openvdb.patch
PATCH_COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindZLIB.cmake;<SOURCE_DIR>/cmake/FindZLIB.cmake
CMAKE_ARGS
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
-DMIN_VER_CMAKE=3.19
${BUILD_TYPE_SPECIFIER}
# Do not let an earlier system-zlib result override the bundled ZLIB_ROOT.
$<$<BOOL:${ZLIB_TARGET}>:-UZLIB_INCLUDE_DIR>
$<$<BOOL:${ZLIB_TARGET}>:-UZLIB_LIBRARY*>
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
$<$<BOOL:${ZLIB_TARGET}>:-DZLIB_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}>
+1
Submodule openvdb/openvdb added at c81d904ded
+1 -1
View File
@@ -1,3 +1,3 @@
ONETBB
PATCH
ZLIB
+53 -3
View File
@@ -5,14 +5,50 @@
# tool by default.
bext_enable_all_default(PATCH patch)
function(bext_find_patch_check_option patch_executable result_variable)
set(check_directory "${CMAKE_BINARY_DIR}/CMakeFiles/patch-option-check")
set(check_input "${check_directory}/input.txt")
set(check_patch "${check_directory}/change.patch")
file(MAKE_DIRECTORY "${check_directory}")
file(WRITE "${check_patch}"
"--- input.txt\n"
"+++ input.txt\n"
"@@ -1 +1 @@\n"
"-before\n"
"+after\n")
foreach(check_option IN ITEMS "--dry-run" "-C")
file(WRITE "${check_input}" "before\n")
execute_process(
COMMAND "${patch_executable}" "${check_option}" -t -p 0
-i "${check_patch}"
WORKING_DIRECTORY "${check_directory}"
RESULT_VARIABLE check_result
OUTPUT_QUIET
ERROR_QUIET
)
file(READ "${check_input}" check_contents)
if (check_result EQUAL 0 AND check_contents STREQUAL "before\n")
file(REMOVE_RECURSE "${check_directory}")
set("${result_variable}" "${check_option}" PARENT_SCOPE)
return()
endif()
endforeach()
file(REMOVE_RECURSE "${check_directory}")
message(FATAL_ERROR
"Patch executable ${patch_executable} has no supported check option")
endfunction()
# Although individual projects may need their own patching options, there are
# some common settings that will be used for most/all cases. We define those
# here for uniformity.
#
# We ignore whitespace for portability and flexibility when applying patches
# We ignore whitespace for portability and flexibility when applying patches.
# Use split short options accepted by both bundled and Unix patch tools.
#
# -N avoids attempting to reverse patch if the patching is already done.
set(PATCH_OPTIONS "--ignore-whitespace;-N" CACHE STRING "Command line options to use when patching" FORCE)
set(PATCH_OPTIONS "-l;-N" CACHE STRING "Command line options to use when patching" FORCE)
# Preserve any existing user-specified patch path before we replace the public
# PATCH_EXECUTABLE variable with a wrapper command list.
@@ -39,7 +75,7 @@ if (ENABLE_PATCH)
git_submodule_init(patch README.md)
ExternalProject_Add(PATCH_BLD
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/patch"
URL "${CMAKE_CURRENT_SOURCE_DIR}/patch"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
CMAKE_ARGS
${BUILD_TYPE_SPECIFIER}
@@ -62,12 +98,26 @@ if (ENABLE_PATCH)
# If we're using sb_patch, add the newline-output option
set(PATCH_OPTIONS "${PATCH_OPTIONS};--newline-output;preserve" CACHE STRING "Command line options to use when patching" FORCE)
set(PATCH_CHECK_OPTION "--dry-run")
else (ENABLE_PATCH)
# GNU and BSD patch use different options for an applicability check.
bext_find_patch_check_option("${PATCH_NATIVE_EXECUTABLE}"
PATCH_CHECK_OPTION)
endif (ENABLE_PATCH)
set(PATCH_CHECK_OPTION "${PATCH_CHECK_OPTION}" CACHE INTERNAL
"Patch option for a non-modifying applicability check" FORCE)
set(PATCH_REJECT_DIR "${CMAKE_BINARY_DIR}/patch-rejects" CACHE INTERNAL
"Directory for failed patch artifacts" FORCE)
set(PATCH_EXECUTABLE
${CMAKE_COMMAND}
-DBEXT_PATCH_NATIVE_EXECUTABLE:FILEPATH=${PATCH_NATIVE_EXECUTABLE}
-DBEXT_PATCH_CHECK_OPTION:STRING=${PATCH_CHECK_OPTION}
-DBEXT_PATCH_REJECT_DIR:PATH=${PATCH_REJECT_DIR}
-P
${CMAKE_SOURCE_DIR}/CMake/PatchWrapper.cmake
--
+206
View File
@@ -0,0 +1,206 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright 2022-2026 Shannon Booth <shannon.ml.booth@gmail.com>
#include <algorithm>
#include <patch/hunk.h>
#include <patch/locator.h>
#include <patch/utils.h>
namespace Patch {
bool matches_ignoring_whitespace(const std::string& as, const std::string& bs)
{
auto a = as.begin();
auto b = bs.begin();
while (true) {
if (b == bs.end() || is_whitespace(*b)) {
// Strip leading whitespace off the second line (if any)
while (b != bs.end() && is_whitespace(*b))
++b;
// Now that we've stripped all leading whitespace off the second line,
// strip all leading whitespace for the first line so that each
// line should both be beginning with a non-whitespace character or
// alternatively be at the end of the line.
if (a != as.end()) {
if (!is_whitespace(*a))
return false;
do {
a++;
} while (a != as.end() && is_whitespace(*a));
}
// Whitespace has been stripped off the beginning of both lines.
// If either of the lines are at the end, the other line should
// also be at the end! Any trailing whitespace should be trimmed
// resulting in us reaching the end of the line by here.
if (a == as.end())
return b == bs.end();
if (b == bs.end())
return a == as.end();
continue;
}
// We know from the above check that 'b' was not at the end of the line.
// Therefore - 'a' must also not be at the end of a line for the two
// lines to be considered equal.
if (a == as.end())
return false;
// Whitespace is now normalized - we can (finally) perform the actual check!
if (*a != *b)
return false;
// Both characters are equal! Proceed to the next char for both lines.
++a;
++b;
}
}
bool matches(const Line& line1, const Line& line2, bool ignore_whitespace)
{
bool newline_match = line1.newline == line2.newline;
bool content_match = line1.content == line2.content;
// Happy path - a perfect match
if (newline_match && content_match)
return true;
// Not an exact match - check if we need to try see if ignoring whitespace will help.
if (!ignore_whitespace)
return false;
// Fast path - content matches but newlines do not.
if (content_match)
return true;
return matches_ignoring_whitespace(line1.content, line2.content);
}
LineNumber expected_line_number(const Hunk& hunk)
{
auto line = hunk.old_file_range.start_line;
if (hunk.old_file_range.number_of_lines == 0)
++line;
return line;
}
Location locate_hunk(const std::vector<Line>& content, const Hunk& hunk, bool ignore_whitespace, LineNumber offset, LineNumber max_fuzz)
{
// Make a first best guess at where the from-file range is telling us where the hunk should be.
LineNumber offset_guess = expected_line_number(hunk) - 1 + offset;
// If there's no lines surrounding this hunk - it will always succeed,
// so there is no point in checking any further. Note that this check is
// also what makes matching against an empty 'from file' work (with no lines),
// as in that case there is no content for us to even match against in the
// first place!
//
// Furthermore, we also should reject patches being added when the hunk is
// claiming the file is completely empty - but there are actually lines in
// that file.
if (hunk.old_file_range.number_of_lines == 0) {
if (hunk.old_file_range.start_line == 0 && !content.empty())
return {};
const auto end = static_cast<LineNumber>(content.size());
return { std::min(std::max<LineNumber>(offset_guess, 0), end), 0, 0 };
}
LineNumber patch_prefix_content = 0;
for (const auto& line : hunk.lines) {
if (line.operation != ' ')
break;
++patch_prefix_content;
}
LineNumber patch_suffix_content = 0;
for (auto it = hunk.lines.rbegin(); it != hunk.lines.rend(); ++it) {
if (it->operation != ' ')
break;
++patch_suffix_content;
}
LineNumber context = std::max(patch_prefix_content, patch_suffix_content);
for (LineNumber fuzz = 0; fuzz <= max_fuzz; ++fuzz) {
auto suffix_fuzz = fuzz + patch_suffix_content - context;
auto prefix_fuzz = fuzz + patch_prefix_content - context;
const bool must_match_at_end = patch_suffix_content > 0 && suffix_fuzz < 0;
const bool must_match_at_start = patch_prefix_content > 0 && prefix_fuzz < 0 && hunk.old_file_range.start_line <= 1;
suffix_fuzz = std::max<LineNumber>(suffix_fuzz, 0);
prefix_fuzz = std::max<LineNumber>(prefix_fuzz, 0);
// If the fuzz is greater than the total number of lines for a hunk,
// then it may be possible for the hunk to match anything - so ignore
// this case.
if (static_cast<size_t>(suffix_fuzz) + static_cast<size_t>(prefix_fuzz) >= hunk.lines.size())
return {};
auto hunk_matches_starting_from_line = [&](LineNumber line) {
line += prefix_fuzz;
// Ensure that all of the lines in the hunk match starting from 'line'
return std::all_of(hunk.lines.begin() + prefix_fuzz, hunk.lines.end() - suffix_fuzz, [&](const PatchLine& hunk_line) {
// Ignore additions in our increment of line and
// comparison as they are not part of the 'original file'
if (hunk_line.operation == '+')
return true;
if (static_cast<size_t>(line) >= content.size())
return false;
// Check whether this line matches what is specified in this part of the hunk.
if (!matches(content[static_cast<size_t>(line)], hunk_line.line, ignore_whitespace))
return false;
// Proceed to the next line.
++line;
return true;
});
};
// Reduced leading or trailing context anchors a hunk to the beginning
// or end of the file until enough fuzz permits matching elsewhere.
if (must_match_at_start || must_match_at_end) {
const auto end_line = static_cast<LineNumber>(content.size()) - hunk.old_file_range.number_of_lines;
const auto line = must_match_at_start ? 0 : end_line;
if (line >= 0 && (!must_match_at_end || line == end_line) && hunk_matches_starting_from_line(line))
return { line, fuzz, line - offset_guess };
continue;
}
// First look for the hunk in the forward direction
for (LineNumber line = offset_guess; static_cast<size_t>(line) < content.size(); ++line) {
if (hunk_matches_starting_from_line(line))
return { line, fuzz, line - offset_guess };
}
// Then look for it in the negative direction
for (LineNumber line = offset_guess - 1; line >= 0; --line) {
if (hunk_matches_starting_from_line(line))
return { line, fuzz, line - offset_guess };
}
}
// No bueno.
return {};
}
bool has_prerequisite(const Line& line, const std::string& prerequisite)
{
return line.content.find(prerequisite) != std::string::npos;
}
bool has_prerequisite(const std::vector<Line>& lines, const std::string& prerequisite)
{
return std::any_of(lines.begin(), lines.end(), [&prerequisite](const Line& line) {
return has_prerequisite(line, prerequisite);
});
}
} // namespace Patch
-53
View File
@@ -1,53 +0,0 @@
# Patchelf is only useful on some platforms - don't worry about trying
# to build it everywhere
if (NOT MSVC AND NOT APPLE)
# patchelf is used to rewrite RPATH settings on the third party binaries
# after compilation - it is quite useful when it comes to making binary
# bundles that can run successfully from locations other than their final
# CMAKE_INSTALL_PREFIX target.
bext_enable_all_default(PATCHELF patchelf)
if (NOT ENABLE_PATCHELF)
find_program(PATCHELF_EXECUTABLE patchelf)
mark_as_advanced(PATCHELF_EXECUTABLE)
if (NOT PATCHELF_EXECUTABLE AND NOT DEFINED ENABLE_PATCHELF)
set(ENABLE_PATCHELF "ON" CACHE BOOL "Enable patchelf build")
endif (NOT PATCHELF_EXECUTABLE AND NOT DEFINED ENABLE_PATCHELF)
endif (NOT ENABLE_PATCHELF)
set(ENABLE_PATCHELF "${ENABLE_PATCHELF}" CACHE BOOL "Enable patchelf build")
if (ENABLE_PATCHELF)
ExternalProject_Add(PATCHELF_BLD
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/patchelf"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
CMAKE_ARGS
$<$<NOT:$<BOOL:${CMAKE_CONFIGURATION_TYPES}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
-DBIN_DIR=${BIN_DIR}
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_INSTALL_PREFIX=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
-DLIB_DIR=${LIB_DIR}
LOG_CONFIGURE ${EXT_BUILD_QUIET}
LOG_BUILD ${EXT_BUILD_QUIET}
LOG_INSTALL ${EXT_BUILD_QUIET}
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
STEP_TARGETS install
)
endif (ENABLE_PATCHELF)
endif (NOT MSVC AND NOT APPLE)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-35
View File
@@ -1,35 +0,0 @@
# Minimum required version of CMake
cmake_minimum_required(VERSION 3.18)
# Set CMake project name
project(PATCHELF)
if(NOT DEFINED BIN_DIR)
set(BIN_DIR bin)
endif(NOT DEFINED BIN_DIR)
if (NOT DEFINED LIB_DIR)
set (LIB_DIR lib)
endif (NOT DEFINED LIB_DIR)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
add_executable(patchelf patchelf.cc)
set_target_properties(patchelf PROPERTIES FOLDER "Compilation Utilities")
set(PATCHELF_EXECUTABLE "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${BIN_DIR}/patchelf" CACHE STRING "patchelf location" FORCE)
install(TARGETS patchelf
RUNTIME DESTINATION ${BIN_DIR}
LIBRARY DESTINATION ${LIB_DIR}
ARCHIVE DESTINATION ${LIB_DIR}
)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-674
View File
@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-11
View File
@@ -1,11 +0,0 @@
Newer versions of patchelf (noticed with 0.15) require a C++17 compiler. We
need to stick with the older version until BRL-CAD's minimum C++ support
requirement (currently at C++14) is bumped up to C++17.
Although it is enormously heavier, in the connotation of elf binary editing it
is worth making a note about the LIEF project: https://lief-project.github.io/
It's a very large C++ build (as opposed to a single, easily built file with
patchelf) so it's not a great candidate for bundling. That said, it comes up
when possible alternatives to patchelf are discussed and would be a possible
alternative to explore should that ever become necessary.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+155 -6
View File
@@ -1,6 +1,23 @@
# Decide if we're using Qt6
cad_enable(QT "libqtcad")
set(QT_EXTRA_PATCHES "" CACHE STRING "Additional patches to apply to bundled Qt6")
set(QT_XMIN_ROOT "" CACHE PATH "Installed Xmin SDK used by bundled Qt6")
if (BEXT_XMIN_ROOT AND NOT DISABLE_QT)
set(QT_XMIN_ROOT "${BEXT_XMIN_ROOT}")
set(qt_xmin_patch "${CMAKE_CURRENT_SOURCE_DIR}/qt_xmin.patch")
list(PREPEND QT_EXTRA_PATCHES "${qt_xmin_patch}")
list(REMOVE_DUPLICATES QT_EXTRA_PATCHES)
endif ()
if (QT_XMIN_ROOT)
if (DISABLE_QT)
message(FATAL_ERROR "QT_XMIN_ROOT cannot be used when Qt is disabled")
endif ()
set(ENABLE_QT "ON" CACHE BOOL "Enable Qt6 build" FORCE)
endif ()
if (NOT ENABLE_QT AND NOT DISABLE_QT)
# Optional probe: a missing Qt6 just turns on the local build below, so pass
@@ -23,6 +40,77 @@ if (ENABLE_QT)
git_submodule_init(qt qtbase/configure)
set(QT_XMIN_ENABLED OFF)
set(QT_XMIN_DIR "")
set(QT_XMIN_RUNTIME_DIRS "")
set(QT_XMIN_CLIENT_DIR "")
set(QT_XMIN_GL_DIR "")
if (QT_XMIN_ROOT)
if (NOT UNIX OR APPLE)
message(FATAL_ERROR "The Xmin Qt profile currently requires Linux or BSD")
endif ()
if (NOT QT_EXTRA_PATCHES)
message(FATAL_ERROR
"QT_XMIN_ROOT requires the matching Xmin Qt patch in QT_EXTRA_PATCHES")
endif ()
if (NOT IS_DIRECTORY "${QT_XMIN_ROOT}")
message(FATAL_ERROR "QT_XMIN_ROOT is not an installed SDK: ${QT_XMIN_ROOT}")
endif ()
file(REAL_PATH "${QT_XMIN_ROOT}" qt_xmin_root_real)
set(QT_XMIN_ROOT "${qt_xmin_root_real}" CACHE PATH
"Installed Xmin SDK used by bundled Qt6" FORCE)
unset(Xmin_DIR CACHE)
find_package(Xmin 0.1 CONFIG REQUIRED
PATHS "${QT_XMIN_ROOT}"
NO_DEFAULT_PATH
)
if (NOT TARGET Xmin::QtX11 OR NOT TARGET Xmin::GL OR
NOT TARGET Xmin::ClientX11)
message(FATAL_ERROR
"QT_XMIN_ROOT must provide Xmin::QtX11, Xmin::GL, and Xmin::ClientX11")
endif ()
file(REAL_PATH "${Xmin_DIR}" qt_xmin_dir_real)
cmake_path(IS_PREFIX qt_xmin_root_real "${qt_xmin_dir_real}"
NORMALIZE qt_xmin_dir_in_root)
if (NOT qt_xmin_dir_in_root)
message(FATAL_ERROR
"Xmin was resolved outside QT_XMIN_ROOT: ${qt_xmin_dir_real}")
endif ()
set(QT_XMIN_DIR "${qt_xmin_dir_real}")
function(qt_xmin_imported_location target output_var)
get_target_property(imported_configs "${target}" IMPORTED_CONFIGURATIONS)
set(imported_location "")
foreach(imported_config IN LISTS imported_configs)
string(TOUPPER "${imported_config}" imported_config_upper)
get_target_property(candidate "${target}"
"IMPORTED_LOCATION_${imported_config_upper}")
if (candidate AND EXISTS "${candidate}")
set(imported_location "${candidate}")
break()
endif ()
endforeach()
if (NOT imported_location)
get_target_property(imported_location "${target}" IMPORTED_LOCATION)
endif ()
if (NOT imported_location OR NOT EXISTS "${imported_location}")
message(FATAL_ERROR "Unable to locate imported Xmin target ${target}")
endif ()
set(${output_var} "${imported_location}" PARENT_SCOPE)
endfunction()
qt_xmin_imported_location(Xmin::ClientX11 qt_xmin_client_library)
qt_xmin_imported_location(Xmin::GL qt_xmin_gl_library)
get_filename_component(QT_XMIN_CLIENT_DIR "${qt_xmin_client_library}" DIRECTORY)
get_filename_component(QT_XMIN_GL_DIR "${qt_xmin_gl_library}" DIRECTORY)
set(QT_XMIN_RUNTIME_DIRS "${QT_XMIN_GL_DIR};${QT_XMIN_CLIENT_DIR}")
list(REMOVE_DUPLICATES QT_XMIN_RUNTIME_DIRS)
set(QT_XMIN_ENABLED ON)
endif ()
RegisterDeps(Qt6)
if (isMultiConfig)
@@ -31,11 +119,54 @@ if (ENABLE_QT)
set(CBT ${CMAKE_BUILD_TYPE})
endif (isMultiConfig)
set(QT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/qt/qtbase")
set(QT_UPSTREAM_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/qt/qtbase")
set(QT_SOURCE_DIR "${QT_UPSTREAM_SOURCE_DIR}")
set(QT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/qt6-build")
set(QT_PATCH_COMMAND)
set(qt_patch_hash_input "")
foreach(QT_EXTRA_PATCH IN LISTS QT_EXTRA_PATCHES)
if (NOT IS_ABSOLUTE "${QT_EXTRA_PATCH}")
message(FATAL_ERROR "QT_EXTRA_PATCHES entries must be absolute paths: ${QT_EXTRA_PATCH}")
endif ()
if (NOT EXISTS "${QT_EXTRA_PATCH}")
message(FATAL_ERROR "Additional Qt patch does not exist: ${QT_EXTRA_PATCH}")
endif ()
file(SHA256 "${QT_EXTRA_PATCH}" qt_patch_hash)
string(APPEND qt_patch_hash_input "${QT_EXTRA_PATCH}:${qt_patch_hash}\n")
if (NOT QT_PATCH_COMMAND)
set(QT_PATCH_COMMAND
PATCH_COMMAND ${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS} -i ${QT_EXTRA_PATCH}
)
else ()
list(APPEND QT_PATCH_COMMAND
COMMAND ${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS} -i ${QT_EXTRA_PATCH}
)
endif ()
endforeach()
string(SHA256 QT_PATCH_SIGNATURE "${qt_patch_hash_input}")
# Make ExternalProject's configure rule sensitive to both the selected
# profile and this wrapper script. The script's own signature then clears
# Qt's generated build tree before reconfiguring.
file(SHA256 "${CMAKE_CURRENT_SOURCE_DIR}/qt_config.cmake.in"
qt_config_template_hash)
string(SHA256 QT_CONFIG_SIGNATURE
"${QT_PATCH_SIGNATURE}|${QT_XMIN_ENABLED}|${QT_XMIN_ROOT}|${QT_XMIN_DIR}|${qt_config_template_hash}|${CMAKE_BUILD_TYPE}")
set(QT_SOURCE_ARGUMENTS SOURCE_DIR "${QT_SOURCE_DIR}")
if (QT_EXTRA_PATCHES)
string(SUBSTRING "${QT_PATCH_SIGNATURE}" 0 12 qt_patch_short_hash)
set(QT_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/qt6-source-${qt_patch_short_hash}")
set(QT_SOURCE_ARGUMENTS
URL "${QT_UPSTREAM_SOURCE_DIR}"
SOURCE_DIR "${QT_SOURCE_DIR}"
)
endif ()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_config.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_build.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_build.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_install.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_xmin_audit.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_xmin_audit.cmake @ONLY)
set(QAH "OFF")
if (QT_ALLOW_HEADLESS)
@@ -43,11 +174,11 @@ if (ENABLE_QT)
endif (QT_ALLOW_HEADLESS)
ExternalProject_Add(Qt6_BLD
SOURCE_DIR "${QT_SOURCE_DIR}"
${QT_SOURCE_ARGUMENTS}
BINARY_DIR "${QT_BUILD_DIR}"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
#PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/qt.patch
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CBT} -DQT_ALLOW_HEADLESS=${QAH} -DBEXT_QT_TARGET_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${CMAKE_CURRENT_BINARY_DIR}/qt_config.cmake
${QT_PATCH_COMMAND}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CBT} -DQT_ALLOW_HEADLESS=${QAH} -DBEXT_QT_TARGET_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DQT_CONFIG_SIGNATURE=${QT_CONFIG_SIGNATURE} -P ${CMAKE_CURRENT_BINARY_DIR}/qt_config.cmake
BUILD_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CBT} -P ${CMAKE_CURRENT_BINARY_DIR}/qt_build.cmake
INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake
LOG_CONFIGURE ${EXT_BUILD_QUIET}
@@ -59,6 +190,23 @@ if (ENABLE_QT)
TargetInstallDeps(Qt6 Qt6_DEPENDS)
set(QT_INSTALL_RPATH_DIRS "${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}")
if (QT_XMIN_ENABLED)
list(APPEND QT_INSTALL_RPATH_DIRS ${QT_XMIN_RUNTIME_DIRS})
endif ()
list(REMOVE_DUPLICATES QT_INSTALL_RPATH_DIRS)
string(JOIN ":" QT_INSTALL_RPATH ${QT_INSTALL_RPATH_DIRS})
set(QT_SVG_INSTALL_COMMAND)
if (QT_XMIN_ENABLED)
set(QT_SVG_INSTALL_COMMAND
INSTALL_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target install
COMMAND ${CMAKE_COMMAND} -DQT_AUDIT_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}
-DQT_AUDIT_INCLUDE_SVG=ON
-P ${CMAKE_CURRENT_BINARY_DIR}/qt_xmin_audit.cmake
)
endif ()
ExternalProject_Add(Qt6Svg_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/qt/qtsvg"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -71,15 +219,17 @@ if (ENABLE_QT)
-DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
-DQt6_DIR=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}/cmake/Qt6
-DQt6_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}
$<$<BOOL:${QT_XMIN_ENABLED}>:-DXmin_DIR=${QT_XMIN_DIR}>
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
-DCMAKE_INSTALL_LIBDIR:PATH=${LIB_DIR}
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}
-DCMAKE_INSTALL_RPATH=${QT_INSTALL_RPATH}
LOG_CONFIGURE ${EXT_BUILD_QUIET}
LOG_BUILD ${EXT_BUILD_QUIET}
LOG_INSTALL ${EXT_BUILD_QUIET}
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
${QT_SVG_INSTALL_COMMAND}
STEP_TARGETS install
)
@@ -105,4 +255,3 @@ mark_as_advanced(Qt6_VERSION)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+14 -1
View File
@@ -3,7 +3,9 @@
# putting that directory first makes tools such as qtwaylandscanner fail with
# missing Qt symbol versions while a newer Qt is being built.
if (NOT WIN32)
set(ENV{LD_LIBRARY_PATH} "@QT_BUILD_DIR@/@LIB_DIR@:@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
set(qt_runtime_dirs "@QT_XMIN_RUNTIME_DIRS@" "@QT_BUILD_DIR@/@LIB_DIR@" "@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
string(JOIN ":" qt_runtime_path ${qt_runtime_dirs})
set(ENV{LD_LIBRARY_PATH} "${qt_runtime_path}")
endif (NOT WIN32)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "" OR "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
@@ -20,6 +22,17 @@ if (QT_RET)
message(FATAL_ERROR "Qt build failed: ${MSG}\n")
endif (QT_RET)
if ("@QT_XMIN_ENABLED@" STREQUAL "ON")
execute_process(
COMMAND "@CMAKE_COMMAND@" -DQT_AUDIT_ROOT=@QT_BUILD_DIR@
-P "@CMAKE_CURRENT_BINARY_DIR@/qt_xmin_audit.cmake"
RESULT_VARIABLE QT_AUDIT_RET
)
if (QT_AUDIT_RET)
message(FATAL_ERROR "Qt Xmin dependency audit failed")
endif ()
endif ()
message("Qt build succeeded: ${MSG}\n")
# Local Variables:
+112 -6
View File
@@ -1,6 +1,11 @@
set(CONFIG_FILE configure)
set(ENV_VARS)
set(CONFIG_EXTRA_OPTS)
set(QT_CMAKE_OPTS)
set(QT_XMIN_ENABLED "@QT_XMIN_ENABLED@")
set(QT_XMIN_ROOT "@QT_XMIN_ROOT@")
set(QT_XMIN_DIR "@QT_XMIN_DIR@")
set(QT_XMIN_RUNTIME_DIRS "@QT_XMIN_RUNTIME_DIRS@")
# Windows uses a different file
if (WIN32)
@@ -9,7 +14,9 @@ endif (WIN32)
# If we're not on Windows, set some environment variables
if (NOT WIN32)
set(ENV{LD_LIBRARY_PATH} "@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
set(qt_runtime_dirs ${QT_XMIN_RUNTIME_DIRS} "@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
string(JOIN ":" qt_runtime_path ${qt_runtime_dirs})
set(ENV{LD_LIBRARY_PATH} "${qt_runtime_path}")
set(ENV{CPPFLAGS} "-I@CMAKE_BUNDLE_INSTALL_PREFIX@/@INCLUDE_DIR@")
set(ENV{LDFLAGS} "-L@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
endif (NOT WIN32)
@@ -19,6 +26,53 @@ endif (NOT WIN32)
# https://doc.qt.io/qt-6/configure-options.html
set(CONFIG_EXTRA_OPTS ${CONFIG_EXTRA_OPTS} -qt-zlib -qt-libpng)
if (QT_XMIN_ENABLED)
list(APPEND CONFIG_EXTRA_OPTS
-qpa xcb
-default-qpa xcb
-xcb
-xmin-x11
-xcb-xlib
-feature-xlib
-no-sm
-no-egl
-no-eglfs
-no-vulkan
-no-feature-gbm
-no-feature-kms
-no-feature-wayland
-no-feature-wayland-client
-no-feature-wayland-server
-no-fontconfig
-qt-freetype
-qt-harfbuzz
-qt-libjpeg
-no-dbus
-no-glib
-nomake
examples
-nomake
tests
-opengl
desktop
)
string(JOIN ":" qt_xmin_install_rpath ${QT_XMIN_RUNTIME_DIRS})
list(APPEND QT_CMAKE_OPTS
"-DXmin_DIR=${QT_XMIN_DIR}"
"-DCMAKE_INSTALL_RPATH=${qt_xmin_install_rpath}"
"-DCMAKE_DISABLE_FIND_PACKAGE_EGL=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_GLESv2=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_WrapOpenGL=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_X11=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_X11_XCB=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_XCB=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_XKB=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_XKB_COMMON_X11=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_XRender=ON"
)
endif ()
# QFileSystemWatcher selects kqueue in its C++ platform dispatch on FreeBSD.
# If the optional inotify compatibility headers are installed, however, Qt's
# feature probe enables inotify and its CMake source list omits the kqueue
@@ -43,9 +97,11 @@ endif ("${CMAKE_BUILD_TYPE}" STREQUAL "" OR "${CMAKE_BUILD_TYPE}" STREQUAL "Debu
# Qt caches command-line feature choices separately from CMAKE_BUILD_TYPE. If
# a build directory previously configured for the other build type is reused,
# FEATURE_debug can remain forced to a value whose condition is now false.
# Clear only Qt's generated CMake configuration state when the two disagree;
# compiled objects can still be reused whenever they remain compatible.
# Qt leaves nested try-compile caches and generated files throughout its build
# tree. They retain the previous source path and feature results, so a profile
# or staged-source change must clear the complete build tree.
set(qt_cache "@QT_BUILD_DIR@/CMakeCache.txt")
set(qt_signature_file "@QT_BUILD_DIR@/.bext-qt-config-signature")
set(qt_cache_stale OFF)
if (EXISTS "${qt_cache}" AND DEFINED QT_EXPECTED_BUILD_TYPE)
file(STRINGS "${qt_cache}" qt_cached_build_type_line REGEX "^CMAKE_BUILD_TYPE:[^=]*=")
@@ -65,14 +121,36 @@ if (EXISTS "${qt_cache}" AND DEFINED QT_EXPECTED_BUILD_TYPE)
endif ()
endif ()
set(qt_signature_material
"@QT_CONFIG_SIGNATURE@|${CONFIG_EXTRA_OPTS}|${QT_CMAKE_OPTS}|${QT_CONFIG_OPTS}")
string(SHA256 qt_expected_signature "${qt_signature_material}")
if (EXISTS "${qt_signature_file}")
file(READ "${qt_signature_file}" qt_cached_signature)
string(STRIP "${qt_cached_signature}" qt_cached_signature)
if (NOT qt_cached_signature STREQUAL qt_expected_signature)
set(qt_cache_stale ON)
endif ()
elseif (EXISTS "${qt_cache}")
set(qt_cache_stale ON)
endif ()
if (qt_cache_stale)
message(STATUS
"Resetting stale Qt configuration for CMAKE_BUILD_TYPE=${QT_EXPECTED_BUILD_TYPE}")
file(REMOVE "${qt_cache}")
file(REMOVE_RECURSE "@QT_BUILD_DIR@/CMakeFiles")
file(REMOVE_RECURSE "@QT_BUILD_DIR@")
file(MAKE_DIRECTORY "@QT_BUILD_DIR@")
endif ()
execute_process(COMMAND @QT_SOURCE_DIR@/${CONFIG_FILE} ${CONFIG_EXTRA_OPTS} ${QT_CONFIG_OPTS} --prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@ RESULT_VARIABLE QT_RET WORKING_DIRECTORY @QT_BUILD_DIR@ OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG)
set(qt_configure_args
${CONFIG_EXTRA_OPTS}
${QT_CONFIG_OPTS}
--prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@
)
if (QT_CMAKE_OPTS)
list(APPEND qt_configure_args -- ${QT_CMAKE_OPTS})
endif ()
execute_process(COMMAND @QT_SOURCE_DIR@/${CONFIG_FILE} ${qt_configure_args} RESULT_VARIABLE QT_RET WORKING_DIRECTORY @QT_BUILD_DIR@ OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG)
if (QT_RET)
message(FATAL_ERROR "Qt configure failed: ${MSG}\n")
@@ -106,6 +184,32 @@ qt_cache_check("FEATURE_xcb" feature_xcb)
qt_cache_check("FEATURE_wayland_client" feature_wayland_client)
qt_cache_check("FEATURE_direct2d" feature_direct2d)
qt_cache_check("QT_QPA_DEFAULT_PLATFORM" qpa_platform)
qt_cache_check("FEATURE_xmin_x11" feature_xmin_x11)
qt_cache_check("FEATURE_xmin_opengl" feature_xmin_opengl)
qt_cache_check("FEATURE_opengl" feature_opengl)
qt_cache_check("FEATURE_xcb_glx" feature_xcb_glx)
qt_cache_check("FEATURE_xcb_glx_plugin" feature_xcb_glx_plugin)
if (QT_XMIN_ENABLED)
foreach(required_feature IN ITEMS
feature_gui feature_xcb feature_xmin_x11 feature_xmin_opengl
feature_opengl feature_xcb_glx feature_xcb_glx_plugin)
if (NOT "${${required_feature}}" STREQUAL "ON")
message(FATAL_ERROR
"Xmin Qt configuration did not enable ${required_feature}: ${${required_feature}}")
endif ()
endforeach()
if (NOT qpa_platform STREQUAL "xcb")
message(FATAL_ERROR "Xmin Qt configuration did not select qxcb: ${qpa_platform}")
endif ()
qt_cache_check("Xmin_DIR" configured_xmin_dir)
file(REAL_PATH "${configured_xmin_dir}" configured_xmin_dir_real)
if (NOT configured_xmin_dir_real STREQUAL QT_XMIN_DIR)
message(FATAL_ERROR
"Qt resolved Xmin from ${configured_xmin_dir_real}, expected ${QT_XMIN_DIR}")
endif ()
endif ()
# does a window-capable backend exists for this host OS?
set(qt_has_window_gui OFF)
@@ -137,6 +241,8 @@ else()
message(STATUS "Qt platform backend check: OK (window-capable backend present).")
endif()
file(WRITE "${qt_signature_file}" "${qt_expected_signature}\n")
message("Qt configure succeeded: ${MSG}\n")
# Local Variables:
+11 -1
View File
@@ -4,6 +4,17 @@ if (QT_RET)
message(FATAL_ERROR "Qt install failed: ${MSG}\n")
endif (QT_RET)
if ("@QT_XMIN_ENABLED@" STREQUAL "ON")
execute_process(
COMMAND "@CMAKE_COMMAND@" -DQT_AUDIT_ROOT=@CMAKE_BUNDLE_INSTALL_PREFIX@
-P "@CMAKE_CURRENT_BINARY_DIR@/qt_xmin_audit.cmake"
RESULT_VARIABLE QT_AUDIT_RET
)
if (QT_AUDIT_RET)
message(FATAL_ERROR "Installed Qt Xmin dependency audit failed")
endif ()
endif ()
message("Qt install succeeded: ${MSG}\n")
# Local Variables:
@@ -12,4 +23,3 @@ message("Qt install succeeded: ${MSG}\n")
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+401
View File
@@ -0,0 +1,401 @@
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 5799112..6db8402 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -6,6 +6,28 @@ qt_find_package(WrapHarfbuzz MODULE PROVIDED_TARGETS WrapHarfbuzz::WrapHarfbuzz)
qt_find_package(WrapPNG MODULE PROVIDED_TARGETS WrapPNG::WrapPNG)
qt_find_package(WrapFreetype MODULE PROVIDED_TARGETS WrapFreetype::WrapFreetype)
+if(QT_FEATURE_xmin_x11)
+ get_target_property(qt_xmin_font_files Xmin::QtX11 XMIN_FONT_FILES)
+ if(NOT qt_xmin_font_files)
+ message(FATAL_ERROR "The Xmin package did not provide its client font files")
+ endif()
+ foreach(qt_xmin_font_file IN LISTS qt_xmin_font_files)
+ if(NOT EXISTS "${qt_xmin_font_file}")
+ message(FATAL_ERROR "Xmin client font file not found: ${qt_xmin_font_file}")
+ endif()
+ endforeach()
+
+ qt_path_join(qt_xmin_font_build_dir
+ "${QT_BUILD_DIR}" "${INSTALL_LIBDIR}" "fonts")
+ qt_path_join(qt_xmin_font_install_dir
+ "${QT_INSTALL_DIR}" "${INSTALL_LIBDIR}" "fonts")
+ qt_copy_or_install(FILES ${qt_xmin_font_files}
+ DESTINATION "${qt_xmin_font_install_dir}")
+ if(QT_WILL_INSTALL)
+ file(COPY ${qt_xmin_font_files} DESTINATION "${qt_xmin_font_build_dir}")
+ endif()
+endif()
+
if (QT_FEATURE_gui)
if(QT_QPA_PLATFORMS)
list(GET QT_QPA_PLATFORMS 0 _default_platform)
@@ -373,6 +395,8 @@ if(QT_FEATURE_opengl)
PlatformGraphics::PlatformGraphics
)
endif()
+ elseif(QT_FEATURE_xmin_opengl)
+ target_link_libraries(Gui PUBLIC Xmin::GL)
elseif(NOT QT_FEATURE_opengl_dynamic)
target_link_libraries(Gui PUBLIC WrapOpenGL::WrapOpenGL)
endif()
@@ -901,11 +925,17 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_undogroup
util/qundogroup.cpp util/qundogroup.h
)
+if(QT_FEATURE_xmin_x11)
+ set(qt_glx_xlib_target Xmin::QtX11)
+else()
+ set(qt_glx_xlib_target X11::X11)
+endif()
+
qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
SOURCES
opengl/platform/unix/qglxconvenience.cpp opengl/platform/unix/qglxconvenience_p.h
LIBRARIES
- X11::X11
+ ${qt_glx_xlib_target}
)
qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengles2
@@ -1087,14 +1117,20 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_systemtrayicon AND TARGET Qt:
platform/unix/dbustray/qxdgnotificationproxy.cpp platform/unix/dbustray/qxdgnotificationproxy_p.h
)
+if(QT_FEATURE_xmin_x11)
+ set(qt_xkbcommon_target Xmin::QtX11)
+else()
+ set(qt_xkbcommon_target XKB::XKB)
+endif()
+
qt_internal_extend_target(Gui CONDITION QT_FEATURE_xkbcommon AND UNIX
SOURCES
platform/unix/qxkbcommon.cpp platform/unix/qxkbcommon_p.h
platform/unix/qxkbcommon_3rdparty.cpp
LIBRARIES
- XKB::XKB
+ ${qt_xkbcommon_target}
PRIVATE_MODULE_INTERFACE
- XKB::XKB
+ ${qt_xkbcommon_target}
)
qt_internal_extend_target(Gui CONDITION QT_FEATURE_metal
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index db35764..6b3bf38 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -94,9 +94,11 @@ if(QT_FEATURE_system_zlib)
qt_add_qmake_lib_dependency(libpng zlib)
endif()
qt_find_package(Mtdev MODULE PROVIDED_TARGETS PkgConfig::Mtdev MODULE_NAME gui QMAKE_LIB mtdev)
+if(NOT FEATURE_xmin_x11)
qt_find_package(WrapOpenGL MODULE PROVIDED_TARGETS WrapOpenGL::WrapOpenGL MODULE_NAME gui QMAKE_LIB opengl)
qt_find_package(GLESv2 MODULE
PROVIDED_TARGETS GLESv2::GLESv2 MODULE_NAME gui QMAKE_LIB opengl_es2)
+endif()
qt_find_package(Tslib MODULE PROVIDED_TARGETS PkgConfig::Tslib MODULE_NAME gui QMAKE_LIB tslib)
qt_find_package(WrapVulkanHeaders MODULE PROVIDED_TARGETS WrapVulkanHeaders::WrapVulkanHeaders
MODULE_NAME gui QMAKE_LIB vulkan MARK_OPTIONAL)
@@ -115,6 +117,16 @@ if(LINUX OR FREEBSD OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(Wayland MODULE PROVIDED_TARGETS Wayland::Egl
MODULE_NAME gui QMAKE_LIB wayland_egl)
endif()
+if(FEATURE_xmin_x11)
+ qt_find_package(Xmin 0.1 CONFIG
+ PROVIDED_TARGETS Xmin::QtX11 Xmin::GL MODULE_NAME gui QMAKE_LIB xmin_x11)
+ if(TARGET Xmin::GL AND NOT TARGET WrapOpenGL::WrapOpenGL)
+ add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
+ set_property(TARGET WrapOpenGL::WrapOpenGL PROPERTY
+ INTERFACE_LINK_LIBRARIES Xmin::GL)
+ set(WrapOpenGL_FOUND ON)
+ endif()
+else()
if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(X11 MODULE PROVIDED_TARGETS X11::X11 MODULE_NAME gui QMAKE_LIB xlib)
endif()
@@ -215,6 +227,7 @@ if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS)
PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
endif()
qt_add_qmake_lib_dependency(xrender xlib)
+endif()
# qt wayland client
if(LINUX OR FREEBSD OR QT_FIND_ALL_PACKAGES_ALWAYS)
@@ -603,6 +616,53 @@ glFramebufferTexture(GL_TEXTURE_2D, GL_DEPTH_STENCIL_ATTACHMENT, 1, 0);
}
")
+# xmin_x11
+if(FEATURE_xmin_x11)
+ qt_config_compile_test(xmin_x11
+ LABEL "Xmin X11 client"
+ LIBRARIES
+ Xmin::QtX11
+ CODE
+"#include <X11/Xlib.h>
+#include <X11/Xlib-xcb.h>
+#include <xcb/glx.h>
+#include <xcb/xcb.h>
+#include <xcb/xcb_cursor.h>
+#include <xcb/xcb_icccm.h>
+#include <xcb/xcb_image.h>
+#include <xcb/xcb_keysyms.h>
+#include <xcb/xcb_renderutil.h>
+#include <xcb/randr.h>
+#include <xcb/render.h>
+#include <xcb/shape.h>
+#include <xcb/shm.h>
+#include <xcb/sync.h>
+#include <xcb/xfixes.h>
+#include <xcb/xkb.h>
+#include <xkbcommon/xkbcommon.h>
+#include <xkbcommon/xkbcommon-x11.h>
+
+int main(void)
+{
+ int screen = 0;
+ Display *display = XOpenDisplay(nullptr);
+ xcb_connection_t *connection = XGetXCBConnection(display);
+ xcb_glx_query_version(connection, 1, 4);
+ xcb_render_query_pict_formats(connection);
+ xcb_render_util_find_standard_format(nullptr, XCB_PICT_STANDARD_ARGB_32);
+ xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_DEFAULT_INCLUDES);
+ xkb_x11_setup_xkb_extension(
+ connection,
+ XKB_X11_MIN_MAJOR_XKB_VERSION,
+ XKB_X11_MIN_MINOR_XKB_VERSION,
+ XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS,
+ nullptr, nullptr, nullptr, nullptr);
+ xkb_context_unref(context);
+ XCloseDisplay(display);
+ return screen;
+}")
+endif()
+
# xcb_syslibs
qt_config_compile_test(xcb_syslibs
LABEL "XCB (extensions)"
@@ -1221,20 +1281,30 @@ qt_feature("tuiotouch" PRIVATE
PURPOSE "Provides the TuioTouch input plugin."
CONDITION QT_FEATURE_network AND QT_FEATURE_udpsocket
)
+qt_feature("xmin-x11" PRIVATE
+ SECTION "Platform plugins"
+ LABEL "Xmin minimalist X11 client"
+ CONDITION TARGET Xmin::QtX11 AND TEST_xmin_x11
+)
qt_feature("xcb" PUBLIC
SECTION "Platform plugins"
LABEL "XCB"
AUTODETECT NOT APPLE
- CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11
+ CONDITION QT_FEATURE_thread AND ((TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11) OR (QT_FEATURE_xmin_x11 AND TEST_xmin_x11))
)
qt_feature("xcb-glx-plugin" PUBLIC
LABEL "GLX Plugin"
CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
EMIT_IF QT_FEATURE_xcb
)
+qt_feature("xmin-opengl" PRIVATE
+ LABEL "Xmin software-direct OpenGL"
+ CONDITION QT_FEATURE_xmin_x11 AND TARGET Xmin::GL AND QT_FEATURE_opengl
+ EMIT_IF QT_FEATURE_xcb
+)
qt_feature("xcb-glx" PRIVATE
LABEL " XCB GLX"
- CONDITION XCB_GLX_FOUND
+ CONDITION XCB_GLX_FOUND OR QT_FEATURE_xmin_opengl
EMIT_IF QT_FEATURE_xcb AND QT_FEATURE_xcb_glx_plugin
)
qt_feature("xcb-egl-plugin" PRIVATE
@@ -1244,7 +1314,7 @@ qt_feature("xcb-egl-plugin" PRIVATE
)
qt_feature("xcb-xlib" PRIVATE
LABEL "XCB Xlib"
- CONDITION QT_FEATURE_xlib AND X11_XCB_FOUND
+ CONDITION QT_FEATURE_xlib AND (X11_XCB_FOUND OR QT_FEATURE_xmin_x11)
)
qt_feature("xcb-sm" PRIVATE
LABEL "xcb-sm"
@@ -1261,16 +1331,16 @@ qt_feature("system-xcb-xinput" PRIVATE SYSTEM_LIBRARY
)
qt_feature("xkbcommon" PUBLIC
LABEL "xkbcommon"
- CONDITION XKB_FOUND
+ CONDITION XKB_FOUND OR QT_FEATURE_xmin_x11
)
qt_feature("xkbcommon-x11" PRIVATE
LABEL "xkbcommon-x11"
- CONDITION QT_FEATURE_xkbcommon AND XKB_COMMON_X11_FOUND
+ CONDITION QT_FEATURE_xkbcommon AND (XKB_COMMON_X11_FOUND OR QT_FEATURE_xmin_x11)
)
qt_feature("xlib" PRIVATE
LABEL "XLib"
AUTODETECT NOT APPLE OR QT_FEATURE_xcb
- CONDITION X11_FOUND
+ CONDITION X11_FOUND OR QT_FEATURE_xmin_x11
)
qt_feature("texthtmlparser" PUBLIC
SECTION "Kernel"
diff --git a/src/gui/qt_cmdline.cmake b/src/gui/qt_cmdline.cmake
index cbafae7..4cdd0b0 100644
--- a/src/gui/qt_cmdline.cmake
+++ b/src/gui/qt_cmdline.cmake
@@ -38,6 +38,7 @@ qt_commandline_option(sm TYPE boolean NAME sessionmanager)
qt_commandline_option(tslib TYPE boolean)
qt_commandline_option(vulkan TYPE boolean)
qt_commandline_option(xcb TYPE boolean)
+qt_commandline_option(xmin-x11 TYPE boolean)
qt_commandline_option(bundled-xcb-xinput TYPE boolean)
qt_commandline_option(xcb-native-painting TYPE boolean)
qt_commandline_option(xcb-xlib TYPE boolean)
diff --git a/src/plugins/platforminputcontexts/CMakeLists.txt b/src/plugins/platforminputcontexts/CMakeLists.txt
index f54516c..af8395d 100644
--- a/src/plugins/platforminputcontexts/CMakeLists.txt
+++ b/src/plugins/platforminputcontexts/CMakeLists.txt
@@ -1,7 +1,7 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-if(QT_FEATURE_xkbcommon)
+if(QT_FEATURE_xkbcommon AND NOT QT_FEATURE_xmin_x11)
add_subdirectory(compose)
endif()
if(QT_FEATURE_xkbcommon AND TARGET Qt::DBus AND UNIX AND NOT MACOS)
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index 204acd7..a8e77d0 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -10,6 +10,29 @@ if(GCC)
add_compile_options(-Wno-psabi)
endif()
+if(QT_FEATURE_xmin_x11)
+ set(qt_xcb_client_libraries Xmin::QtX11)
+else()
+ set(qt_xcb_client_libraries
+ PkgConfig::XKB_COMMON_X11
+ XCB::CURSOR
+ XCB::ICCCM
+ XCB::UTIL
+ XCB::IMAGE
+ XCB::KEYSYMS
+ XCB::RANDR
+ XCB::RENDER
+ XCB::RENDERUTIL
+ XCB::SHAPE
+ XCB::SHM
+ XCB::SYNC
+ XCB::XCB
+ XCB::XFIXES
+ XCB::XKB
+ XKB::XKB
+ )
+endif()
+
qt_internal_add_module(XcbQpaPrivate
CONFIG_MODULE_NAME xcb_qpa_lib
INTERNAL_MODULE
@@ -47,24 +70,9 @@ qt_internal_add_module(XcbQpaPrivate
INCLUDE_DIRECTORIES
gl_integrations
PUBLIC_LIBRARIES
- PkgConfig::XKB_COMMON_X11
Qt::CorePrivate
Qt::GuiPrivate
- XCB::CURSOR
- XCB::ICCCM
- XCB::UTIL
- XCB::IMAGE
- XCB::KEYSYMS
- XCB::RANDR
- XCB::RENDER
- XCB::RENDERUTIL
- XCB::SHAPE
- XCB::SHM
- XCB::SYNC
- XCB::XCB
- XCB::XFIXES
- XCB::XKB
- XKB::XKB
+ ${qt_xcb_client_libraries}
NO_UNITY_BUILD # X11 define clashes
)
@@ -83,12 +91,17 @@ qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_draganddrop
qxcbdrag.cpp qxcbdrag.h
)
+if(QT_FEATURE_xmin_x11)
+ set(qt_xcb_xlib_libraries Xmin::QtX11)
+else()
+ set(qt_xcb_xlib_libraries X11::XCB X11::X11)
+endif()
+
qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_xcb_xlib
SOURCES
qt_xlib_wrapper.c qt_xlib_wrapper.h
PUBLIC_LIBRARIES
- X11::XCB
- X11::X11
+ ${qt_xcb_xlib_libraries}
)
qt_internal_extend_target(XcbQpaPrivate CONDITION NOT QT_FEATURE_xcb_xlib
diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt
index 907c2c9..b900459 100644
--- a/src/plugins/platforms/offscreen/CMakeLists.txt
+++ b/src/plugins/platforms/offscreen/CMakeLists.txt
@@ -26,9 +26,15 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin
## Scopes:
#####################################################################
+if(QT_FEATURE_xmin_x11)
+ set(qt_offscreen_xlib_target Xmin::QtX11)
+else()
+ set(qt_offscreen_xlib_target X11::X11)
+endif()
+
qt_internal_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
LIBRARIES
- X11::X11
+ ${qt_offscreen_xlib_target}
)
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
index f9f78ad..32bb053 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
@@ -31,9 +31,15 @@ qt_internal_add_plugin(QXcbGlxIntegrationPlugin
## Scopes:
#####################################################################
+if(QT_FEATURE_xmin_x11)
+ set(qt_xcb_glx_library Xmin::QtX11)
+else()
+ set(qt_xcb_glx_library XCB::GLX)
+endif()
+
qt_internal_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_xcb_glx
LIBRARIES
- XCB::GLX
+ ${qt_xcb_glx_library}
)
qt_internal_extend_target(QXcbGlxIntegrationPlugin
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.cpp b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
index fa9a7a3..37cc5d3 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.cpp
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
@@ -341,7 +341,7 @@ void QXcbEventQueue::sendCloseConnectionEvent() const
xcb_create_window(c, XCB_COPY_FROM_PARENT,
window, screen->root,
0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
- screen->root_visual, 0, nullptr);
+ XCB_COPY_FROM_PARENT, 0, nullptr);
event.response_type = XCB_CLIENT_MESSAGE;
event.format = 32;
+93
View File
@@ -0,0 +1,93 @@
cmake_minimum_required(VERSION 3.26)
if (NOT DEFINED QT_AUDIT_ROOT OR NOT QT_AUDIT_ROOT)
message(FATAL_ERROR "QT_AUDIT_ROOT is required")
endif ()
find_program(QT_LDD_EXECUTABLE ldd REQUIRED)
set(qt_xmin_audit_files
"${QT_AUDIT_ROOT}/@LIB_DIR@/libQt6Gui@CMAKE_SHARED_LIBRARY_SUFFIX@"
"${QT_AUDIT_ROOT}/@LIB_DIR@/libQt6XcbQpa@CMAKE_SHARED_LIBRARY_SUFFIX@"
"${QT_AUDIT_ROOT}/@LIB_DIR@/libQt6OpenGLWidgets@CMAKE_SHARED_LIBRARY_SUFFIX@"
"${QT_AUDIT_ROOT}/plugins/platforms/libqxcb@CMAKE_SHARED_LIBRARY_SUFFIX@"
"${QT_AUDIT_ROOT}/plugins/xcbglintegrations/libqxcb-glx-integration@CMAKE_SHARED_LIBRARY_SUFFIX@"
)
if (QT_AUDIT_INCLUDE_SVG)
list(APPEND qt_xmin_audit_files
"${QT_AUDIT_ROOT}/@LIB_DIR@/libQt6Svg@CMAKE_SHARED_LIBRARY_SUFFIX@"
"${QT_AUDIT_ROOT}/@LIB_DIR@/libQt6SvgWidgets@CMAKE_SHARED_LIBRARY_SUFFIX@"
)
endif ()
set(qt_forbidden_x_libraries
libX11
libX11-xcb
libXau
libXdmcp
libXext
libICE
libSM
libxcb
libxkbcommon
libxkbcommon-x11
libXi
libXrender
libGLX
libOpenGL
libEGL
)
foreach(qt_audit_file IN LISTS qt_xmin_audit_files)
if (NOT EXISTS "${qt_audit_file}")
message(FATAL_ERROR "Qt Xmin audit artifact is missing: ${qt_audit_file}")
endif ()
execute_process(
COMMAND "${QT_LDD_EXECUTABLE}" "${qt_audit_file}"
RESULT_VARIABLE qt_ldd_result
OUTPUT_VARIABLE qt_ldd_output
ERROR_VARIABLE qt_ldd_error
)
if (qt_ldd_result)
message(FATAL_ERROR "ldd failed for ${qt_audit_file}: ${qt_ldd_error}")
endif ()
if (qt_ldd_output MATCHES "not found")
message(FATAL_ERROR "Unresolved Qt dependency for ${qt_audit_file}:\n${qt_ldd_output}")
endif ()
foreach(qt_forbidden_library IN LISTS qt_forbidden_x_libraries)
if (qt_ldd_output MATCHES "(^|[\\n\\t ])${qt_forbidden_library}\\.so")
message(FATAL_ERROR
"Qt Xmin artifact resolved forbidden host library ${qt_forbidden_library}:\n${qt_ldd_output}")
endif ()
endforeach()
set(qt_found_xmin_client FALSE)
set(qt_found_xmin_gl FALSE)
string(REPLACE "\n" ";" qt_dependency_lines "${qt_ldd_output}")
foreach(qt_dependency_line IN LISTS qt_dependency_lines)
if (qt_dependency_line MATCHES "libXminClient\\.so")
string(FIND "${qt_dependency_line}" "@QT_XMIN_CLIENT_DIR@/" qt_xmin_client_pos)
if (qt_xmin_client_pos EQUAL -1)
message(FATAL_ERROR
"Qt resolved libXminClient outside QT_XMIN_ROOT: ${qt_dependency_line}")
endif ()
set(qt_found_xmin_client TRUE)
endif ()
if (qt_dependency_line MATCHES "libGL\\.so")
string(FIND "${qt_dependency_line}" "@QT_XMIN_GL_DIR@/" qt_xmin_gl_pos)
if (qt_xmin_gl_pos EQUAL -1)
message(FATAL_ERROR
"Qt resolved libGL outside QT_XMIN_ROOT: ${qt_dependency_line}")
endif ()
set(qt_found_xmin_gl TRUE)
endif ()
endforeach()
if (NOT qt_found_xmin_client OR NOT qt_found_xmin_gl)
message(FATAL_ERROR
"Qt artifact is not backed by both Xmin client libraries: ${qt_audit_file}\n${qt_ldd_output}")
endif ()
endforeach()
message(STATUS "Qt Xmin dependency audit passed for ${QT_AUDIT_ROOT}")
+11
View File
@@ -20,6 +20,17 @@ if (ENABLE_RE2C)
-DRE2C_BUILD_RE2GO=OFF
-DRE2C_BUILD_RE2RUST=OFF
-DRE2C_REBUILD_DOCS=OFF
-DRE2C_BUILD_RE2D=OFF
-DRE2C_BUILD_RE2GO=OFF
-DRE2C_BUILD_RE2HS=OFF
-DRE2C_BUILD_RE2JAVA=OFF
-DRE2C_BUILD_RE2JS=OFF
-DRE2C_BUILD_RE2OCAML=OFF
-DRE2C_BUILD_RE2PY=OFF
-DRE2C_BUILD_RE2RUST=OFF
-DRE2C_BUILD_RE2SWIFT=OFF
-DRE2C_BUILD_RE2V=OFF
-DRE2C_BUILD_RE2ZIG=OFF
-DBIN_DIR=${BIN_DIR}
-DLIB_DIR=${LIB_DIR}
-DDATA_DIR=${DATA_DIR}
+13 -34
View File
@@ -1,28 +1,7 @@
diff -Naur re2c/CMakeLists.txt RE2C_BLD/CMakeLists.txt
--- re2c/CMakeLists.txt 2023-09-18 13:54:03.771615948 -0400
+++ RE2C_BLD/CMakeLists.txt 2023-09-18 17:06:59.078943914 -0400
@@ -33,11 +33,7 @@
option(RE2C_REGEN_BENCHMARKS "Regenerate C code for benchmarks" OFF)
# checks for programs
-find_package(Python3 COMPONENTS Interpreter)
-# starting from cmake 3.19 find_package can do version check, but we are on 3.12
-if(Python3_VERSION VERSION_LESS 3.7)
- message(FATAL_ERROR "python version 3.7 or higher is required")
-endif()
+if (Python3_EXECUTABLE)
if(RE2C_REBUILD_DOCS)
execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import docutils"
@@ -48,6 +44,7 @@
message(FATAL_ERROR "python package docutils (needed for docs) not found")
endif()
endif()
+endif (Python3_EXECUTABLE)
# Use C++11 standard. Note that without `set(CMAKE_CXX_EXTENSIONS OFF)` this enables
# -std=gnu++11, not -std=c++11. Extensions are needed to enable POSIX functions on
@@ -86,7 +83,6 @@
--- re2c/CMakeLists.txt 2026-09-09 09:36:54.036421014 -0400
+++ RE2C_BLD/CMakeLists.txt 2026-09-09 09:39:52.866054493 -0400
@@ -137,7 +138,6 @@
set(top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
set(top_builddir "${CMAKE_CURRENT_BINARY_DIR}")
@@ -30,28 +9,28 @@ diff -Naur re2c/CMakeLists.txt RE2C_BLD/CMakeLists.txt
configure_file(doc/manpage.rst.in doc/manpage.rst @ONLY)
configure_file(doc/help.rst.in doc/help.rst @ONLY)
@@ -347,6 +343,7 @@
)
@@ -486,6 +486,7 @@
if(RE2C_BUILD_TESTS)
# tests
+ if (Python3_EXECUTABLE)
+ if (Python3_EXECUTABLE)
add_custom_target(tests
DEPENDS "${RE2C_RUN_TESTS}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
@@ -397,6 +394,7 @@
@@ -539,6 +540,7 @@
re2c_test_ver_to_vernum
re2c_test_argsubst
)
+ endif (Python3_EXECUTABLE)
+ endif (Python3_EXECUTABLE)
endif()
if (RE2C_BUILD_LIBS)
@@ -532,6 +530,8 @@
@@ -678,6 +680,8 @@
endif()
# only add check target if toplevel project
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+ if (Python3_EXECUTABLE)
if(RE2C_BUILD_TESTS)
+ if (Python3_EXECUTABLE)
add_custom_target(check)
add_dependencies(check check_re2c check_libre2c)
+ endif (Python3_EXECUTABLE)
+ endif()
endif()

Some files were not shown because too many files have changed in this diff Show More