Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bf111e741 | ||
|
|
42d8d7ca57 | ||
|
|
5ccf9b577d | ||
|
|
cfe7b808cf | ||
|
|
f8245e0bb3 | ||
|
|
0682795bcf | ||
|
|
6d97793557 | ||
|
|
bbf604b69f | ||
|
|
31a13bc8d3 | ||
|
|
76e1dbdb3a | ||
|
|
12115e6c59 | ||
|
|
1c7c8af7d0 | ||
|
|
fe3b288e65 | ||
|
|
84a51b3601 | ||
|
|
05611e687e | ||
|
|
78421c1ecc | ||
|
|
da3a1e98fd | ||
|
|
028c2e3c0a | ||
|
|
fa74b75c10 | ||
|
|
51ab96ae0d | ||
|
|
82945d86be | ||
|
|
d71febe142 | ||
|
|
fe4d95add4 | ||
|
|
102f97cb07 | ||
|
|
10e3a01fce | ||
|
|
b37d4565d1 | ||
|
|
921f0045a2 | ||
|
|
c5d91b13a1 | ||
|
|
d73b1762a9 | ||
|
|
f6d3f346d8 | ||
|
|
9788dcf2a6 | ||
|
|
116746de32 | ||
|
|
990f4c3639 | ||
|
|
f26c88f95b | ||
|
|
8307051b6a | ||
|
|
6aa9c192ed | ||
|
|
0995755d56 | ||
|
|
333b86b81c | ||
|
|
4adc14081a | ||
|
|
7c25d80e2b | ||
|
|
159e6213df | ||
|
|
fd118bd1cf | ||
|
|
8ac868da8b | ||
|
|
3b88d2086f | ||
|
|
9b7024becb | ||
|
|
b0f9221dca | ||
|
|
d854219aa9 | ||
|
|
056188d31e | ||
|
|
b466277ae9 | ||
|
|
8c63fe7dcd | ||
|
|
4d8cc8d980 | ||
|
|
9a909d5e9d | ||
|
|
6bc1e3c838 | ||
|
|
a0d2801f64 | ||
|
|
ac076a890d | ||
|
|
f89ea26a1b | ||
|
|
be80be1a24 | ||
|
|
0c0db6e986 | ||
|
|
4fca55f381 | ||
|
|
c8f3497730 | ||
|
|
7686500d1a | ||
|
|
b9cebb4453 | ||
|
|
679eb6fcd9 | ||
|
|
21ae7bea54 | ||
|
|
0f6d38ec1a | ||
|
|
97d28467b8 | ||
|
|
baddbbded1 | ||
|
|
2db0665299 | ||
|
|
82880179d2 | ||
|
|
e688399906 | ||
|
|
462c1aa715 | ||
|
|
c5c2de9507 | ||
|
|
5771519119 | ||
|
|
99b39937c4 | ||
|
|
6890172ba2 | ||
|
|
0f1eac972c | ||
|
|
0d1da2084a | ||
|
|
bd388e91cf | ||
|
|
dc99a85999 | ||
|
|
f73f4a914a | ||
|
|
29a10adaff | ||
|
|
d7bf07d0e6 | ||
|
|
ad7aca815a | ||
|
|
fda4fe0f17 | ||
|
|
6f5ad5b668 | ||
|
|
195dc3e24d | ||
|
|
d35d0152f8 | ||
|
|
5801e9f9e6 | ||
|
|
006e9db355 | ||
|
|
8eae2d40eb | ||
|
|
baf3038cd1 | ||
|
|
52011c5dcf | ||
|
|
39b9138854 | ||
|
|
ae9d550713 | ||
|
|
4f151ba7f3 | ||
|
|
3f5aeef137 | ||
|
|
4dd532a1f4 | ||
|
|
87a9e4a361 | ||
|
|
f1bfca24ab | ||
|
|
55c6b66ff4 | ||
|
|
799bec628e | ||
|
|
f50169703c | ||
|
|
f5b44b800b | ||
|
|
2b7b512d91 | ||
|
|
74a62e770f | ||
|
|
b54c4d94c9 | ||
|
|
f388808dd5 | ||
|
|
12f7d5669e | ||
|
|
56e1306436 | ||
|
|
1d8e8de021 | ||
|
|
0cbda94442 | ||
|
|
19777317de | ||
|
|
79b68d9c8c | ||
|
|
fb01cf5ec0 | ||
|
|
b60279fce4 | ||
|
|
f6c1e219f4 | ||
|
|
2aceec95cc | ||
|
|
4e4f85a5f5 | ||
|
|
219f68c626 | ||
|
|
374a5d4b72 | ||
|
|
54051990cd | ||
|
|
ff76b235c7 | ||
|
|
c565aa23d4 | ||
|
|
7d0e799891 | ||
|
|
d9f12abc00 | ||
|
|
13e04ce769 | ||
|
|
b43c55bd16 | ||
|
|
fa85fcbe8e | ||
|
|
a16b4a6baf | ||
|
|
364b6b4ee2 | ||
|
|
4ca1f79ab9 | ||
|
|
6709a5e275 | ||
|
|
62dd245aed | ||
|
|
86895dcdbd | ||
|
|
6efe6ecbcf | ||
|
|
8621d937c2 | ||
|
|
7e35512c44 | ||
|
|
7ebceffe79 | ||
|
|
c57c062f25 | ||
|
|
5f02a06a27 | ||
|
|
2af8cce2bb | ||
|
|
5f9560441f | ||
|
|
6e6a6175fd | ||
|
|
c0c4c2f4d0 | ||
|
|
a48ae4bc4e | ||
|
|
98be15e700 | ||
|
|
0f52b9f48a | ||
|
|
05e442e141 | ||
|
|
c6388d2a70 | ||
|
|
e5775f675f | ||
|
|
9f301944c2 | ||
|
|
122ba04a96 | ||
|
|
10ce6a2a8f | ||
|
|
3b55bceffc | ||
|
|
c116241190 | ||
|
|
84d6e8c641 | ||
|
|
50ca670e0d | ||
|
|
f75541f5a6 | ||
|
|
e6f2e2a2a8 | ||
|
|
01f26ed978 | ||
|
|
119ca0197e | ||
|
|
9ac8d7c62d | ||
|
|
5cec0988eb | ||
|
|
d0c83bb5fc | ||
|
|
5fbd44a9b0 | ||
|
|
99b7124ed1 | ||
|
|
cc4ebeeb38 | ||
|
|
40f83e952b | ||
|
|
13af2bf64c | ||
|
|
71b46f4f20 | ||
|
|
344809cdde | ||
|
|
136738824c | ||
|
|
a84fb416de | ||
|
|
dd504f3f89 | ||
|
|
c41c111bc9 | ||
|
|
b41712afdc | ||
|
|
dffd78f2c3 | ||
|
|
3e43fdd83e | ||
|
|
02798b5732 | ||
|
|
7c9d874bf5 | ||
|
|
949b394e8b | ||
|
|
fb4c47790a | ||
|
|
564f66ef8f | ||
|
|
366d4a8ccb | ||
|
|
d8d2099421 | ||
|
|
bdaf9c1d51 | ||
|
|
ba73add03b | ||
|
|
a61f1674be | ||
|
|
9de877163d | ||
|
|
7eaec42723 | ||
|
|
ef7b754633 | ||
|
|
0139aef7cf | ||
|
|
6f6ee77f4b | ||
|
|
9a4f748199 | ||
|
|
f2f561a701 | ||
|
|
b0ebab1bd4 | ||
|
|
8d3c3d3348 | ||
|
|
606596f1f1 | ||
|
|
d30c9b9c99 | ||
|
|
62dd78aa8d | ||
|
|
2cf50965dc | ||
|
|
14df08be98 | ||
|
|
352b58f0ae | ||
|
|
2fb93e20f4 | ||
|
|
3827531ead | ||
|
|
d1a01b527a | ||
|
|
d26b3f13fb | ||
|
|
b337acc1f3 | ||
|
|
4c289c0d5d | ||
|
|
c66cf8d7e7 | ||
|
|
dda9c16a80 | ||
|
|
bb75c9a35f | ||
|
|
a9dd4139ee | ||
|
|
5f15f22fcd | ||
|
|
39d38050b1 | ||
|
|
a75b442696 | ||
|
|
f8e0be4212 | ||
|
|
43a173bfe5 | ||
|
|
ec45d1802d | ||
|
|
269a10e090 | ||
|
|
8af33bc12f | ||
|
|
1aa3cfdffc | ||
|
|
b78aa61494 | ||
|
|
016b9bd11e | ||
|
|
4df2c07626 | ||
|
|
8ec79c216f | ||
|
|
ccee7d8da2 | ||
|
|
0fe0277e88 | ||
|
|
fd4bf7c3ae | ||
|
|
926bc4d20f | ||
|
|
13e7b8f057 | ||
|
|
c492e7f63b | ||
|
|
63ddb79c16 | ||
|
|
a0f0b51a7d | ||
|
|
1114fad340 | ||
|
|
62e4015096 | ||
|
|
beead06c09 | ||
|
|
69cd9afc93 | ||
|
|
eb20e24397 | ||
|
|
bc73bf4e9b | ||
|
|
cfdef3de77 | ||
|
|
228201d3e1 | ||
|
|
d79f88cb4b | ||
|
|
37cb81016a | ||
|
|
546d964c3b | ||
|
|
194e19196d | ||
|
|
f75ec63b1e | ||
|
|
b8c7c5f262 | ||
|
|
9278314222 | ||
|
|
0352b63f73 | ||
|
|
18fc3a6206 | ||
|
|
edfd0ba01b | ||
|
|
0ae7f1dc1d | ||
|
|
8075a8544d | ||
|
|
e8cdc58fb0 | ||
|
|
4dd690900c | ||
|
|
e810f0e7a6 | ||
|
|
40de130363 | ||
|
|
07e655794b | ||
|
|
a557407c71 | ||
|
|
fa282dc2d1 | ||
|
|
42f9cd28fd | ||
|
|
a7de70fe15 | ||
|
|
b7eb5fa064 | ||
|
|
70bf649aec | ||
|
|
17f3f0c802 | ||
|
|
97144d9ce8 | ||
|
|
5d1739c736 | ||
|
|
657d0b2c8f | ||
|
|
fe856ea716 | ||
|
|
b171adcc33 | ||
|
|
a77f10ccb5 | ||
|
|
4ae43a98dc | ||
|
|
e819891ffc | ||
|
|
174ddc4281 | ||
|
|
a001088581 | ||
|
|
3cfa175196 | ||
|
|
7c54f6d527 | ||
|
|
c944b18111 | ||
|
|
4843b29eb6 | ||
|
|
ecec7ad81d | ||
|
|
a1aeeb1313 | ||
|
|
295cdc9f0f | ||
|
|
06d1ac96f9 | ||
|
|
8d97de2af8 | ||
|
|
fa11494067 | ||
|
|
3211ee1861 | ||
|
|
cef112292a | ||
|
|
5f8ed1189c | ||
|
|
affb3b60f6 | ||
|
|
543b340820 | ||
|
|
935331c5eb | ||
|
|
7cf75fd2c1 | ||
|
|
b83786ff08 | ||
|
|
2b480a266a | ||
|
|
ce95a2668d | ||
|
|
ee06c9068b | ||
|
|
2035d78b52 | ||
|
|
aea0dee2ef | ||
|
|
9cbd27d307 | ||
|
|
7bebf9ea7a | ||
|
|
40a163b478 | ||
|
|
27e9152fe7 | ||
|
|
442086b36c | ||
|
|
82fc774da6 | ||
|
|
66f095a7d9 | ||
|
|
7476dee430 | ||
|
|
632dbeac1b | ||
|
|
998ddc16dc | ||
|
|
8a9a21f285 | ||
|
|
90ea63597e | ||
|
|
df352726ce | ||
|
|
9449a6599f | ||
|
|
f2a02366be | ||
|
|
f68d029b9f | ||
|
|
6f48a372bf |
@@ -0,0 +1 @@
|
||||
*.patch -whitespace
|
||||
@@ -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-15
|
||||
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-15-${{ 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-15-${{ runner.arch }}-release-${{ github.sha }}
|
||||
path: ${{ runner.temp }}/bext-macos-15-${{ 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-15)-(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"
|
||||
+56
-104
@@ -20,11 +20,32 @@ name: BRL-CAD
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
windows_ninja_release:
|
||||
name: MSVC - Ninja Release build
|
||||
runs-on: windows-latest
|
||||
dependency_metadata:
|
||||
name: Dependency metadata and supply-chain checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate dependency metadata and documentation
|
||||
run: cmake -DBEXT_SOURCE_DIR="$GITHUB_WORKSPACE" -DBEXT_DOC_MODE=CHECK -P CMake/GenerateDependencyDocs.cmake
|
||||
|
||||
- name: Generate SPDX SBOM
|
||||
run: cmake -DBEXT_SOURCE_DIR="$GITHUB_WORKSPACE" -DBEXT_SBOM_OUTPUT="$RUNNER_TEMP/bext.spdx.json" -P CMake/GenerateSbom.cmake
|
||||
|
||||
- name: Upload SPDX SBOM
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bext-spdx-sbom
|
||||
path: ${{ runner.temp }}/bext.spdx.json
|
||||
|
||||
linux_configure_presets:
|
||||
name: Ubuntu Configure Preset - ${{ matrix.preset }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
matrix:
|
||||
preset: [auto, bundled, minimal, everything]
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
@@ -32,36 +53,23 @@ jobs:
|
||||
- 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: 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 flex bison m4 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
|
||||
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
|
||||
# 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...
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --preset ${{ matrix.preset }} -DGIT_SHALLOW_CLONE=ON -DEXT_BUILD_VERBOSE=ON
|
||||
|
||||
windows_ninja_debug:
|
||||
name: MSVC - Ninja Debug build
|
||||
@@ -88,7 +96,7 @@ jobs:
|
||||
- name: Configure
|
||||
shell: powershell
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Debug -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON
|
||||
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Debug -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
|
||||
@@ -123,11 +131,16 @@ 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
|
||||
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
|
||||
# https://superuser.com/a/1553374/1286142
|
||||
@@ -137,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:
|
||||
@@ -156,11 +168,16 @@ 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
|
||||
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
|
||||
# https://superuser.com/a/1553374/1286142
|
||||
@@ -170,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
|
||||
|
||||
- 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
|
||||
@@ -238,7 +219,7 @@ jobs:
|
||||
run: |
|
||||
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
|
||||
# We're running into disk space issues with the Linux debug build, so turn off GDAL
|
||||
cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_GDAL=OFF
|
||||
cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_GDAL=OFF -DEXT_BUILD_VERBOSE=ON
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -246,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
|
||||
|
||||
- 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
|
||||
@@ -295,10 +248,9 @@ jobs:
|
||||
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=Debug
|
||||
cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON -DCMAKE_BUILD_TYPE=Debug -DEXT_BUILD_VERBOSE=ON
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
|
||||
cd build && ninja -j2 -v
|
||||
|
||||
|
||||
+85
-40
@@ -2,318 +2,363 @@
|
||||
path = patch/patch
|
||||
url = https://github.com/BRL-CAD/patch
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "astyle/astyle"]
|
||||
path = astyle/astyle
|
||||
url = https://github.com/BRL-CAD/astyle
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "lief/LIEF"]
|
||||
path = lief/LIEF
|
||||
url = https://github.com/BRL-CAD/LIEF
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "lemon/lemon"]
|
||||
path = lemon/lemon
|
||||
url = https://github.com/BRL-CAD/lemon
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "re2c/re2c"]
|
||||
path = re2c/re2c
|
||||
url = https://github.com/BRL-CAD/re2c
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "perplex/perplex"]
|
||||
path = perplex/perplex
|
||||
url = https://github.com/BRL-CAD/perplex
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "plief/plief"]
|
||||
path = plief/plief
|
||||
url = https://github.com/BRL-CAD/plief
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "strclear/strclear"]
|
||||
path = strclear/strclear
|
||||
url = https://github.com/BRL-CAD/strclear
|
||||
ignore = dirty
|
||||
[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
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "png/libpng"]
|
||||
path = png/libpng
|
||||
url = https://github.com/BRL-CAD/libpng
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "netpbm/netpbm"]
|
||||
path = netpbm/netpbm
|
||||
url = https://github.com/BRL-CAD/netpbm
|
||||
branch = brlcad
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "regex/regex"]
|
||||
path = regex/regex
|
||||
url = https://github.com/BRL-CAD/regex
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[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"]
|
||||
path = stepcode/stepcode
|
||||
url = https://github.com/BRL-CAD/stepcode
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "sqlite3/sqlite3"]
|
||||
path = sqlite3/sqlite3
|
||||
url = https://github.com/BRL-CAD/sqlite3.git
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[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"]
|
||||
path = assetimport/assimp
|
||||
url = https://github.com/BRL-CAD/assimp
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "opencv/opencv"]
|
||||
path = opencv/opencv
|
||||
url = https://github.com/BRL-CAD/opencv
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
[submodule "openmesh/OpenMesh"]
|
||||
path = openmesh/OpenMesh
|
||||
url = https://github.com/BRL-CAD/OpenMesh
|
||||
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"]
|
||||
path = osmesa/osmesa
|
||||
url = https://github.com/BRL-CAD/osmesa
|
||||
ignore = dirty
|
||||
[submodule "utahrle/utahrle"]
|
||||
path = utahrle/utahrle
|
||||
url = https://github.com/BRL-CAD/utahrle
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "tk/tk"]
|
||||
path = tk/tk
|
||||
url = https://github.com/BRL-CAD/tk
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
[submodule "itcl3/itcl"]
|
||||
path = itcl/itcl
|
||||
url = https://github.com/BRL-CAD/itcl
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
[submodule "itk3/itk"]
|
||||
shallow = true
|
||||
[submodule "itk/itk"]
|
||||
path = itk/itk
|
||||
url = https://github.com/BRL-CAD/itk
|
||||
branch = RELEASE
|
||||
branch = main
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "iwidgets/iwidgets"]
|
||||
path = iwidgets/iwidgets
|
||||
url = https://github.com/BRL-CAD/iwidgets
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "tktable/tktable"]
|
||||
path = tktable/tktable
|
||||
url = https://github.com/BRL-CAD/tktable
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "tkhtml/tkhtml"]
|
||||
path = tkhtml/tkhtml
|
||||
url = https://github.com/BRL-CAD/tkhtml
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "qt/qt"]
|
||||
path = qt/qt
|
||||
url = https://github.com/BRL-CAD/qt
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "flexbison/bison"]
|
||||
path = flexbison/bison
|
||||
url = https://github.com/BRL-CAD/bison
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "flexbison/flex"]
|
||||
path = flexbison/flex
|
||||
url = https://github.com/BRL-CAD/flex
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "flexbison/winflexbison"]
|
||||
path = flexbison/winflexbison
|
||||
url = https://github.com/BRL-CAD/winflexbison
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "minizip-ng/minizip-ng"]
|
||||
path = minizip-ng/minizip-ng
|
||||
url = https://github.com/BRL-CAD/minizip-ng
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "lz4/lz4"]
|
||||
path = lz4/lz4
|
||||
url = https://github.com/BRL-CAD/lz4
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "deflate/libdeflate"]
|
||||
path = deflate/libdeflate
|
||||
url = https://github.com/BRL-CAD/libdeflate
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "fmt/fmt"]
|
||||
path = fmt/fmt
|
||||
url = https://github.com/BRL-CAD/fmt
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "yaml-cpp/yaml-cpp"]
|
||||
path = yaml-cpp/yaml-cpp
|
||||
url = https://github.com/BRL-CAD/yaml-cpp
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "pystring/pystring"]
|
||||
path = pystring/pystring
|
||||
url = https://github.com/BRL-CAD/pystring
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "expat/libexpat"]
|
||||
path = expat/libexpat
|
||||
url = https://github.com/BRL-CAD/libexpat
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "pugixml/pugixml"]
|
||||
path = pugixml/pugixml
|
||||
url = https://github.com/BRL-CAD/pugixml
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "xerces-c/xerces-c"]
|
||||
path = xerces-c/xerces-c
|
||||
url = https://github.com/BRL-CAD/xerces-c
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "icu/icu"]
|
||||
path = icu/icu
|
||||
url = https://github.com/BRL-CAD/icu
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[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"]
|
||||
path = llvm/llvm-project
|
||||
url = https://github.com/BRL-CAD/llvm-project
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "zstd/zstd"]
|
||||
path = zstd/zstd
|
||||
url = https://github.com/BRL-CAD/zstd
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "boost/boost"]
|
||||
path = boost/boost
|
||||
url = https://github.com/BRL-CAD/boost
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "openexr/openexr"]
|
||||
path = openexr/openexr
|
||||
url = https://github.com/BRL-CAD/openexr
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "opencolorio/OpenColorIO"]
|
||||
path = opencolorio/OpenColorIO
|
||||
url = https://github.com/BRL-CAD/OpenColorIO
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "openimageio/oiio"]
|
||||
path = openimageio/oiio
|
||||
url = https://github.com/BRL-CAD/oiio
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "osl/OpenShadingLanguage"]
|
||||
path = osl/OpenShadingLanguage
|
||||
url = https://github.com/BRL-CAD/OpenShadingLanguage
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "embree/embree"]
|
||||
path = embree/embree
|
||||
url = https://github.com/BRL-CAD/embree
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "rkcommon/rkcommon"]
|
||||
path = rkcommon/rkcommon
|
||||
url = https://github.com/BRL-CAD/rkcommon
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "ispc/ispc"]
|
||||
path = ispc/ispc
|
||||
url = https://github.com/BRL-CAD/ispc
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "ospray/ospray"]
|
||||
path = ospray/ospray
|
||||
url = https://github.com/BRL-CAD/ospray
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "ncurses/ncurses"]
|
||||
path = ncurses/ncurses
|
||||
url = https://github.com/BRL-CAD/ncurses
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "tcl/tcl"]
|
||||
path = tcl/tcl
|
||||
url = https://github.com/BRL-CAD/tcl.git
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "manifold/manifold"]
|
||||
path = manifold/manifold
|
||||
url = https://github.com/BRL-CAD/manifold.git
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "appleseed/appleseed"]
|
||||
path = appleseed/appleseed
|
||||
url = https://github.com/BRL-CAD/appleseed
|
||||
ignore = dirty
|
||||
[submodule "geogram/geogram"]
|
||||
path = geogram/geogram
|
||||
url = https://github.com/BRL-CAD/geogram.git
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "gte/GeometricTools"]
|
||||
path = gte/GeometricTools
|
||||
url = https://github.com/BRL-CAD/GeometricTools
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "mmesh/mmesh"]
|
||||
path = mmesh/mmesh
|
||||
url = https://github.com/BRL-CAD/mmesh.git
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[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
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "bullet/bullet3"]
|
||||
path = bullet/bullet3
|
||||
url = https://github.com/BRL-CAD/bullet3.git
|
||||
branch = RELEASE
|
||||
ignore = dirty
|
||||
shallow = true
|
||||
[submodule "oidn/oidn"]
|
||||
path = oidn/oidn
|
||||
url = https://github.com/BRL-CAD/oidn
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
set(bext_root "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
get_filename_component(bext_root "${bext_root}" ABSOLUTE)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/BextGit.cmake")
|
||||
|
||||
if (NOT DEFINED PROFILE)
|
||||
message(FATAL_ERROR "Set PROFILE to one of: auto, bundled, minimal, everything")
|
||||
endif (NOT DEFINED PROFILE)
|
||||
|
||||
string(TOLOWER "${PROFILE}" profile)
|
||||
set(active_groups)
|
||||
|
||||
if (profile STREQUAL "auto" OR profile STREQUAL "bundled")
|
||||
set(active_groups BRLCAD BRLCAD_EXTRA GDAL QT TCL)
|
||||
elseif (profile STREQUAL "minimal")
|
||||
set(active_groups BRLCAD)
|
||||
elseif (profile STREQUAL "everything")
|
||||
set(active_groups APPLESEED BRLCAD BRLCAD_EXTRA GDAL OSPRAY QT TCL)
|
||||
else ()
|
||||
message(FATAL_ERROR "Unknown PROFILE \"${PROFILE}\". Expected: auto, bundled, minimal, everything")
|
||||
endif ()
|
||||
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
if (NOT GIT_EXECUTABLE)
|
||||
message(FATAL_ERROR "Unable to find git executable required for bootstrap")
|
||||
endif (NOT GIT_EXECUTABLE)
|
||||
|
||||
file(STRINGS "${bext_root}/CMakeLists.txt" project_lines REGEX "add_project\\(")
|
||||
|
||||
set(project_paths)
|
||||
foreach(line ${project_lines})
|
||||
string(STRIP "${line}" stripped_line)
|
||||
if (stripped_line MATCHES "^#")
|
||||
continue()
|
||||
endif (stripped_line MATCHES "^#")
|
||||
|
||||
if (NOT stripped_line MATCHES "^add_project\\(([A-Za-z0-9_+.-]+)")
|
||||
continue()
|
||||
endif (NOT stripped_line MATCHES "^add_project\\(([A-Za-z0-9_+.-]+)")
|
||||
|
||||
set(project_name "${CMAKE_MATCH_1}")
|
||||
set(include_project FALSE)
|
||||
|
||||
if (stripped_line MATCHES "GROUPS \"([^\"]+)\"")
|
||||
set(project_groups "${CMAKE_MATCH_1}")
|
||||
string(REPLACE ";" ";" project_groups "${project_groups}")
|
||||
foreach(group ${project_groups})
|
||||
list(FIND active_groups "${group}" group_index)
|
||||
if (NOT group_index EQUAL -1)
|
||||
set(include_project TRUE)
|
||||
break()
|
||||
endif (NOT group_index EQUAL -1)
|
||||
endforeach(group ${project_groups})
|
||||
else ()
|
||||
set(include_project TRUE)
|
||||
endif ()
|
||||
|
||||
if (include_project)
|
||||
list(APPEND project_paths "${project_name}")
|
||||
endif (include_project)
|
||||
endforeach(line ${project_lines})
|
||||
|
||||
list(REMOVE_DUPLICATES project_paths)
|
||||
list(SORT project_paths)
|
||||
|
||||
string(REPLACE ";" ", " active_groups_str "${active_groups}")
|
||||
string(REPLACE ";" ", " project_paths_str "${project_paths}")
|
||||
|
||||
message(STATUS "bext bootstrap profile: ${profile}")
|
||||
message(STATUS "active USE_* groups: ${active_groups_str}")
|
||||
message(STATUS "project submodules: ${project_paths_str}")
|
||||
|
||||
if (LIST_ONLY)
|
||||
message(STATUS "LIST_ONLY is ON, skipping git submodule update")
|
||||
return()
|
||||
endif (LIST_ONLY)
|
||||
|
||||
bext_git_submodule_update("${bext_root}" --jobs 8 -- ${project_paths})
|
||||
|
||||
message(STATUS "Bootstrap complete for profile ${profile}")
|
||||
@@ -0,0 +1,220 @@
|
||||
# Derive bext dependency metadata from the existing build files. This module
|
||||
# deliberately does not introduce a manifest: CMakeLists.txt, per-project
|
||||
# .deps files, wrapper install settings, .gitmodules, and the Git index remain
|
||||
# the sources of truth.
|
||||
|
||||
function(_bext_inventory_key out value)
|
||||
string(TOUPPER "${value}" key)
|
||||
string(REGEX REPLACE "[^A-Z0-9]" "_" key "${key}")
|
||||
set(${out} "${key}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_inventory_set project field value)
|
||||
_bext_inventory_key(key "${project}")
|
||||
set_property(GLOBAL PROPERTY "BEXT_INVENTORY_${key}_${field}" "${value}")
|
||||
endfunction()
|
||||
|
||||
function(bext_inventory_get out project field)
|
||||
_bext_inventory_key(key "${project}")
|
||||
get_property(value GLOBAL PROPERTY "BEXT_INVENTORY_${key}_${field}")
|
||||
set(${out} "${value}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_inventory_submodule_lookup out_url out_sha source_dir path)
|
||||
get_property(entries GLOBAL PROPERTY BEXT_INVENTORY_SUBMODULES)
|
||||
foreach(entry ${entries})
|
||||
string(REPLACE "|" ";" parts "${entry}")
|
||||
list(GET parts 0 entry_path)
|
||||
if ("${entry_path}" STREQUAL "${path}")
|
||||
list(GET parts 1 entry_url)
|
||||
execute_process(
|
||||
COMMAND git ls-tree HEAD -- "${path}"
|
||||
WORKING_DIRECTORY "${source_dir}"
|
||||
RESULT_VARIABLE tree_result
|
||||
OUTPUT_VARIABLE tree_line
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if (NOT tree_result EQUAL 0 OR NOT tree_line MATCHES "^[0-9]+ commit ([0-9a-f]+)")
|
||||
message(FATAL_ERROR "Unable to read pinned commit for submodule ${path}")
|
||||
endif()
|
||||
set(${out_url} "${entry_url}" PARENT_SCOPE)
|
||||
set(${out_sha} "${CMAKE_MATCH_1}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
set(${out_url} "" PARENT_SCOPE)
|
||||
set(${out_sha} "" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(bext_collect_dependency_inventory source_dir)
|
||||
get_filename_component(source_dir "${source_dir}" ABSOLUTE)
|
||||
if (NOT EXISTS "${source_dir}/CMakeLists.txt" OR NOT EXISTS "${source_dir}/.gitmodules")
|
||||
message(FATAL_ERROR "${source_dir} is not a bext source tree")
|
||||
endif()
|
||||
|
||||
# Read submodule paths and URLs without requiring submodules to be populated.
|
||||
file(STRINGS "${source_dir}/.gitmodules" gitmodule_lines)
|
||||
set(submodules)
|
||||
set(current_path "")
|
||||
foreach(line ${gitmodule_lines})
|
||||
string(STRIP "${line}" line)
|
||||
if (line MATCHES "^path = (.+)$")
|
||||
set(current_path "${CMAKE_MATCH_1}")
|
||||
elseif(line MATCHES "^url = (.+)$" AND current_path)
|
||||
list(APPEND submodules "${current_path}|${CMAKE_MATCH_1}")
|
||||
set(current_path "")
|
||||
endif()
|
||||
endforeach()
|
||||
set_property(GLOBAL PROPERTY BEXT_INVENTORY_SUBMODULES "${submodules}")
|
||||
|
||||
file(STRINGS "${source_dir}/CMakeLists.txt" top_lines)
|
||||
set(projects)
|
||||
foreach(line ${top_lines})
|
||||
string(STRIP "${line}" stripped)
|
||||
if (stripped MATCHES "^#" OR NOT stripped MATCHES "^add_project\\(([^ )]+)")
|
||||
continue()
|
||||
endif()
|
||||
set(project "${CMAKE_MATCH_1}")
|
||||
list(APPEND projects "${project}")
|
||||
if (stripped MATCHES "GROUPS +\"([^\"]+)\"")
|
||||
set(groups "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
set(groups "always considered")
|
||||
endif()
|
||||
_bext_inventory_set("${project}" GROUPS "${groups}")
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES projects)
|
||||
|
||||
set(all_providers)
|
||||
foreach(project ${projects})
|
||||
set(wrapper "${source_dir}/${project}/CMakeLists.txt")
|
||||
if (NOT EXISTS "${wrapper}")
|
||||
message(FATAL_ERROR "Project ${project} has no wrapper CMakeLists.txt")
|
||||
endif()
|
||||
file(READ "${wrapper}" wrapper_text)
|
||||
|
||||
if (wrapper_text MATCHES "-DCMAKE_INSTALL_PREFIX=\\$\\{CMAKE_BUNDLE_INSTALL_PREFIX\\}" OR
|
||||
wrapper_text MATCHES "--prefix=\\$\\{CMAKE_BUNDLE_INSTALL_PREFIX\\}")
|
||||
set(output_class install)
|
||||
elseif(wrapper_text MATCHES "-DCMAKE_INSTALL_PREFIX=\\$\\{CMAKE_NOBUNDLE_INSTALL_PREFIX\\}" OR
|
||||
wrapper_text MATCHES "--prefix=\\$\\{CMAKE_NOBUNDLE_INSTALL_PREFIX\\}")
|
||||
set(output_class noinstall)
|
||||
elseif(wrapper_text MATCHES "CMAKE_BUNDLE_INSTALL_PREFIX" AND
|
||||
NOT wrapper_text MATCHES "CMAKE_NOBUNDLE_INSTALL_PREFIX")
|
||||
# Some custom build drivers (currently Tcl) receive the prefix through a
|
||||
# configured helper script rather than directly in ExternalProject_Add.
|
||||
set(output_class install)
|
||||
else()
|
||||
message(FATAL_ERROR "Cannot derive output class for ${project}")
|
||||
endif()
|
||||
_bext_inventory_set("${project}" OUTPUT "${output_class}")
|
||||
|
||||
if (wrapper_text MATCHES "DOC_LICENSE_DIR")
|
||||
set(has_license TRUE)
|
||||
else()
|
||||
set(has_license FALSE)
|
||||
endif()
|
||||
_bext_inventory_set("${project}" HAS_LICENSE "${has_license}")
|
||||
|
||||
set(deps)
|
||||
set(depfile "${source_dir}/${project}/${project}.deps")
|
||||
if (EXISTS "${depfile}")
|
||||
file(STRINGS "${depfile}" dep_lines)
|
||||
foreach(dep ${dep_lines})
|
||||
string(STRIP "${dep}" dep)
|
||||
if (dep AND NOT dep MATCHES "^#")
|
||||
string(TOLOWER "${dep}" dep)
|
||||
string(REPLACE "_" "-" dep "${dep}")
|
||||
list(APPEND deps "${dep}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
list(REMOVE_DUPLICATES deps)
|
||||
_bext_inventory_set("${project}" DEPS "${deps}")
|
||||
|
||||
set(paths)
|
||||
string(REGEX MATCHALL "git_submodule_init\\([A-Za-z0-9_+./-]+ +" init_calls "${wrapper_text}")
|
||||
foreach(call ${init_calls})
|
||||
string(REGEX REPLACE "git_submodule_init\\(([A-Za-z0-9_+./-]+) +" "\\1" path "${call}")
|
||||
list(APPEND paths "${project}/${path}")
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES paths)
|
||||
if (NOT paths)
|
||||
message(FATAL_ERROR "Project ${project} does not declare a source with git_submodule_init")
|
||||
endif()
|
||||
_bext_inventory_set("${project}" SUBMODULE_PATHS "${paths}")
|
||||
|
||||
set(urls)
|
||||
set(shas)
|
||||
foreach(path ${paths})
|
||||
_bext_inventory_submodule_lookup(url sha "${source_dir}" "${path}")
|
||||
if (NOT url)
|
||||
message(FATAL_ERROR "${project} uses ${path}, but it is absent from .gitmodules")
|
||||
endif()
|
||||
list(APPEND urls "${url}")
|
||||
list(APPEND shas "${sha}")
|
||||
endforeach()
|
||||
_bext_inventory_set("${project}" SOURCE_URLS "${urls}")
|
||||
_bext_inventory_set("${project}" SOURCE_SHAS "${shas}")
|
||||
|
||||
string(REGEX MATCHALL "ExternalProject_Add\\([A-Za-z0-9_+-]+_BLD" provider_calls "${wrapper_text}")
|
||||
foreach(call ${provider_calls})
|
||||
string(REGEX REPLACE "ExternalProject_Add\\(([A-Za-z0-9_+-]+)_BLD" "\\1" provider "${call}")
|
||||
string(TOLOWER "${provider}" provider)
|
||||
string(REPLACE "_" "-" provider "${provider}")
|
||||
list(APPEND all_providers "${provider}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES all_providers)
|
||||
|
||||
# Validate dependency references and topological consistency.
|
||||
foreach(project ${projects})
|
||||
bext_inventory_get(deps "${project}" DEPS)
|
||||
foreach(dep ${deps})
|
||||
list(FIND projects "${dep}" project_index)
|
||||
list(FIND all_providers "${dep}" provider_index)
|
||||
if (project_index EQUAL -1 AND provider_index EQUAL -1)
|
||||
message(FATAL_ERROR "${project}.deps references unknown dependency ${dep}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
set(resolved)
|
||||
set(remaining ${projects})
|
||||
while(remaining)
|
||||
set(progress FALSE)
|
||||
foreach(project ${remaining})
|
||||
bext_inventory_get(deps "${project}" DEPS)
|
||||
set(ready TRUE)
|
||||
foreach(dep ${deps})
|
||||
list(FIND projects "${dep}" dep_project_index)
|
||||
if (NOT dep_project_index EQUAL -1)
|
||||
list(FIND resolved "${dep}" resolved_index)
|
||||
if (resolved_index EQUAL -1)
|
||||
set(ready FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
if (ready)
|
||||
list(APPEND resolved "${project}")
|
||||
list(REMOVE_ITEM remaining "${project}")
|
||||
set(progress TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
if (NOT progress)
|
||||
message(FATAL_ERROR "Dependency cycle detected among: ${remaining}")
|
||||
endif()
|
||||
endwhile()
|
||||
|
||||
# Distributed outputs must install their legal notice alongside the bundle.
|
||||
foreach(project ${projects})
|
||||
bext_inventory_get(output_class "${project}" OUTPUT)
|
||||
bext_inventory_get(has_license "${project}" HAS_LICENSE)
|
||||
if (output_class STREQUAL "install" AND NOT has_license)
|
||||
message(FATAL_ERROR "Bundled project ${project} does not install a license via DOC_LICENSE_DIR")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(SORT projects)
|
||||
set(BEXT_INVENTORY_PROJECTS "${projects}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -0,0 +1,104 @@
|
||||
# Shared repository selection for configure-time and bootstrap submodule updates.
|
||||
# Keep .gitmodules canonical and scope all overrides to the Git process tree.
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(_BEXT_GIT_CANONICAL_ROOT "https://github.com/BRL-CAD")
|
||||
set(BEXT_REPOSITORY_ROOT "${_BEXT_GIT_CANONICAL_ROOT}" CACHE STRING
|
||||
"Repository URL or local mirror directory containing bext's dependency repositories")
|
||||
|
||||
function(bext_git_repository_root out_root out_local)
|
||||
set(root "${BEXT_REPOSITORY_ROOT}")
|
||||
set(local FALSE)
|
||||
if (root STREQUAL "")
|
||||
message(FATAL_ERROR "BEXT_REPOSITORY_ROOT must be a repository URL or local mirror directory")
|
||||
endif ()
|
||||
|
||||
# Check drive paths before URL schemes or scp-style SSH locations.
|
||||
if (root MATCHES "^file://")
|
||||
set(local TRUE)
|
||||
string(REPLACE "=" "%3D" root "${root}")
|
||||
elseif (root MATCHES "^[A-Za-z]:[/\\\\]" OR
|
||||
NOT (root MATCHES "^[A-Za-z][A-Za-z0-9+.-]*://" OR root MATCHES "^[^/]+:.+"))
|
||||
set(local TRUE)
|
||||
string(REPLACE "\\" "/" root "${root}")
|
||||
if (WIN32 OR NOT root MATCHES "^[A-Za-z]:/")
|
||||
get_filename_component(root "${root}" ABSOLUTE
|
||||
BASE_DIR "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/..")
|
||||
endif ()
|
||||
# Encode path characters with special meaning in a file URL. In
|
||||
# particular, a literal % in a native path must not become a URL escape.
|
||||
string(REPLACE "%" "%25" root "${root}")
|
||||
string(REPLACE " " "%20" root "${root}")
|
||||
string(REPLACE "#" "%23" root "${root}")
|
||||
string(REPLACE "?" "%3F" root "${root}")
|
||||
string(REPLACE "=" "%3D" root "${root}")
|
||||
if (root MATCHES "^[A-Za-z]:/")
|
||||
set(root "file:///${root}")
|
||||
elseif (root MATCHES "^//")
|
||||
set(root "file:${root}")
|
||||
else ()
|
||||
set(root "file://${root}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT root MATCHES "^file:///*$")
|
||||
string(REGEX REPLACE "/+$" "" root "${root}")
|
||||
string(APPEND root "/")
|
||||
else ()
|
||||
set(root "file:///")
|
||||
endif ()
|
||||
set(${out_root} "${root}" PARENT_SCOPE)
|
||||
set(${out_local} "${local}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(bext_git_submodule_update working_directory)
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
if (NOT GIT_EXECUTABLE)
|
||||
message(FATAL_ERROR "Need to populate Git submodules, but unable to find git executable")
|
||||
endif ()
|
||||
|
||||
bext_git_repository_root(root local)
|
||||
set(git_command "${GIT_EXECUTABLE}")
|
||||
if (WIN32)
|
||||
list(APPEND git_command -c core.longpaths=true)
|
||||
endif ()
|
||||
if (NOT root STREQUAL "${_BEXT_GIT_CANONICAL_ROOT}/")
|
||||
list(APPEND git_command -c "url.${root}.insteadOf=${_BEXT_GIT_CANONICAL_ROOT}/")
|
||||
endif ()
|
||||
|
||||
set(shallow_args)
|
||||
if (local)
|
||||
list(APPEND git_command -c protocol.file.allow=always)
|
||||
# The environment restriction also reaches recursive Git processes and
|
||||
# overrides any protocol permissions in the user's Git configuration.
|
||||
list(PREPEND git_command "${CMAKE_COMMAND}" -E env GIT_ALLOW_PROTOCOL=file --)
|
||||
list(APPEND shallow_args --no-recommend-shallow)
|
||||
elseif (GIT_SHALLOW_CLONE)
|
||||
list(APPEND shallow_args --recommend-shallow)
|
||||
endif ()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${git_command} submodule update --init --recursive ${shallow_args} ${ARGN}
|
||||
WORKING_DIRECTORY "${working_directory}"
|
||||
RESULT_VARIABLE git_result
|
||||
)
|
||||
if (NOT git_result STREQUAL "0")
|
||||
set(local_note "")
|
||||
if (local)
|
||||
set(local_note " Only file transport is permitted; all required repositories and pinned commits must be available locally, including recursive submodules.")
|
||||
endif ()
|
||||
message(WARNING
|
||||
"Git submodule update failed in ${working_directory} using BEXT_REPOSITORY_ROOT=${BEXT_REPOSITORY_ROOT} (${git_result}).${local_note}")
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
bext_git_repository_root(_bext_git_root _bext_git_local)
|
||||
message(STATUS "bext repository root: ${_bext_git_root}")
|
||||
if (_bext_git_local)
|
||||
message(STATUS "bext Git updates: file transport only, shallow recommendations disabled")
|
||||
if (GIT_SHALLOW_CLONE)
|
||||
message(STATUS "Ignoring GIT_SHALLOW_CLONE for the local repository mirror")
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_bext_git_root)
|
||||
unset(_bext_git_local)
|
||||
@@ -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}")
|
||||
@@ -1,112 +0,0 @@
|
||||
# Find Geogram
|
||||
# ------------
|
||||
#
|
||||
# Find Geogram include dirs and libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# Geogram_FOUND - True if geogram has been found.
|
||||
# Geogram::geogram - Imported target for the main Geogram library.
|
||||
# Geogram::geogram_gfx - Imported target for Geogram graphics library.
|
||||
#
|
||||
# This module reads hints about the Geogram location from the following
|
||||
# environment variables:
|
||||
#
|
||||
# Geogram_INSTALL_PREFIX - Directory where Geogram is installed.
|
||||
#
|
||||
# Authors: Jeremie Dumas
|
||||
# Pierre Moulon
|
||||
# Bruno Levy
|
||||
|
||||
set (Geogram_SEARCH_PATHS
|
||||
"${Geogram_ROOT}"
|
||||
${Geogram_INSTALL_PREFIX}
|
||||
"$ENV{Geogram_INSTALL_PREFIX}"
|
||||
"/usr/local/"
|
||||
"$ENV{PROGRAMFILES}/Geogram"
|
||||
"$ENV{PROGRAMW6432}/Geogram"
|
||||
)
|
||||
|
||||
set (Geogram_SEARCH_PATHS_SYSTEM
|
||||
"/usr/lib"
|
||||
"/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
find_path (Geogram_INCLUDE_DIR
|
||||
geogram/basic/common.h
|
||||
PATHS ${Geogram_SEARCH_PATHS}
|
||||
PATH_SUFFIXES include/geogram1
|
||||
)
|
||||
|
||||
find_library (Geogram_LIBRARY
|
||||
NAMES geogram
|
||||
PATHS ${Geogram_SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
find_library (Geogram_GFX_LIBRARY
|
||||
NAMES geogram_gfx
|
||||
PATHS ${Geogram_SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
# This one we search in both Geogram search path and
|
||||
# system search path since it may be already installed
|
||||
# in the system
|
||||
find_library (Geogram_GLFW3_LIBRARY
|
||||
NAMES glfw3 glfw geogram_glfw3 glfw3dll glfwdll
|
||||
PATHS ${Geogram_SEARCH_PATHS} ${Geogram_SEARCH_PATHS_SYSTEM}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
Geogram DEFAULT_MSG Geogram_LIBRARY Geogram_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# Create an imported target for Geogram
|
||||
If (Geogram_FOUND)
|
||||
|
||||
set(Geogram_INSTALL_PREFIX ${Geogram_INCLUDE_DIR}/../..)
|
||||
|
||||
if (NOT TARGET Geogram::geogram)
|
||||
add_library (Geogram::geogram UNKNOWN IMPORTED)
|
||||
|
||||
# Interface include directory
|
||||
set_target_Properties(Geogram::geogram PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Geogram_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
# Link to library file
|
||||
Set_Target_Properties(Geogram::geogram PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${Geogram_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (NOT TARGET Geogram::geogram_gfx)
|
||||
add_library (Geogram::geogram_gfx UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Geogram::geogram_gfx PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES ${Geogram_GLFW3_LIBRARY}
|
||||
)
|
||||
|
||||
# Interface include directory
|
||||
set_target_properties(Geogram::geogram_gfx PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Geogram_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
# Link to library file
|
||||
set_target_properties(Geogram::geogram_gfx PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${Geogram_GFX_LIBRARY}"
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
|
||||
endif ()
|
||||
|
||||
# Hide variables from the default CMake-Gui options
|
||||
mark_as_advanced (Geogram_LIBRARY Geogram_GFX_LIBRARY Geogram_INCLUDE_DIR)
|
||||
|
||||
@@ -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
|
||||
@@ -107,6 +107,29 @@ endif (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
|
||||
|
||||
mark_as_advanced(LEMON_TEMPLATE)
|
||||
|
||||
# Verify lemon supports %realloc and %free directives (BRL-CAD extensions).
|
||||
# System lemon (from SQLite) does not support these, but stepcode requires them.
|
||||
if(LEMON_EXECUTABLE AND LEMON_TEMPLATE)
|
||||
set(_lemon_test_dir "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lemon_test")
|
||||
file(MAKE_DIRECTORY "${_lemon_test_dir}")
|
||||
file(WRITE "${_lemon_test_dir}/test.y"
|
||||
"%token_type {int}\n%realloc realloc\n%free free\n%start_symbol start\nstart ::= .\n")
|
||||
execute_process(
|
||||
COMMAND ${LEMON_EXECUTABLE} -T${LEMON_TEMPLATE} -q test.y
|
||||
WORKING_DIRECTORY "${_lemon_test_dir}"
|
||||
RESULT_VARIABLE _lemon_test_result
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
)
|
||||
if(NOT _lemon_test_result EQUAL 0)
|
||||
message(STATUS "Found lemon at ${LEMON_EXECUTABLE} but it lacks %realloc/%free support")
|
||||
set(LEMON_EXECUTABLE "LEMON_EXECUTABLE-NOTFOUND" CACHE FILEPATH "Path to lemon" FORCE)
|
||||
set(LEMON_TEMPLATE "LEMON_TEMPLATE-NOTFOUND" CACHE FILEPATH "Path to lempar.c" FORCE)
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${_lemon_test_dir}")
|
||||
unset(_lemon_test_dir)
|
||||
unset(_lemon_test_result)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LEMON DEFAULT_MSG LEMON_EXECUTABLE LEMON_TEMPLATE)
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ if(LMDB_ROOT)
|
||||
list(APPEND _LMDB_SEARCHES _LMDB_SEARCH_ROOT)
|
||||
endif()
|
||||
|
||||
# Fall back to default system paths
|
||||
set(_LMDB_SEARCH_NORMAL)
|
||||
list(APPEND _LMDB_SEARCHES _LMDB_SEARCH_NORMAL)
|
||||
|
||||
set(LMDB_NAMES lmdb lmdbd)
|
||||
|
||||
# Try each search configuration.
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
#
|
||||
# Try to find OPENMESH
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENMESH_FOUND - system has OPENMESH
|
||||
# OPENMESH_INCLUDE_DIRS - the OPENMESH include directories
|
||||
# OPENMESH_LIBRARIES - Link these to use OPENMESH
|
||||
###
|
||||
# - helpful cmake flags when building
|
||||
#
|
||||
# OPENMESH_ROOT - path to OpenMesh root if it is built outside of the usual location
|
||||
#
|
||||
#=============================================================================
|
||||
#
|
||||
# Copyright 2015 Computer Graphics Group, RWTH Aachen University
|
||||
# Authors: Jan Möbius <moebius@cs.rwth-aachen.de>
|
||||
# Hans-Christian Ebke <ebke@cs.rwth-aachen.de>
|
||||
#
|
||||
#
|
||||
#===========================================================================
|
||||
#
|
||||
# OpenMesh
|
||||
# Copyright (c) 2001-2015, RWTH-Aachen University
|
||||
# Department of Computer Graphics and Multimedia
|
||||
# All rights reserved.
|
||||
# www.openmesh.org
|
||||
#
|
||||
#---------------------------------------------------------------------------
|
||||
# This file is part of OpenMesh.
|
||||
#---------------------------------------------------------------------------
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
#===========================================================================
|
||||
|
||||
#if already found via finder or simulated finder in openmesh CMakeLists.txt, skip the search
|
||||
IF (NOT OPENMESH_FOUND)
|
||||
SET (SEARCH_PATHS
|
||||
"${OPENMESH_ROOT}"
|
||||
/usr/local/
|
||||
/usr/
|
||||
"${CMAKE_SOURCE_DIR}/OpenMesh/src/OpenMesh"
|
||||
"${CMAKE_SOURCE_DIR}/libs_required/OpenMesh/src/OpenMesh"
|
||||
"${CMAKE_SOURCE_DIR}/../OpenMesh/src/OpenMesh"
|
||||
"C:/Program Files/OpenMesh 8.1"
|
||||
"C:/Program Files/OpenMesh 8.0"
|
||||
"C:/Program Files/OpenMesh 7.2"
|
||||
"C:/Program Files/OpenMesh 7.1"
|
||||
"C:/Program Files/OpenMesh 7.0"
|
||||
"C:/Program Files/OpenMesh 6.3"
|
||||
"C:/Program Files/OpenMesh 6.2"
|
||||
"C:/Program Files/OpenMesh 6.1"
|
||||
"C:/Program Files/OpenMesh 6.0"
|
||||
"C:/Program Files/OpenMesh 5.2"
|
||||
"C:/Program Files/OpenMesh 5.1"
|
||||
"C:/Program Files/OpenMesh 5.0"
|
||||
"C:/Program Files/OpenMesh 4.2"
|
||||
"C:/Program Files/OpenMesh 4.1"
|
||||
"C:/Program Files/OpenMesh 4.0"
|
||||
"C:/Program Files/OpenMesh 3.4"
|
||||
"C:/Program Files/OpenMesh 3.3"
|
||||
"C:/Program Files/OpenMesh 3.2"
|
||||
"C:/Program Files/OpenMesh 3.1"
|
||||
"C:/Program Files/OpenMesh 3.0"
|
||||
"C:/Program Files/OpenMesh 2.4.1"
|
||||
"C:/Program Files/OpenMesh 2.4"
|
||||
"C:/Program Files/OpenMesh 2.0/include"
|
||||
"C:/libs/OpenMesh 8.1"
|
||||
"C:/libs/OpenMesh 8.0"
|
||||
"C:/libs/OpenMesh 7.1"
|
||||
"C:/libs/OpenMesh 7.0"
|
||||
"C:/libs/OpenMesh 6.3"
|
||||
"C:/libs/OpenMesh 6.2"
|
||||
"C:/libs/OpenMesh 6.1"
|
||||
"C:/libs/OpenMesh 6.0"
|
||||
"C:/libs/OpenMesh 5.2"
|
||||
"C:/libs/OpenMesh 5.1"
|
||||
"C:/libs/OpenMesh 5.0"
|
||||
"C:/libs/OpenMesh 4.2"
|
||||
"C:/libs/OpenMesh 4.1"
|
||||
"C:/libs/OpenMesh 4.0"
|
||||
"C:/libs/OpenMesh 3.4"
|
||||
"C:/libs/OpenMesh 3.3"
|
||||
"C:/libs/OpenMesh 3.2"
|
||||
"C:/libs/OpenMesh 3.1"
|
||||
"C:/libs/OpenMesh 3.0"
|
||||
"C:/libs/OpenMesh 2.4.1"
|
||||
"C:/libs/OpenMesh 2.4"
|
||||
"${OPENMESH_LIBRARY_DIR}"
|
||||
)
|
||||
|
||||
FIND_PATH (OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh
|
||||
PATHS ${SEARCH_PATHS}
|
||||
PATH_SUFFIXES include)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_CORE_LIBRARY_RELEASE NAMES OpenMeshCore
|
||||
PATHS ${SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_CORE_LIBRARY_DEBUG NAMES OpenMeshCored
|
||||
PATHS ${SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_TOOLS_LIBRARY_RELEASE NAMES OpenMeshTools
|
||||
PATHS ${SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_TOOLS_LIBRARY_DEBUG NAMES OpenMeshToolsd
|
||||
PATHS ${SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
#select configuration depending on platform (optimized... on windows)
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations( OPENMESH_TOOLS )
|
||||
select_library_configurations( OPENMESH_CORE )
|
||||
|
||||
set(OPENMESH_LIBRARIES ${OPENMESH_CORE_LIBRARY} ${OPENMESH_TOOLS_LIBRARY} CACHE STRING "OpenMesh Core and Tools libraries" FORCE)
|
||||
set(OPENMESH_INCLUDE_DIRS ${OPENMESH_INCLUDE_DIR} CACHE STRING "OpenMesh include directory" FORCE)
|
||||
|
||||
#checks, if OPENMESH was found and sets OPENMESH_FOUND if so
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenMesh DEFAULT_MSG
|
||||
OPENMESH_CORE_LIBRARY OPENMESH_TOOLS_LIBRARY OPENMESH_INCLUDE_DIR)
|
||||
|
||||
|
||||
mark_as_advanced(OPENMESH_INCLUDE_DIR OPENMESH_CORE_LIBRARY_RELEASE OPENMESH_CORE_LIBRARY_DEBUG OPENMESH_TOOLS_LIBRARY_RELEASE OPENMESH_TOOLS_LIBRARY_DEBUG)
|
||||
endif()
|
||||
@@ -55,6 +55,10 @@ find_package(ZLIB ${_FIND_ZLIB_ARG})
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
set(_PNG_SEARCHES)
|
||||
if(APPLE)
|
||||
set(_PNG_CMAKE_FIND_FRAMEWORK "${CMAKE_FIND_FRAMEWORK}")
|
||||
set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
endif()
|
||||
|
||||
# Search PNG_ROOT first if it is set.
|
||||
if(PNG_ROOT)
|
||||
@@ -107,6 +111,10 @@ if(ZLIB_FOUND)
|
||||
select_library_configurations(PNG)
|
||||
mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(CMAKE_FIND_FRAMEWORK "${_PNG_CMAKE_FIND_FRAMEWORK}")
|
||||
unset(_PNG_CMAKE_FIND_FRAMEWORK)
|
||||
endif()
|
||||
unset(PNG_NAMES)
|
||||
unset(PNG_NAMES_DEBUG)
|
||||
|
||||
@@ -136,6 +144,7 @@ if(ZLIB_FOUND)
|
||||
if(NOT TARGET PNG::PNG)
|
||||
add_library(PNG::PNG UNKNOWN IMPORTED)
|
||||
set_target_properties(PNG::PNG PROPERTIES
|
||||
IMPORTED_NO_SYSTEM TRUE
|
||||
INTERFACE_COMPILE_DEFINITIONS "${_PNG_COMPILE_DEFINITIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PNG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
||||
|
||||
@@ -42,6 +42,10 @@ if(SQLite3_ROOT)
|
||||
list(APPEND _SQLite3_SEARCHES _SQLite3_SEARCH_ROOT)
|
||||
endif()
|
||||
|
||||
# Fall back to default system paths
|
||||
set(_SQLite3_SEARCH_NORMAL)
|
||||
list(APPEND _SQLite3_SEARCHES _SQLite3_SEARCH_NORMAL)
|
||||
|
||||
set(SQLite3_NAMES sqlite3 sqlite libsqlite3 libsqlite)
|
||||
|
||||
# Try each search configuration.
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindUTAHRLE
|
||||
--------
|
||||
|
||||
Find the native UTAHRLE includes and library.
|
||||
|
||||
IMPORTED Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines :prop_tgt:`IMPORTED` target ``UTAHRLE::UTAHRLE``, if
|
||||
UTAHRLE has been found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
::
|
||||
|
||||
UTAHRLE_INCLUDE_DIRS - where to find pam.h, etc.
|
||||
UTAHRLE_LIBRARIES - List of libraries when using utahrle.
|
||||
UTAHRLE_FOUND - True if utahrle found.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
A user may set ``UTAHRLE_ROOT`` to a utahrle installation root to tell this
|
||||
module where to look.
|
||||
#]=======================================================================]
|
||||
|
||||
set(_UTAHRLE_SEARCHES)
|
||||
|
||||
# Search UTAHRLE_ROOT first if it is set.
|
||||
if(UTAHRLE_ROOT)
|
||||
set(_UTAHRLE_SEARCH_ROOT PATHS ${UTAHRLE_ROOT} NO_DEFAULT_PATH)
|
||||
list(APPEND _UTAHRLE_SEARCHES _UTAHRLE_SEARCH_ROOT)
|
||||
endif()
|
||||
|
||||
# Normal search.
|
||||
set(_UTAHRLE_x86 "(x86)")
|
||||
set(_UTAHRLE_SEARCH_NORMAL
|
||||
PATHS "$ENV{ProgramFiles}/utahrle"
|
||||
"$ENV{ProgramFiles${_UTAHRLE_x86}}/utahrle")
|
||||
unset(_UTAHRLE_x86)
|
||||
list(APPEND _UTAHRLE_SEARCHES _UTAHRLE_SEARCH_NORMAL)
|
||||
|
||||
set(UTAHRLE_NAMES utahrle)
|
||||
|
||||
# Try each search configuration.
|
||||
foreach(search ${_UTAHRLE_SEARCHES})
|
||||
find_path(UTAHRLE_INCLUDE_DIR NAMES rle.h ${${search}} PATH_SUFFIXES include include/utahrle)
|
||||
endforeach()
|
||||
|
||||
# Allow UTAHRLE_LIBRARY to be set manually, as the location of the utahrle library
|
||||
if(NOT UTAHRLE_LIBRARY)
|
||||
foreach(search ${_UTAHRLE_SEARCHES})
|
||||
find_library(UTAHRLE_LIBRARY NAMES ${UTAHRLE_NAMES} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
unset(UTAHRLE_NAMES)
|
||||
|
||||
mark_as_advanced(UTAHRLE_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UTAHRLE REQUIRED_VARS UTAHRLE_LIBRARY UTAHRLE_INCLUDE_DIR)
|
||||
|
||||
if(UTAHRLE_FOUND)
|
||||
set(UTAHRLE_INCLUDE_DIRS ${UTAHRLE_INCLUDE_DIR})
|
||||
|
||||
if(NOT UTAHRLE_LIBRARIES)
|
||||
set(UTAHRLE_LIBRARIES ${UTAHRLE_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(NOT TARGET UTAHRLE::UTAHRLE)
|
||||
add_library(UTAHRLE::UTAHRLE UNKNOWN IMPORTED)
|
||||
set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${UTAHRLE_INCLUDE_DIRS}")
|
||||
|
||||
if(UTAHRLE_LIBRARY_RELEASE)
|
||||
set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${UTAHRLE_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
if(UTAHRLE_LIBRARY_DEBUG)
|
||||
set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${UTAHRLE_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
|
||||
if(NOT UTAHRLE_LIBRARY_RELEASE AND NOT UTAHRLE_LIBRARY_DEBUG)
|
||||
set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${UTAHRLE_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
+489
-90
@@ -1,123 +1,522 @@
|
||||
#.rst:
|
||||
# FindZLIB
|
||||
# --------
|
||||
# Distributed under the OSI-approved BSD 3-Clause License.
|
||||
# See CMake's LICENSE.rst or https://cmake.org/licensing for details.
|
||||
#
|
||||
# Find the native ZLIB includes and library.
|
||||
# BRL-CAD local variant:
|
||||
# - Based on the modern CMake FindZLIB module structure.
|
||||
# - Preserves BRL-CAD's custom zlib library names, including z_brl.
|
||||
# - Honors ZLIB_ROOT and ENV{ZLIB_ROOT} as installation-root hints.
|
||||
# - Keeps the traditional ZLIB::ZLIB target.
|
||||
# - Adds optional variant targets when they can be found:
|
||||
# ZLIB::ZLIB_SHARED
|
||||
# ZLIB::ZLIB_STATIC
|
||||
# ZLIB::ZLIBSTATIC (alias-compatible with upstream zlib's config package)
|
||||
#
|
||||
# IMPORTED Targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
# ZLIB has been found.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
# ZLIB_FOUND - True if zlib found.
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
# ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
# ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
# ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
# ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
#
|
||||
# Backward Compatibility
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following variable are provided for backward compatibility
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
# ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
# ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
#
|
||||
# Hints
|
||||
# ^^^^^
|
||||
#
|
||||
# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
# module where to look.
|
||||
#[=======================================================================[.rst:
|
||||
FindZLIB
|
||||
--------
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
Finds the native zlib data compression library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module provides the following imported targets, when found:
|
||||
|
||||
``ZLIB::ZLIB``
|
||||
Compatibility/default target that encapsulates the selected zlib usage
|
||||
requirements. Selection follows ``ZLIB_USE_STATIC_LIBS`` when set.
|
||||
|
||||
``ZLIB::ZLIB_SHARED``
|
||||
Shared zlib target, when a shared zlib library can be identified.
|
||||
|
||||
``ZLIB::ZLIB_STATIC``
|
||||
Static zlib target, when a static zlib library can be identified.
|
||||
|
||||
``ZLIB::ZLIBSTATIC``
|
||||
Alias to ``ZLIB::ZLIB_STATIC`` when the static target is available. This
|
||||
matches the target name used by zlib's own CMake package.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``ZLIB_FOUND``
|
||||
Boolean indicating whether zlib was found.
|
||||
|
||||
``ZLIB_VERSION``
|
||||
The version of zlib found.
|
||||
|
||||
``ZLIB_INCLUDE_DIRS``
|
||||
Include directories containing ``zlib.h`` and other headers needed to use
|
||||
zlib.
|
||||
|
||||
``ZLIB_LIBRARIES``
|
||||
List of libraries needed to link to the default/selected zlib.
|
||||
|
||||
``ZLIB_SHARED_FOUND``
|
||||
Boolean indicating whether a shared zlib library was found.
|
||||
|
||||
``ZLIB_STATIC_FOUND``
|
||||
Boolean indicating whether a static zlib library was found.
|
||||
|
||||
``ZLIB_SHARED_LIBRARIES``
|
||||
Shared zlib library or debug/optimized library list, when found.
|
||||
|
||||
``ZLIB_STATIC_LIBRARIES``
|
||||
Static zlib library or debug/optimized library list, when found.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
``ZLIB_ROOT``
|
||||
A user may set this variable to a zlib installation root.
|
||||
|
||||
``ENV{ZLIB_ROOT}``
|
||||
Environment-variable form of ``ZLIB_ROOT``.
|
||||
|
||||
``ZLIB_USE_STATIC_LIBS``
|
||||
Set to ``ON`` before calling ``find_package(ZLIB)`` to prefer static
|
||||
libraries for the compatibility/default ``ZLIB::ZLIB`` target.
|
||||
|
||||
``ZLIB_NAMES`` and ``ZLIB_NAMES_DEBUG``
|
||||
Optional project override for the default selected-library search names.
|
||||
|
||||
``ZLIB_SHARED_NAMES`` and ``ZLIB_SHARED_NAMES_DEBUG``
|
||||
Optional project override for shared-library search names.
|
||||
|
||||
``ZLIB_STATIC_NAMES`` and ``ZLIB_STATIC_NAMES_DEBUG``
|
||||
Optional project override for static-library search names.
|
||||
|
||||
The default name lists include BRL-CAD's custom ``z_brl`` name.
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_policy(PUSH)
|
||||
if(POLICY CMP0159)
|
||||
cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n>
|
||||
endif()
|
||||
|
||||
set(_ZLIB_SEARCHES)
|
||||
|
||||
# Search ZLIB_ROOT first if it is set.
|
||||
# Search ZLIB_ROOT first if it is set. Support both a CMake variable and
|
||||
# an environment variable for command-line and packaged-build workflows.
|
||||
if(ZLIB_ROOT)
|
||||
set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
set(_ZLIB_SEARCH_ROOT PATHS "${ZLIB_ROOT}" NO_DEFAULT_PATH)
|
||||
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
elseif(DEFINED ENV{ZLIB_ROOT} AND NOT "$ENV{ZLIB_ROOT}" STREQUAL "")
|
||||
set(_ZLIB_SEARCH_ROOT PATHS "$ENV{ZLIB_ROOT}" NO_DEFAULT_PATH)
|
||||
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
endif()
|
||||
|
||||
# Normal search.
|
||||
set(_ZLIB_x86 "(x86)")
|
||||
set(_ZLIB_SEARCH_NORMAL
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
"$ENV{PROGRAMFILES}/zlib"
|
||||
)
|
||||
PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
"$ENV{ProgramFiles}/zlib"
|
||||
"$ENV{ProgramFiles${_ZLIB_x86}}/zlib"
|
||||
)
|
||||
unset(_ZLIB_x86)
|
||||
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
|
||||
set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1)
|
||||
# BRL-CAD uses z_brl for its bundled zlib. Keep that name first so an
|
||||
# explicitly supplied root or local prefix finds the BRL-CAD build before a
|
||||
# generic system zlib.
|
||||
set(_ZLIB_DEFAULT_SHARED_NAMES
|
||||
z_brl
|
||||
z
|
||||
zlib
|
||||
zdll
|
||||
zlib1
|
||||
zlibstatic
|
||||
zlibwapi
|
||||
zlibvc
|
||||
zlibstat
|
||||
)
|
||||
set(_ZLIB_DEFAULT_SHARED_NAMES_DEBUG
|
||||
z_brld
|
||||
zd
|
||||
zlibd
|
||||
zdlld
|
||||
zlibd1
|
||||
zlib1d
|
||||
zlibstaticd
|
||||
zlibwapid
|
||||
zlibvcd
|
||||
zlibstatd
|
||||
)
|
||||
|
||||
set(_ZLIB_DEFAULT_STATIC_NAMES
|
||||
# On Windows the import library for the shared zlib and the static library
|
||||
# share the .lib suffix, so the static name must come first and be distinct
|
||||
# from the shared import lib (z_brl.lib) or find_library would pick the import
|
||||
# lib and keep the z_brl.dll runtime dependency. BRL-CAD's static zlib is
|
||||
# z_brl-static.lib.
|
||||
z_brl-static
|
||||
z_brl
|
||||
z_brl_static
|
||||
z_brlstatic
|
||||
zs
|
||||
zlibstatic
|
||||
zlibstat
|
||||
zlib
|
||||
z
|
||||
)
|
||||
set(_ZLIB_DEFAULT_STATIC_NAMES_DEBUG
|
||||
z_brld
|
||||
z_brld_static
|
||||
z_brldstatic
|
||||
zsd
|
||||
zlibstaticd
|
||||
zlibstatd
|
||||
zlibd
|
||||
zd
|
||||
)
|
||||
|
||||
if(NOT ZLIB_SHARED_NAMES)
|
||||
set(ZLIB_SHARED_NAMES ${_ZLIB_DEFAULT_SHARED_NAMES})
|
||||
endif()
|
||||
if(NOT ZLIB_SHARED_NAMES_DEBUG)
|
||||
set(ZLIB_SHARED_NAMES_DEBUG ${_ZLIB_DEFAULT_SHARED_NAMES_DEBUG})
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_STATIC_NAMES)
|
||||
set(ZLIB_STATIC_NAMES ${_ZLIB_DEFAULT_STATIC_NAMES})
|
||||
endif()
|
||||
if(NOT ZLIB_STATIC_NAMES_DEBUG)
|
||||
set(ZLIB_STATIC_NAMES_DEBUG ${_ZLIB_DEFAULT_STATIC_NAMES_DEBUG})
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_NAMES)
|
||||
if(ZLIB_USE_STATIC_LIBS)
|
||||
set(ZLIB_NAMES ${ZLIB_STATIC_NAMES})
|
||||
else()
|
||||
set(ZLIB_NAMES ${ZLIB_SHARED_NAMES})
|
||||
endif()
|
||||
endif()
|
||||
if(NOT ZLIB_NAMES_DEBUG)
|
||||
if(ZLIB_USE_STATIC_LIBS)
|
||||
set(ZLIB_NAMES_DEBUG ${ZLIB_STATIC_NAMES_DEBUG})
|
||||
else()
|
||||
set(ZLIB_NAMES_DEBUG ${ZLIB_SHARED_NAMES_DEBUG})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Try each search configuration.
|
||||
foreach(search ${_ZLIB_SEARCHES})
|
||||
find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
|
||||
find_path(ZLIB_INCLUDE_DIR
|
||||
NAMES zlib.h
|
||||
${${search}}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
endforeach()
|
||||
|
||||
mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
function(_zlib_save_find_library_state)
|
||||
foreach(v CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||
if(DEFINED ${v})
|
||||
set(_zlib_ORIG_${v} "${${v}}" PARENT_SCOPE)
|
||||
set(_zlib_HAD_${v} TRUE PARENT_SCOPE)
|
||||
else()
|
||||
set(_zlib_ORIG_${v} PARENT_SCOPE)
|
||||
set(_zlib_HAD_${v} FALSE PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
macro(_zlib_restore_find_library_state)
|
||||
foreach(v CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||
if(_zlib_HAD_${v})
|
||||
set(${v} "${_zlib_ORIG_${v}}")
|
||||
else()
|
||||
unset(${v})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
function(_zlib_find_variant prefix libtype)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs NAMES NAMES_DEBUG)
|
||||
cmake_parse_arguments(_ZLIB_FIND "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
_zlib_save_find_library_state()
|
||||
|
||||
# Support the MinGW/win32 Makefile.gcc build style.
|
||||
if(WIN32)
|
||||
list(APPEND CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
|
||||
endif()
|
||||
|
||||
if(libtype STREQUAL "STATIC")
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
elseif(libtype STREQUAL "SHARED")
|
||||
if(WIN32)
|
||||
# On Windows, shared zlib is normally discovered through an import
|
||||
# library. Distinguishing a .lib import library from a static .lib is
|
||||
# not reliable by suffix alone, so the name list does most of the work.
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll.a .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
elseif(APPLE)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
elseif(UNIX)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .so ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
foreach(search ${_ZLIB_SEARCHES})
|
||||
find_library(${prefix}_LIBRARY_RELEASE
|
||||
NAMES ${_ZLIB_FIND_NAMES}
|
||||
NAMES_PER_DIR
|
||||
${${search}}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
find_library(${prefix}_LIBRARY_DEBUG
|
||||
NAMES ${_ZLIB_FIND_NAMES_DEBUG}
|
||||
NAMES_PER_DIR
|
||||
${${search}}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
endforeach()
|
||||
|
||||
_zlib_restore_find_library_state()
|
||||
|
||||
set(${prefix}_LIBRARY_RELEASE "${${prefix}_LIBRARY_RELEASE}" PARENT_SCOPE)
|
||||
set(${prefix}_LIBRARY_DEBUG "${${prefix}_LIBRARY_DEBUG}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Main/default search. Preserve CMake's behavior of allowing ZLIB_LIBRARY to
|
||||
# be set manually as the selected library.
|
||||
if(NOT ZLIB_LIBRARY)
|
||||
_zlib_find_variant(ZLIB UNKNOWN
|
||||
NAMES ${ZLIB_NAMES}
|
||||
NAMES_DEBUG ${ZLIB_NAMES_DEBUG}
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ZLIB)
|
||||
endif()
|
||||
|
||||
# Variant searches. These do not override the selected/default ZLIB_LIBRARY.
|
||||
if(NOT ZLIB_SHARED_LIBRARY)
|
||||
_zlib_find_variant(ZLIB_SHARED SHARED
|
||||
NAMES ${ZLIB_SHARED_NAMES}
|
||||
NAMES_DEBUG ${ZLIB_SHARED_NAMES_DEBUG}
|
||||
)
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ZLIB_SHARED)
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_STATIC_LIBRARY)
|
||||
_zlib_find_variant(ZLIB_STATIC STATIC
|
||||
NAMES ${ZLIB_STATIC_NAMES}
|
||||
NAMES_DEBUG ${ZLIB_STATIC_NAMES_DEBUG}
|
||||
)
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ZLIB_STATIC)
|
||||
endif()
|
||||
|
||||
unset(ZLIB_NAMES)
|
||||
unset(ZLIB_NAMES_DEBUG)
|
||||
unset(_ZLIB_DEFAULT_SHARED_NAMES)
|
||||
unset(_ZLIB_DEFAULT_SHARED_NAMES_DEBUG)
|
||||
unset(_ZLIB_DEFAULT_STATIC_NAMES)
|
||||
unset(_ZLIB_DEFAULT_STATIC_NAMES_DEBUG)
|
||||
|
||||
mark_as_advanced(
|
||||
ZLIB_INCLUDE_DIR
|
||||
ZLIB_LIBRARY
|
||||
ZLIB_LIBRARY_RELEASE
|
||||
ZLIB_LIBRARY_DEBUG
|
||||
ZLIB_SHARED_LIBRARY
|
||||
ZLIB_SHARED_LIBRARY_RELEASE
|
||||
ZLIB_SHARED_LIBRARY_DEBUG
|
||||
ZLIB_STATIC_LIBRARY
|
||||
ZLIB_STATIC_LIBRARY_RELEASE
|
||||
ZLIB_STATIC_LIBRARY_DEBUG
|
||||
)
|
||||
|
||||
if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H
|
||||
REGEX "^#define ZLIB_VERSION \"[^\"]*\"$"
|
||||
)
|
||||
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
|
||||
# only append a TWEAK version if it exists:
|
||||
if(ZLIB_H MATCHES "ZLIB_VERSION \"(([0-9]+)\\.([0-9]+)(\\.([0-9]+)(\\.([0-9]+))?)?)")
|
||||
set(ZLIB_VERSION_STRING "${CMAKE_MATCH_1}")
|
||||
set(ZLIB_VERSION_MAJOR "${CMAKE_MATCH_2}")
|
||||
set(ZLIB_VERSION_MINOR "${CMAKE_MATCH_3}")
|
||||
set(ZLIB_VERSION_PATCH "${CMAKE_MATCH_5}")
|
||||
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_7}")
|
||||
else()
|
||||
set(ZLIB_VERSION_STRING "")
|
||||
set(ZLIB_VERSION_MAJOR "")
|
||||
set(ZLIB_VERSION_MINOR "")
|
||||
set(ZLIB_VERSION_PATCH "")
|
||||
set(ZLIB_VERSION_TWEAK "")
|
||||
if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
set(ZLIB_VERSION "${ZLIB_VERSION_STRING}")
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
set(ZLIB_SHARED_FOUND FALSE)
|
||||
if(ZLIB_INCLUDE_DIR AND ZLIB_SHARED_LIBRARY)
|
||||
set(ZLIB_SHARED_FOUND TRUE)
|
||||
set(ZLIB_SHARED_LIBRARIES ${ZLIB_SHARED_LIBRARY})
|
||||
endif()
|
||||
|
||||
set(ZLIB_STATIC_FOUND FALSE)
|
||||
if(ZLIB_INCLUDE_DIR AND ZLIB_STATIC_LIBRARY)
|
||||
set(ZLIB_STATIC_FOUND TRUE)
|
||||
set(ZLIB_STATIC_LIBRARIES ${ZLIB_STATIC_LIBRARY})
|
||||
endif()
|
||||
|
||||
# Component support:
|
||||
# find_package(ZLIB COMPONENTS shared)
|
||||
# find_package(ZLIB COMPONENTS static)
|
||||
#
|
||||
# The compatibility/no-component case keeps the classic single-result behavior.
|
||||
set(_ZLIB_REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
foreach(_zlib_component IN LISTS ZLIB_FIND_COMPONENTS)
|
||||
if(_zlib_component STREQUAL "shared")
|
||||
if(ZLIB_SHARED_FOUND)
|
||||
set(ZLIB_shared_FOUND TRUE)
|
||||
else()
|
||||
set(ZLIB_shared_FOUND FALSE)
|
||||
endif()
|
||||
list(APPEND _ZLIB_REQUIRED_VARS ZLIB_SHARED_LIBRARY)
|
||||
elseif(_zlib_component STREQUAL "static")
|
||||
if(ZLIB_STATIC_FOUND)
|
||||
set(ZLIB_static_FOUND TRUE)
|
||||
else()
|
||||
set(ZLIB_static_FOUND FALSE)
|
||||
endif()
|
||||
list(APPEND _ZLIB_REQUIRED_VARS ZLIB_STATIC_LIBRARY)
|
||||
else()
|
||||
set(ZLIB_${_zlib_component}_FOUND FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
VERSION_VAR ZLIB_VERSION_STRING)
|
||||
find_package_handle_standard_args(ZLIB
|
||||
REQUIRED_VARS ${_ZLIB_REQUIRED_VARS}
|
||||
VERSION_VAR ZLIB_VERSION
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET ZLIB::ZLIB)
|
||||
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
if(NOT ZLIB_LIBRARIES)
|
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(ZLIB_SHARED_FOUND AND NOT TARGET ZLIB::ZLIB_SHARED)
|
||||
add_library(ZLIB::ZLIB_SHARED UNKNOWN IMPORTED)
|
||||
set_target_properties(ZLIB::ZLIB_SHARED PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}"
|
||||
IMPORTED_NO_SYSTEM TRUE
|
||||
)
|
||||
|
||||
if(ZLIB_SHARED_LIBRARY_RELEASE)
|
||||
set_property(TARGET ZLIB::ZLIB_SHARED APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB_SHARED PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${ZLIB_SHARED_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_SHARED_LIBRARY_DEBUG)
|
||||
set_property(TARGET ZLIB::ZLIB_SHARED APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB_SHARED PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${ZLIB_SHARED_LIBRARY_DEBUG}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_SHARED_LIBRARY_RELEASE AND NOT ZLIB_SHARED_LIBRARY_DEBUG)
|
||||
set_target_properties(ZLIB::ZLIB_SHARED PROPERTIES
|
||||
IMPORTED_LOCATION "${ZLIB_SHARED_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ZLIB_STATIC_FOUND AND NOT TARGET ZLIB::ZLIB_STATIC)
|
||||
add_library(ZLIB::ZLIB_STATIC STATIC IMPORTED)
|
||||
set_target_properties(ZLIB::ZLIB_STATIC PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}"
|
||||
IMPORTED_NO_SYSTEM TRUE
|
||||
)
|
||||
|
||||
if(ZLIB_STATIC_LIBRARY_RELEASE)
|
||||
set_property(TARGET ZLIB::ZLIB_STATIC APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB_STATIC PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${ZLIB_STATIC_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_STATIC_LIBRARY_DEBUG)
|
||||
set_property(TARGET ZLIB::ZLIB_STATIC APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB_STATIC PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${ZLIB_STATIC_LIBRARY_DEBUG}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_STATIC_LIBRARY_RELEASE AND NOT ZLIB_STATIC_LIBRARY_DEBUG)
|
||||
set_target_properties(ZLIB::ZLIB_STATIC PROPERTIES
|
||||
IMPORTED_LOCATION "${ZLIB_STATIC_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET ZLIB::ZLIB_STATIC AND NOT TARGET ZLIB::ZLIBSTATIC)
|
||||
add_library(ZLIB::ZLIBSTATIC ALIAS ZLIB::ZLIB_STATIC)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET ZLIB::ZLIB)
|
||||
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}"
|
||||
IMPORTED_NO_SYSTEM TRUE
|
||||
)
|
||||
|
||||
if(ZLIB_LIBRARY_RELEASE)
|
||||
set_property(TARGET ZLIB::ZLIB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${ZLIB_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_LIBRARY_DEBUG)
|
||||
set_property(TARGET ZLIB::ZLIB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG
|
||||
)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${ZLIB_LIBRARY_DEBUG}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ZLIB_LIBRARY_RELEASE AND NOT ZLIB_LIBRARY_DEBUG)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(_ZLIB_REQUIRED_VARS)
|
||||
unset(_zlib_component)
|
||||
unset(_ZLIB_SEARCHES)
|
||||
unset(_ZLIB_SEARCH_ROOT)
|
||||
unset(_ZLIB_SEARCH_NORMAL)
|
||||
|
||||
cmake_policy(POP)
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
if (NOT DEFINED BEXT_SOURCE_DIR)
|
||||
message(FATAL_ERROR "BEXT_SOURCE_DIR is required")
|
||||
endif()
|
||||
if (NOT DEFINED BEXT_DOC_MODE)
|
||||
set(BEXT_DOC_MODE CHECK)
|
||||
endif()
|
||||
|
||||
include("${BEXT_SOURCE_DIR}/CMake/BextDependencyInventory.cmake")
|
||||
bext_collect_dependency_inventory("${BEXT_SOURCE_DIR}")
|
||||
|
||||
set(generated "<!-- BEGIN GENERATED PROJECT TABLE -->\n")
|
||||
string(APPEND generated "<!-- Generated by CMake/GenerateDependencyDocs.cmake; do not edit this block. -->\n")
|
||||
string(APPEND generated "| Project | `USE_*` group(s) | Output | Dependencies | Source |\n")
|
||||
string(APPEND generated "| --- | --- | --- | --- | --- |\n")
|
||||
foreach(project ${BEXT_INVENTORY_PROJECTS})
|
||||
bext_inventory_get(groups "${project}" GROUPS)
|
||||
bext_inventory_get(output_class "${project}" OUTPUT)
|
||||
bext_inventory_get(deps "${project}" DEPS)
|
||||
bext_inventory_get(urls "${project}" SOURCE_URLS)
|
||||
if (groups STREQUAL "always considered")
|
||||
set(group_text "always considered")
|
||||
else()
|
||||
set(group_text "")
|
||||
foreach(group ${groups})
|
||||
if (group_text)
|
||||
string(APPEND group_text ", ")
|
||||
endif()
|
||||
string(APPEND group_text "`USE_${group}`")
|
||||
endforeach()
|
||||
endif()
|
||||
if (deps)
|
||||
set(dep_text "")
|
||||
foreach(dep ${deps})
|
||||
if (dep_text)
|
||||
string(APPEND dep_text ", ")
|
||||
endif()
|
||||
string(APPEND dep_text "`${dep}`")
|
||||
endforeach()
|
||||
else()
|
||||
set(dep_text "—")
|
||||
endif()
|
||||
list(GET urls 0 primary_url)
|
||||
string(APPEND generated "| `${project}` | ${group_text} | `${output_class}` | ${dep_text} | [repository](${primary_url}) |\n")
|
||||
endforeach()
|
||||
string(APPEND generated "<!-- END GENERATED PROJECT TABLE -->")
|
||||
|
||||
set(doc "${BEXT_SOURCE_DIR}/DEPENDENCIES.md")
|
||||
file(READ "${doc}" current)
|
||||
set(begin "<!-- BEGIN GENERATED PROJECT TABLE -->")
|
||||
set(end "<!-- END GENERATED PROJECT TABLE -->")
|
||||
string(FIND "${current}" "${begin}" begin_pos)
|
||||
string(FIND "${current}" "${end}" end_pos)
|
||||
if (begin_pos EQUAL -1 OR end_pos EQUAL -1 OR end_pos LESS begin_pos)
|
||||
message(FATAL_ERROR "DEPENDENCIES.md is missing generated table markers")
|
||||
endif()
|
||||
string(LENGTH "${end}" end_len)
|
||||
math(EXPR suffix_pos "${end_pos} + ${end_len}")
|
||||
string(SUBSTRING "${current}" 0 ${begin_pos} prefix)
|
||||
string(SUBSTRING "${current}" ${suffix_pos} -1 suffix)
|
||||
set(expected "${prefix}${generated}${suffix}")
|
||||
|
||||
if (BEXT_DOC_MODE STREQUAL "WRITE")
|
||||
file(WRITE "${doc}" "${expected}")
|
||||
message(STATUS "Updated ${doc}")
|
||||
elseif(BEXT_DOC_MODE STREQUAL "CHECK")
|
||||
if (NOT current STREQUAL expected)
|
||||
message(FATAL_ERROR "DEPENDENCIES.md is stale; run the update_dependency_docs target")
|
||||
endif()
|
||||
message(STATUS "Dependency metadata and DEPENDENCIES.md are valid")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown BEXT_DOC_MODE ${BEXT_DOC_MODE}; expected CHECK or WRITE")
|
||||
endif()
|
||||
@@ -0,0 +1,541 @@
|
||||
if (NOT DEFINED BEXT_SOURCE_DIR)
|
||||
message(FATAL_ERROR "BEXT_SOURCE_DIR is required")
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED BEXT_BINARY_DIR)
|
||||
message(FATAL_ERROR "BEXT_BINARY_DIR is required")
|
||||
endif ()
|
||||
|
||||
set(graph_dot "${BEXT_BINARY_DIR}/bext.dot")
|
||||
set(graph_svg "${BEXT_BINARY_DIR}/bext.svg")
|
||||
|
||||
function(_bext_graph_normalize_id out raw_value)
|
||||
string(TOLOWER "${raw_value}" normalized)
|
||||
string(REPLACE "_" "-" normalized "${normalized}")
|
||||
set(${out} "${normalized}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_key out raw_value)
|
||||
string(REGEX REPLACE "[^A-Za-z0-9]" "_" key "${raw_value}")
|
||||
set(${out} "${key}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_set prefix node_id value)
|
||||
_bext_graph_key(prop_key "${node_id}")
|
||||
set_property(GLOBAL PROPERTY "${prefix}_${prop_key}" "${value}")
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_get out prefix node_id)
|
||||
_bext_graph_key(prop_key "${node_id}")
|
||||
get_property(prop_value GLOBAL PROPERTY "${prefix}_${prop_key}")
|
||||
set(${out} "${prop_value}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_append prefix node_id value)
|
||||
_bext_graph_key(prop_key "${node_id}")
|
||||
get_property(prop_values GLOBAL PROPERTY "${prefix}_${prop_key}")
|
||||
list(APPEND prop_values "${value}")
|
||||
list(REMOVE_DUPLICATES prop_values)
|
||||
set_property(GLOBAL PROPERTY "${prefix}_${prop_key}" "${prop_values}")
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_get_list out prefix node_id)
|
||||
_bext_graph_key(prop_key "${node_id}")
|
||||
get_property(prop_values GLOBAL PROPERTY "${prefix}_${prop_key}")
|
||||
set(${out} "${prop_values}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_quote out value)
|
||||
string(REPLACE "\"" "\\\"" escaped "${value}")
|
||||
set(${out} "\"${escaped}\"" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_label out value)
|
||||
string(REPLACE "-" " " label_text "${value}")
|
||||
set(${out} "${label_text}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_xml_escape out value)
|
||||
string(REPLACE "&" "&" escaped "${value}")
|
||||
string(REPLACE "<" "<" escaped "${escaped}")
|
||||
string(REPLACE ">" ">" escaped "${escaped}")
|
||||
string(REPLACE "\"" """ escaped "${escaped}")
|
||||
set(${out} "${escaped}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_write_line)
|
||||
cmake_parse_arguments(ARG "" "TEXT" "" ${ARGN})
|
||||
file(APPEND "${graph_dot}" "${ARG_TEXT}\n")
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_color_by_depth out_fill out_outline out_font out_outline_font depth output_class)
|
||||
set(strong_colors "#2563eb" "#0f766e" "#65a30d" "#d97706" "#dc2626" "#9333ea" "#0891b2" "#4f46e5")
|
||||
set(pale_colors "#dbeafe" "#ccfbf1" "#ecfccb" "#ffedd5" "#fee2e2" "#f3e8ff" "#cffafe" "#e0e7ff")
|
||||
set(strong_fonts "#ffffff" "#ffffff" "#111827" "#111827" "#ffffff" "#ffffff" "#111827" "#ffffff")
|
||||
math(EXPR palette_index "(${depth} - 1) % 8")
|
||||
list(GET strong_colors ${palette_index} strong_fill)
|
||||
list(GET pale_colors ${palette_index} pale_fill)
|
||||
list(GET strong_fonts ${palette_index} strong_font)
|
||||
if ("${output_class}" STREQUAL "noinstall")
|
||||
set(${out_fill} "${pale_fill}" PARENT_SCOPE)
|
||||
set(${out_outline} "${strong_fill}" PARENT_SCOPE)
|
||||
set(${out_font} "${strong_fill}" PARENT_SCOPE)
|
||||
set(${out_outline_font} "${strong_fill}" PARENT_SCOPE)
|
||||
else ()
|
||||
set(${out_fill} "${strong_fill}" PARENT_SCOPE)
|
||||
set(${out_outline} "${strong_fill}" PARENT_SCOPE)
|
||||
set(${out_font} "${strong_font}" PARENT_SCOPE)
|
||||
set(${out_outline_font} "${strong_fill}" PARENT_SCOPE)
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
function(_bext_graph_find_submodule_url out project_name submodule_path)
|
||||
set(search_path "${project_name}/${submodule_path}")
|
||||
list(LENGTH submodule_path_entries submodule_count)
|
||||
if (submodule_count GREATER 0)
|
||||
math(EXPR last_index "${submodule_count} - 1")
|
||||
foreach(idx RANGE 0 ${last_index})
|
||||
list(GET submodule_path_entries ${idx} entry)
|
||||
string(REPLACE "|" ";" parts "${entry}")
|
||||
list(GET parts 0 entry_path)
|
||||
list(GET parts 1 entry_url)
|
||||
if ("${entry_path}" STREQUAL "${search_path}")
|
||||
set(${out} "${entry_url}" PARENT_SCOPE)
|
||||
return()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
set(${out} "" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
file(STRINGS "${BEXT_SOURCE_DIR}/.gitmodules" gitmodule_lines)
|
||||
set(current_submodule_path "")
|
||||
foreach(line ${gitmodule_lines})
|
||||
string(STRIP "${line}" stripped_line)
|
||||
if (stripped_line MATCHES "^path = (.+)$")
|
||||
set(current_submodule_path "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
if (stripped_line MATCHES "^url = (.+)$")
|
||||
if (current_submodule_path)
|
||||
list(APPEND submodule_path_entries "${current_submodule_path}|${CMAKE_MATCH_1}")
|
||||
set(current_submodule_path "")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
file(STRINGS "${BEXT_SOURCE_DIR}/CMakeLists.txt" top_level_lines)
|
||||
|
||||
set(project_ids)
|
||||
set(actual_edges)
|
||||
set(all_dep_ids)
|
||||
foreach(line ${top_level_lines})
|
||||
string(STRIP "${line}" stripped_line)
|
||||
if (stripped_line MATCHES "^#")
|
||||
continue()
|
||||
endif ()
|
||||
if (NOT stripped_line MATCHES "^add_project\\(([^ \t\\)]+)")
|
||||
continue()
|
||||
endif ()
|
||||
|
||||
set(project_name "${CMAKE_MATCH_1}")
|
||||
_bext_graph_normalize_id(project_id "${project_name}")
|
||||
list(APPEND project_ids "${project_id}")
|
||||
_bext_graph_set(NODE_LABEL "${project_id}" "${project_name}")
|
||||
_bext_graph_set(NODE_CLASS "${project_id}" "install")
|
||||
|
||||
set(project_cmakelists "${BEXT_SOURCE_DIR}/${project_name}/CMakeLists.txt")
|
||||
file(READ "${project_cmakelists}" project_text)
|
||||
if (project_text MATCHES "CMAKE_INSTALL_PREFIX=\\$\\{CMAKE_NOBUNDLE_INSTALL_PREFIX\\}" OR
|
||||
project_text MATCHES "--prefix=\\$\\{CMAKE_NOBUNDLE_INSTALL_PREFIX\\}")
|
||||
_bext_graph_set(NODE_CLASS "${project_id}" "noinstall")
|
||||
endif ()
|
||||
|
||||
set(depfile "${BEXT_SOURCE_DIR}/${project_name}/${project_name}.deps")
|
||||
if (EXISTS "${depfile}")
|
||||
file(STRINGS "${depfile}" dep_lines)
|
||||
foreach(dep_line ${dep_lines})
|
||||
string(STRIP "${dep_line}" dep_name)
|
||||
if (NOT dep_name)
|
||||
continue()
|
||||
endif ()
|
||||
_bext_graph_normalize_id(dep_id "${dep_name}")
|
||||
list(APPEND actual_edges "${project_id}|${dep_id}")
|
||||
list(APPEND all_dep_ids "${dep_id}")
|
||||
_bext_graph_get(dep_label NODE_LABEL "${dep_id}")
|
||||
if (NOT dep_label)
|
||||
string(TOLOWER "${dep_name}" dep_label_text)
|
||||
_bext_graph_set(NODE_LABEL "${dep_id}" "${dep_label_text}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
file(STRINGS "${project_cmakelists}" project_lines)
|
||||
foreach(project_line ${project_lines})
|
||||
string(STRIP "${project_line}" stripped_project_line)
|
||||
if (stripped_project_line MATCHES "git_submodule_init\\(([A-Za-z0-9_+./-]+)[ \t]")
|
||||
list(APPEND submodule_paths "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
if (stripped_project_line MATCHES "ExternalProject_Add\\(([A-Za-z0-9_]+)_BLD")
|
||||
_bext_graph_normalize_id(provider_id "${CMAKE_MATCH_1}")
|
||||
list(APPEND provider_ids "${provider_id}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
list(REMOVE_DUPLICATES submodule_paths)
|
||||
list(REMOVE_DUPLICATES provider_ids)
|
||||
if (submodule_paths)
|
||||
_bext_graph_set(PROJECT_SUBMODULE_PATHS "${project_id}" "${submodule_paths}")
|
||||
endif ()
|
||||
if (provider_ids)
|
||||
_bext_graph_set(PROJECT_PROVIDER_IDS "${project_id}" "${provider_ids}")
|
||||
endif ()
|
||||
unset(submodule_paths)
|
||||
unset(provider_ids)
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES project_ids)
|
||||
list(SORT project_ids)
|
||||
list(REMOVE_DUPLICATES actual_edges)
|
||||
list(REMOVE_DUPLICATES all_dep_ids)
|
||||
|
||||
set(alias_ids)
|
||||
foreach(dep_id ${all_dep_ids})
|
||||
list(FIND project_ids "${dep_id}" project_idx)
|
||||
if (project_idx EQUAL -1)
|
||||
list(APPEND alias_ids "${dep_id}")
|
||||
endif ()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES alias_ids)
|
||||
list(SORT alias_ids)
|
||||
|
||||
set(provider_edges)
|
||||
foreach(project_id ${project_ids})
|
||||
_bext_graph_get(project_name NODE_LABEL "${project_id}")
|
||||
_bext_graph_get(project_submodule_paths PROJECT_SUBMODULE_PATHS "${project_id}")
|
||||
foreach(submodule_path ${project_submodule_paths})
|
||||
_bext_graph_find_submodule_url(project_url "${project_name}" "${submodule_path}")
|
||||
if (project_url)
|
||||
_bext_graph_set(NODE_URL "${project_id}" "${project_url}")
|
||||
break()
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
_bext_graph_get(provider_ids PROJECT_PROVIDER_IDS "${project_id}")
|
||||
foreach(provider_id ${provider_ids})
|
||||
list(FIND alias_ids "${provider_id}" alias_idx)
|
||||
if (alias_idx EQUAL -1)
|
||||
continue()
|
||||
endif ()
|
||||
list(APPEND provider_edges "${project_id}|${provider_id}")
|
||||
_bext_graph_get(alias_url NODE_URL "${provider_id}")
|
||||
if (NOT alias_url)
|
||||
foreach(submodule_path ${project_submodule_paths})
|
||||
get_filename_component(submodule_name "${submodule_path}" NAME)
|
||||
_bext_graph_normalize_id(submodule_id "${submodule_name}")
|
||||
if ("${submodule_id}" STREQUAL "${provider_id}")
|
||||
_bext_graph_find_submodule_url(alias_url_candidate "${project_name}" "${submodule_path}")
|
||||
if (alias_url_candidate)
|
||||
_bext_graph_set(NODE_URL "${provider_id}" "${alias_url_candidate}")
|
||||
break()
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
_bext_graph_get(alias_class NODE_CLASS "${provider_id}")
|
||||
if (NOT alias_class)
|
||||
_bext_graph_get(project_class NODE_CLASS "${project_id}")
|
||||
_bext_graph_set(NODE_CLASS "${provider_id}" "${project_class}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES provider_edges)
|
||||
list(SORT provider_edges)
|
||||
|
||||
set(node_ids ${project_ids} ${alias_ids})
|
||||
list(REMOVE_DUPLICATES node_ids)
|
||||
list(SORT node_ids)
|
||||
|
||||
set(incoming_project_targets)
|
||||
foreach(edge ${actual_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
list(FIND project_ids "${edge_dst}" dst_project_idx)
|
||||
if (NOT dst_project_idx EQUAL -1)
|
||||
list(APPEND incoming_project_targets "${edge_dst}")
|
||||
endif ()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES incoming_project_targets)
|
||||
|
||||
set(entry_project_ids)
|
||||
foreach(project_id ${project_ids})
|
||||
list(FIND incoming_project_targets "${project_id}" incoming_idx)
|
||||
if (incoming_idx EQUAL -1)
|
||||
list(APPEND entry_project_ids "${project_id}")
|
||||
endif ()
|
||||
endforeach()
|
||||
list(SORT entry_project_ids)
|
||||
|
||||
set(active_nodes ${entry_project_ids})
|
||||
foreach(project_id ${entry_project_ids})
|
||||
_bext_graph_set(NODE_DEPTH "${project_id}" "1")
|
||||
endforeach()
|
||||
|
||||
set(changed TRUE)
|
||||
while (changed)
|
||||
set(changed FALSE)
|
||||
foreach(edge ${actual_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
_bext_graph_get(src_depth NODE_DEPTH "${edge_src}")
|
||||
if (NOT src_depth)
|
||||
continue()
|
||||
endif ()
|
||||
math(EXPR candidate_depth "${src_depth} + 1")
|
||||
_bext_graph_get(dst_depth NODE_DEPTH "${edge_dst}")
|
||||
if (NOT dst_depth OR candidate_depth LESS dst_depth)
|
||||
_bext_graph_set(NODE_DEPTH "${edge_dst}" "${candidate_depth}")
|
||||
set(changed TRUE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endwhile ()
|
||||
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
if (NOT node_depth)
|
||||
_bext_graph_set(NODE_DEPTH "${node_id}" "1")
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
set(max_depth 1)
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
if (node_depth GREATER max_depth)
|
||||
set(max_depth "${node_depth}")
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
file(WRITE "${graph_dot}" "digraph Deps {\n")
|
||||
_bext_graph_write_line(TEXT " graph [rankdir=LR, overlap=false, splines=true];")
|
||||
_bext_graph_write_line(TEXT " node [shape=box, style=bold, fontname=\"Helvetica\", penwidth=2.0, margin=\"0.12,0.06\"];")
|
||||
_bext_graph_write_line(TEXT " edge [color=\"#6b7280\", arrowsize=0.7, penwidth=1.4];")
|
||||
_bext_graph_write_line(TEXT "")
|
||||
|
||||
_bext_graph_write_line(TEXT " \"BRL_CAD\" [label=\"BRL-CAD\", URL=\"https://github.com/BRL-CAD/brlcad\", style=\"filled,bold\", fillcolor=\"#111827\", color=\"#111827\", fontcolor=\"#ffffff\", penwidth=2.4];")
|
||||
_bext_graph_write_line(TEXT "")
|
||||
|
||||
foreach(depth RANGE 1 ${max_depth})
|
||||
set(depth_nodes)
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
if ("${node_depth}" STREQUAL "${depth}")
|
||||
list(APPEND depth_nodes "${node_id}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (depth_nodes)
|
||||
list(SORT depth_nodes)
|
||||
_bext_graph_write_line(TEXT " { rank=same;")
|
||||
foreach(node_id ${depth_nodes})
|
||||
_bext_graph_get(node_label NODE_LABEL "${node_id}")
|
||||
_bext_graph_get(node_class NODE_CLASS "${node_id}")
|
||||
_bext_graph_get(node_url NODE_URL "${node_id}")
|
||||
_bext_graph_color_by_depth(node_fill node_outline node_font node_outline_font "${depth}" "${node_class}")
|
||||
_bext_graph_quote(node_name_q "${node_id}")
|
||||
_bext_graph_quote(node_label_q "${node_label}")
|
||||
if (node_url)
|
||||
_bext_graph_quote(node_url_q "${node_url}")
|
||||
set(url_attr ", URL=${node_url_q}")
|
||||
else ()
|
||||
set(url_attr "")
|
||||
endif ()
|
||||
if ("${node_class}" STREQUAL "noinstall")
|
||||
set(node_style "filled,bold")
|
||||
else ()
|
||||
set(node_style "filled,bold")
|
||||
endif ()
|
||||
_bext_graph_write_line(TEXT " ${node_name_q} [label=${node_label_q}, style=\"${node_style}\", fillcolor=\"${node_fill}\", color=\"${node_outline}\", fontcolor=\"${node_font}\"${url_attr}];")
|
||||
endforeach ()
|
||||
_bext_graph_write_line(TEXT " }")
|
||||
_bext_graph_write_line(TEXT "")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
foreach(entry_project_id ${entry_project_ids})
|
||||
_bext_graph_quote(entry_q "${entry_project_id}")
|
||||
_bext_graph_write_line(TEXT " \"BRL_CAD\" -> ${entry_q} [color=\"#9ca3af\", penwidth=1.6];")
|
||||
endforeach ()
|
||||
if (entry_project_ids)
|
||||
_bext_graph_write_line(TEXT "")
|
||||
endif ()
|
||||
|
||||
list(SORT actual_edges)
|
||||
foreach(edge ${actual_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
_bext_graph_quote(src_q "${edge_src}")
|
||||
_bext_graph_quote(dst_q "${edge_dst}")
|
||||
_bext_graph_write_line(TEXT " ${src_q} -> ${dst_q};")
|
||||
endforeach ()
|
||||
|
||||
if (provider_edges)
|
||||
_bext_graph_write_line(TEXT "")
|
||||
foreach(edge ${provider_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
_bext_graph_quote(src_q "${edge_src}")
|
||||
_bext_graph_quote(dst_q "${edge_dst}")
|
||||
_bext_graph_write_line(TEXT " ${src_q} -> ${dst_q} [style=dashed, color=\"#9ca3af\", arrowhead=none, constraint=false];")
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
_bext_graph_write_line(TEXT "}")
|
||||
|
||||
set(node_width 190)
|
||||
set(node_height 42)
|
||||
set(column_gap 120)
|
||||
set(row_gap 22)
|
||||
set(graph_margin 40)
|
||||
|
||||
set(max_nodes_per_depth 1)
|
||||
foreach(depth RANGE 1 ${max_depth})
|
||||
set(depth_nodes)
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
if ("${node_depth}" STREQUAL "${depth}")
|
||||
list(APPEND depth_nodes "${node_id}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
list(LENGTH depth_nodes depth_node_count)
|
||||
if (depth_node_count GREATER max_nodes_per_depth)
|
||||
set(max_nodes_per_depth "${depth_node_count}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
math(EXPR graph_width "${graph_margin} * 2 + (${max_depth} + 1) * ${node_width} + ${max_depth} * ${column_gap}")
|
||||
math(EXPR graph_height "${graph_margin} * 2 + ${max_nodes_per_depth} * ${node_height} + (${max_nodes_per_depth} - 1) * ${row_gap}")
|
||||
math(EXPR root_x "${graph_margin}")
|
||||
math(EXPR root_y "(${graph_height} - ${node_height}) / 2")
|
||||
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
set(depth_nodes)
|
||||
foreach(depth_node_id ${node_ids})
|
||||
_bext_graph_get(depth_node_depth NODE_DEPTH "${depth_node_id}")
|
||||
if ("${depth_node_depth}" STREQUAL "${node_depth}")
|
||||
list(APPEND depth_nodes "${depth_node_id}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
list(SORT depth_nodes)
|
||||
list(FIND depth_nodes "${node_id}" depth_index)
|
||||
math(EXPR node_x "${graph_margin} + ${node_depth} * (${node_width} + ${column_gap})")
|
||||
math(EXPR node_y "${graph_margin} + ${depth_index} * (${node_height} + ${row_gap})")
|
||||
_bext_graph_set(NODE_X "${node_id}" "${node_x}")
|
||||
_bext_graph_set(NODE_Y "${node_id}" "${node_y}")
|
||||
endforeach ()
|
||||
|
||||
file(WRITE "${graph_svg}" "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"${graph_width}\" height=\"${graph_height}\" viewBox=\"0 0 ${graph_width} ${graph_height}\">\n")
|
||||
file(APPEND "${graph_svg}" " <defs>\n")
|
||||
file(APPEND "${graph_svg}" " <marker id=\"arrow\" markerWidth=\"10\" markerHeight=\"8\" refX=\"9\" refY=\"4\" orient=\"auto\" markerUnits=\"strokeWidth\">\n")
|
||||
file(APPEND "${graph_svg}" " <path d=\"M0,0 L10,4 L0,8 z\" fill=\"#6b7280\" />\n")
|
||||
file(APPEND "${graph_svg}" " </marker>\n")
|
||||
file(APPEND "${graph_svg}" " </defs>\n")
|
||||
file(APPEND "${graph_svg}" " <rect width=\"100%\" height=\"100%\" fill=\"#ffffff\" />\n")
|
||||
|
||||
foreach(entry_project_id ${entry_project_ids})
|
||||
_bext_graph_get(dst_x NODE_X "${entry_project_id}")
|
||||
_bext_graph_get(dst_y NODE_Y "${entry_project_id}")
|
||||
math(EXPR src_cx "${root_x} + ${node_width}")
|
||||
math(EXPR src_cy "${root_y} + (${node_height} / 2)")
|
||||
set(dst_cx "${dst_x}")
|
||||
math(EXPR dst_cy "${dst_y} + (${node_height} / 2)")
|
||||
math(EXPR control_dx "(${dst_cx} - ${src_cx}) / 2")
|
||||
math(EXPR control1_x "${src_cx} + ${control_dx}")
|
||||
math(EXPR control2_x "${dst_cx} - ${control_dx}")
|
||||
file(APPEND "${graph_svg}" " <path d=\"M ${src_cx} ${src_cy} C ${control1_x} ${src_cy}, ${control2_x} ${dst_cy}, ${dst_cx} ${dst_cy}\" fill=\"none\" stroke=\"#9ca3af\" stroke-width=\"1.6\" marker-end=\"url(#arrow)\" />\n")
|
||||
endforeach ()
|
||||
|
||||
foreach(edge ${actual_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
_bext_graph_get(src_x NODE_X "${edge_src}")
|
||||
_bext_graph_get(src_y NODE_Y "${edge_src}")
|
||||
_bext_graph_get(dst_x NODE_X "${edge_dst}")
|
||||
_bext_graph_get(dst_y NODE_Y "${edge_dst}")
|
||||
math(EXPR src_cx "${src_x} + ${node_width}")
|
||||
math(EXPR src_cy "${src_y} + (${node_height} / 2)")
|
||||
set(dst_cx "${dst_x}")
|
||||
math(EXPR dst_cy "${dst_y} + (${node_height} / 2)")
|
||||
math(EXPR control_dx "(${dst_cx} - ${src_cx}) / 2")
|
||||
math(EXPR control1_x "${src_cx} + ${control_dx}")
|
||||
math(EXPR control2_x "${dst_cx} - ${control_dx}")
|
||||
file(APPEND "${graph_svg}" " <path d=\"M ${src_cx} ${src_cy} C ${control1_x} ${src_cy}, ${control2_x} ${dst_cy}, ${dst_cx} ${dst_cy}\" fill=\"none\" stroke=\"#6b7280\" stroke-width=\"1.4\" marker-end=\"url(#arrow)\" />\n")
|
||||
endforeach ()
|
||||
|
||||
foreach(edge ${provider_edges})
|
||||
string(REPLACE "|" ";" edge_parts "${edge}")
|
||||
list(GET edge_parts 0 edge_src)
|
||||
list(GET edge_parts 1 edge_dst)
|
||||
_bext_graph_get(src_x NODE_X "${edge_src}")
|
||||
_bext_graph_get(src_y NODE_Y "${edge_src}")
|
||||
_bext_graph_get(dst_x NODE_X "${edge_dst}")
|
||||
_bext_graph_get(dst_y NODE_Y "${edge_dst}")
|
||||
math(EXPR src_cx "${src_x} + ${node_width}")
|
||||
math(EXPR src_cy "${src_y} + (${node_height} / 2)")
|
||||
set(dst_cx "${dst_x}")
|
||||
math(EXPR dst_cy "${dst_y} + (${node_height} / 2)")
|
||||
math(EXPR control_dx "(${dst_cx} - ${src_cx}) / 2")
|
||||
math(EXPR control1_x "${src_cx} + ${control_dx}")
|
||||
math(EXPR control2_x "${dst_cx} - ${control_dx}")
|
||||
file(APPEND "${graph_svg}" " <path d=\"M ${src_cx} ${src_cy} C ${control1_x} ${src_cy}, ${control2_x} ${dst_cy}, ${dst_cx} ${dst_cy}\" fill=\"none\" stroke=\"#9ca3af\" stroke-width=\"1.4\" stroke-dasharray=\"6 5\" />\n")
|
||||
endforeach ()
|
||||
|
||||
file(APPEND "${graph_svg}" " <g>\n")
|
||||
file(APPEND "${graph_svg}" " <a xlink:href=\"https://github.com/BRL-CAD/brlcad\">\n")
|
||||
file(APPEND "${graph_svg}" " <rect x=\"${root_x}\" y=\"${root_y}\" width=\"${node_width}\" height=\"${node_height}\" rx=\"8\" fill=\"#111827\" stroke=\"#111827\" stroke-width=\"2.4\" />\n")
|
||||
math(EXPR root_text_x "${root_x} + (${node_width} / 2)")
|
||||
math(EXPR root_text_y "${root_y} + 27")
|
||||
file(APPEND "${graph_svg}" " <text x=\"${root_text_x}\" y=\"${root_text_y}\" text-anchor=\"middle\" font-family=\"Helvetica\" font-size=\"16\" font-weight=\"700\" fill=\"#ffffff\">BRL-CAD</text>\n")
|
||||
file(APPEND "${graph_svg}" " </a>\n")
|
||||
file(APPEND "${graph_svg}" " </g>\n")
|
||||
|
||||
foreach(node_id ${node_ids})
|
||||
_bext_graph_get(node_depth NODE_DEPTH "${node_id}")
|
||||
_bext_graph_get(node_label NODE_LABEL "${node_id}")
|
||||
_bext_graph_get(node_class NODE_CLASS "${node_id}")
|
||||
_bext_graph_get(node_url NODE_URL "${node_id}")
|
||||
_bext_graph_get(node_x NODE_X "${node_id}")
|
||||
_bext_graph_get(node_y NODE_Y "${node_id}")
|
||||
_bext_graph_color_by_depth(node_fill node_outline node_font node_outline_font "${node_depth}" "${node_class}")
|
||||
_bext_graph_xml_escape(node_label_xml "${node_label}")
|
||||
if (node_url)
|
||||
_bext_graph_xml_escape(node_url_xml "${node_url}")
|
||||
file(APPEND "${graph_svg}" " <g>\n")
|
||||
file(APPEND "${graph_svg}" " <a xlink:href=\"${node_url_xml}\">\n")
|
||||
else ()
|
||||
file(APPEND "${graph_svg}" " <g>\n")
|
||||
endif ()
|
||||
file(APPEND "${graph_svg}" " <rect x=\"${node_x}\" y=\"${node_y}\" width=\"${node_width}\" height=\"${node_height}\" rx=\"8\" fill=\"${node_fill}\" stroke=\"${node_outline}\" stroke-width=\"2.0\" />\n")
|
||||
math(EXPR text_x "${node_x} + (${node_width} / 2)")
|
||||
math(EXPR text_y "${node_y} + 27")
|
||||
file(APPEND "${graph_svg}" " <text x=\"${text_x}\" y=\"${text_y}\" text-anchor=\"middle\" font-family=\"Helvetica\" font-size=\"14\" font-weight=\"600\" fill=\"${node_font}\">${node_label_xml}</text>\n")
|
||||
if (node_url)
|
||||
file(APPEND "${graph_svg}" " </a>\n")
|
||||
endif ()
|
||||
file(APPEND "${graph_svg}" " </g>\n")
|
||||
endforeach ()
|
||||
|
||||
file(APPEND "${graph_svg}" "</svg>\n")
|
||||
|
||||
if (DEFINED GRAPHVIZ_DOT_EXECUTABLE AND GRAPHVIZ_DOT_EXECUTABLE)
|
||||
foreach(render_format png pdf)
|
||||
if (DEFINED BEXT_RENDER_${render_format} AND BEXT_RENDER_${render_format})
|
||||
execute_process(
|
||||
COMMAND "${GRAPHVIZ_DOT_EXECUTABLE}" "-T${render_format}" "-o" "${BEXT_BINARY_DIR}/bext.${render_format}" "${graph_dot}"
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
@@ -0,0 +1,115 @@
|
||||
if (NOT DEFINED BEXT_SOURCE_DIR)
|
||||
message(FATAL_ERROR "BEXT_SOURCE_DIR is required")
|
||||
endif()
|
||||
if (NOT DEFINED BEXT_SBOM_OUTPUT)
|
||||
message(FATAL_ERROR "BEXT_SBOM_OUTPUT is required")
|
||||
endif()
|
||||
|
||||
include("${BEXT_SOURCE_DIR}/CMake/BextDependencyInventory.cmake")
|
||||
bext_collect_dependency_inventory("${BEXT_SOURCE_DIR}")
|
||||
|
||||
function(_bext_json_escape out value)
|
||||
string(REPLACE "\\" "\\\\" value "${value}")
|
||||
string(REPLACE "\"" "\\\"" value "${value}")
|
||||
string(REPLACE "\n" "\\n" value "${value}")
|
||||
string(REPLACE "\r" "\\r" value "${value}")
|
||||
string(REPLACE "\t" "\\t" value "${value}")
|
||||
set(${out} "${value}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_bext_spdx_id out project)
|
||||
string(REGEX REPLACE "[^A-Za-z0-9.-]" "-" id "${project}")
|
||||
set(${out} "SPDXRef-Package-${id}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
execute_process(
|
||||
COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY "${BEXT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE git_result
|
||||
OUTPUT_VARIABLE bext_revision
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if (NOT git_result EQUAL 0)
|
||||
message(FATAL_ERROR "Unable to determine the bext revision")
|
||||
endif()
|
||||
string(TIMESTAMP created "%Y-%m-%dT%H:%M:%SZ" UTC)
|
||||
|
||||
get_filename_component(sbom_dir "${BEXT_SBOM_OUTPUT}" DIRECTORY)
|
||||
file(MAKE_DIRECTORY "${sbom_dir}")
|
||||
file(WRITE "${BEXT_SBOM_OUTPUT}" "{\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"spdxVersion\": \"SPDX-2.3\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"dataLicense\": \"CC0-1.0\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"SPDXID\": \"SPDXRef-DOCUMENT\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"name\": \"bext-dependencies\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"documentNamespace\": \"https://github.com/BRL-CAD/bext/sbom/${bext_revision}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"creationInfo\": {\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"created\": \"${created}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"creators\": [\"Tool: bext-GenerateSbom.cmake\"]\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " },\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"packages\": [\n")
|
||||
|
||||
list(LENGTH BEXT_INVENTORY_PROJECTS project_count)
|
||||
set(project_index 0)
|
||||
foreach(project ${BEXT_INVENTORY_PROJECTS})
|
||||
math(EXPR project_index "${project_index} + 1")
|
||||
bext_inventory_get(groups "${project}" GROUPS)
|
||||
bext_inventory_get(output_class "${project}" OUTPUT)
|
||||
bext_inventory_get(urls "${project}" SOURCE_URLS)
|
||||
bext_inventory_get(shas "${project}" SOURCE_SHAS)
|
||||
list(GET urls 0 primary_url)
|
||||
list(GET shas 0 primary_sha)
|
||||
_bext_spdx_id(spdx_id "${project}")
|
||||
string(REPLACE ";" ", " all_urls "${urls}")
|
||||
string(REPLACE ";" ", " all_shas "${shas}")
|
||||
string(REPLACE ";" ", " group_text "${groups}")
|
||||
_bext_json_escape(comment "groups: ${group_text}; output: ${output_class}; sources: ${all_urls}; pinned commits: ${all_shas}")
|
||||
_bext_json_escape(primary_url "${primary_url}")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " {\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"name\": \"${project}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"SPDXID\": \"${spdx_id}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"versionInfo\": \"${primary_sha}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"downloadLocation\": \"${primary_url}\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"filesAnalyzed\": false,\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"licenseConcluded\": \"NOASSERTION\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"licenseDeclared\": \"NOASSERTION\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"copyrightText\": \"NOASSERTION\",\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"comment\": \"${comment}\"\n")
|
||||
if (project_index LESS project_count)
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " },\n")
|
||||
else()
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " }\n")
|
||||
endif()
|
||||
endforeach()
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " ],\n")
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " \"relationships\": [\n")
|
||||
|
||||
set(relationships)
|
||||
foreach(project ${BEXT_INVENTORY_PROJECTS})
|
||||
_bext_spdx_id(project_id "${project}")
|
||||
list(APPEND relationships "SPDXRef-DOCUMENT|DESCRIBES|${project_id}")
|
||||
bext_inventory_get(deps "${project}" DEPS)
|
||||
foreach(dep ${deps})
|
||||
list(FIND BEXT_INVENTORY_PROJECTS "${dep}" dep_index)
|
||||
if (NOT dep_index EQUAL -1)
|
||||
_bext_spdx_id(dep_id "${dep}")
|
||||
list(APPEND relationships "${project_id}|DEPENDS_ON|${dep_id}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
list(LENGTH relationships relationship_count)
|
||||
set(relationship_index 0)
|
||||
foreach(relationship ${relationships})
|
||||
math(EXPR relationship_index "${relationship_index} + 1")
|
||||
string(REPLACE "|" ";" parts "${relationship}")
|
||||
list(GET parts 0 source_id)
|
||||
list(GET parts 1 relationship_type)
|
||||
list(GET parts 2 target_id)
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " {\"spdxElementId\": \"${source_id}\", \"relationshipType\": \"${relationship_type}\", \"relatedSpdxElement\": \"${target_id}\"}")
|
||||
if (relationship_index LESS relationship_count)
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" ",\n")
|
||||
else()
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" "\n")
|
||||
endif()
|
||||
endforeach()
|
||||
file(APPEND "${BEXT_SBOM_OUTPUT}" " ]\n}\n")
|
||||
message(STATUS "Generated SPDX 2.3 SBOM: ${BEXT_SBOM_OUTPUT}")
|
||||
@@ -0,0 +1,246 @@
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
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)
|
||||
# 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)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT seen_separator)
|
||||
message(FATAL_ERROR "Patch wrapper requires '--' before patch arguments")
|
||||
endif()
|
||||
|
||||
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
|
||||
OUTPUT_VARIABLE patch_stdout
|
||||
ERROR_VARIABLE patch_stderr
|
||||
ECHO_OUTPUT_VARIABLE
|
||||
ECHO_ERROR_VARIABLE
|
||||
)
|
||||
|
||||
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_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()
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E echo
|
||||
"Patch already applied or reversed; continuing because -N/--forward was requested."
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(patch_failure_output "${patch_stdout}${patch_stderr}")
|
||||
preserve_reject_artifacts()
|
||||
message(FATAL_ERROR "Patch command failed with exit code ${patch_result}")
|
||||
@@ -0,0 +1,464 @@
|
||||
# U T I L S . C M A K E
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2025 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# 3. The name of the author may not be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
###
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/BextGit.cmake")
|
||||
|
||||
###############################################################################
|
||||
# It is common for more complex targets to need to key build settings off of
|
||||
# whether or not their dependencies are being built locally. These macros are
|
||||
# used to cut down on boilerplate code
|
||||
###############################################################################
|
||||
|
||||
macro(TargetVars roots)
|
||||
foreach(root ${${roots}})
|
||||
if (NOT ${root}_ADDED)
|
||||
message(FATAL_ERROR "${root} is listed as a dependency but is not yet added - fix project ordering in top level CMakeLists.txt file")
|
||||
endif (NOT ${root}_ADDED)
|
||||
if (TARGET ${root}_BLD)
|
||||
set(${root}_TARGET 1)
|
||||
# Also set the TARGET var in the parent scope - may need it in other
|
||||
# build logic besides the current directory.
|
||||
set(${root}_TARGET 1 PARENT_SCOPE)
|
||||
endif (TARGET ${root}_BLD)
|
||||
endforeach(root ${${roots}})
|
||||
endmacro(TargetVars root)
|
||||
|
||||
|
||||
###
|
||||
# Loads dependencies from an in-src file named same as containing
|
||||
# directory with .deps suffix. Dependencies are added to the
|
||||
# corresponding ${proot}_DEPENDS variable.
|
||||
###
|
||||
macro(RegisterDeps proot)
|
||||
get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps")
|
||||
message(FATAL_ERROR "No ${dirname}.deps file found in ${CMAKE_CURRENT_SOURCE_DIR}/")
|
||||
endif (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps")
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps" DEP_LINES)
|
||||
string(TOLOWER "${proot}" lr)
|
||||
|
||||
# Add each dependency to this directory's _DEPENDS list
|
||||
foreach(dl ${DEP_LINES})
|
||||
set(${proot}_DEPENDS ${${proot}_DEPENDS} ${dl})
|
||||
endforeach(dl ${DEP_LINES})
|
||||
|
||||
# Add all dependencies to the global ALL_DEPENDENCIES list
|
||||
get_property(ALL_DEPS GLOBAL PROPERTY ALL_DEPENDENCIES)
|
||||
set(ALL_DEPS ${ALL_DEPS} ${${proot}_DEPENDS})
|
||||
list(SORT ALL_DEPS)
|
||||
list(REMOVE_DUPLICATES ALL_DEPS)
|
||||
set_property(GLOBAL PROPERTY ALL_DEPENDENCIES ${ALL_DEPS})
|
||||
|
||||
# Set the TARGET variables for CMake generator expression "if" tests
|
||||
TargetVars(${proot}_DEPENDS)
|
||||
|
||||
endmacro(RegisterDeps)
|
||||
|
||||
macro(TargetInstallDeps croot roots)
|
||||
foreach(root ${${roots}})
|
||||
if (TARGET ${root}_BLD)
|
||||
ExternalProject_Add_stepdependencies(${croot}_BLD configure ${root}_BLD-install)
|
||||
endif (TARGET ${root}_BLD)
|
||||
endforeach(root ${${root}})
|
||||
endmacro(TargetInstallDeps root)
|
||||
|
||||
###############################################################################
|
||||
# We're using submodules to avoid automatically having to download a huge
|
||||
# amount of source code if it isn't needed. Define a convenience function
|
||||
# to use in the project to populate the submodule checkouts if needed.
|
||||
###############################################################################
|
||||
function(git_submodule_init path checkfile)
|
||||
string(REGEX REPLACE "[^A-Za-z0-9_+.-]" "_" stamp_name "${path}")
|
||||
set(sha1_stamp "${CMAKE_CURRENT_BINARY_DIR}/build_sha1_${stamp_name}.txt")
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${path}/${checkfile}")
|
||||
bext_git_submodule_update("${CMAKE_CURRENT_SOURCE_DIR}" -- "${path}")
|
||||
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}
|
||||
OUTPUT_VARIABLE GIT_SHA1
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
file(WRITE "${sha1_stamp}" ${GIT_SHA1})
|
||||
else ()
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%H
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${path}
|
||||
OUTPUT_VARIABLE GIT_SHA1
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if (EXISTS "${sha1_stamp}" )
|
||||
file(READ "${sha1_stamp}" BUILD_SHA1)
|
||||
if (NOT "${BUILD_SHA1}" MATCHES "${GIT_SHA1}")
|
||||
message("Outdated sha1 stamp found for ${path}: resetting build directory ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf ${CMAKE_CURRENT_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif (NOT "${BUILD_SHA1}" MATCHES "${GIT_SHA1}")
|
||||
endif()
|
||||
file(WRITE "${sha1_stamp}" ${GIT_SHA1})
|
||||
endif ()
|
||||
endfunction(git_submodule_init path)
|
||||
|
||||
###############################################################################
|
||||
# If we're using BRLCAD_COMPONENTS, the check of enabled/disabled is more
|
||||
# nuanced. For bext, the BRLCAD_COMPONENTS list should be the expanded list
|
||||
# from BRL-CAD's parent logic that fully populates the dependencies, not just
|
||||
# the components directly specified by the user to BRL-CAD's configure.
|
||||
###############################################################################
|
||||
function(cad_enable pname components)
|
||||
if (DEFINED BRLCAD_COMPONENTS)
|
||||
|
||||
# To avoid problems passing multiple components in, we support using ':' as
|
||||
# a delimiter in addition to the standard CMake list entry delimiter ';'.
|
||||
# TODO: If this doesn't cut it we'll probably have to pass in a file
|
||||
# containing a list and read that.
|
||||
string(REPLACE ":" ";" BRLCAD_COMPONENTS "${BRLCAD_COMPONENTS}")
|
||||
|
||||
# In case the component list changed, make sure we're
|
||||
# not using a cached result.
|
||||
unset(ENABLE_${pname} CACHE)
|
||||
unset(DISABLE_${pname} CACHE)
|
||||
|
||||
set(acomponents ${components})
|
||||
|
||||
# Look for a component in the list
|
||||
foreach(c ${BRLCAD_COMPONENTS})
|
||||
list(FIND acomponents ${c} LFIND)
|
||||
if (NOT LFIND EQUAL -1)
|
||||
bext_enable_all_default(${pname} ${pname})
|
||||
set(ENABLE_${pname} ${ENABLE_${pname}} PARENT_SCOPE)
|
||||
set(DISABLE_${pname} OFF PARENT_SCOPE)
|
||||
return()
|
||||
endif (NOT LFIND EQUAL -1)
|
||||
endforeach(c ${components})
|
||||
|
||||
# If we're a component build and this component
|
||||
# isn't enabled, it's a definite off
|
||||
set(ENABLE_${pname} OFF)
|
||||
set(DISABLE_${pname} ON)
|
||||
endif (DEFINED BRLCAD_COMPONENTS)
|
||||
|
||||
# Check for ENABLE_ALL
|
||||
bext_enable_all_default(${pname} ${pname})
|
||||
|
||||
# Final decision
|
||||
set(ENABLE_${pname} ${ENABLE_${pname}} PARENT_SCOPE)
|
||||
set(DISABLE_${pname} ${DISABLE_${pname}} PARENT_SCOPE)
|
||||
endfunction(cad_enable pname components)
|
||||
|
||||
###############################################################################
|
||||
# The enable-disable-find logic for many dependencies follows a pattern. Try
|
||||
# to wrap that pattern up so we can more easily adjust it for multiple projects
|
||||
# simultaneously.
|
||||
###############################################################################
|
||||
macro(bext_enable pname)
|
||||
string(TOUPPER "${pname}" upname)
|
||||
#string(TOLOWER "${pname}" lpname)
|
||||
|
||||
bext_enable_all_default(${upname} ${pname})
|
||||
|
||||
if (NOT ENABLE_${upname} AND NOT DISABLE_${upname})
|
||||
|
||||
# This is an optional probe: a "not found" result is the normal, expected
|
||||
# path that simply turns on the local build below, and the configure
|
||||
# summary already reports which packages are built locally vs. found on the
|
||||
# system. Pass QUIET so a missing package does not emit CMake's verbose
|
||||
# "could not find a package configuration file" warning, which is noise
|
||||
# here rather than something the developer needs to act on.
|
||||
find_package(${pname} QUIET)
|
||||
|
||||
if (NOT ${pname}_FOUND AND NOT DEFINED ENABLE_${upname})
|
||||
set(ENABLE_${upname} "ON" CACHE BOOL "Enable ${pname} build")
|
||||
endif (NOT ${pname}_FOUND AND NOT DEFINED ENABLE_${upname})
|
||||
|
||||
endif (NOT ENABLE_${upname} AND NOT DISABLE_${upname})
|
||||
set(ENABLE_${upname} "${ENABLE_${upname}}" CACHE BOOL "Enable ${pname} build")
|
||||
endmacro(bext_enable pname)
|
||||
|
||||
###############################################################################
|
||||
# Configure summary helpers
|
||||
###############################################################################
|
||||
macro(bext_enable_all_default enable_name summary_name)
|
||||
if (ENABLE_ALL AND NOT DEFINED ENABLE_${enable_name})
|
||||
set(ENABLE_${enable_name} ON)
|
||||
endif (ENABLE_ALL AND NOT DEFINED ENABLE_${enable_name})
|
||||
if (ENABLE_ALL AND ENABLE_${enable_name})
|
||||
string(TOUPPER "${summary_name}" bext_enable_all_tracking_name)
|
||||
string(REPLACE "-" "_" bext_enable_all_tracking_name "${bext_enable_all_tracking_name}")
|
||||
set(BEXT_ENABLE_ALL_FORCED_${bext_enable_all_tracking_name} ON CACHE INTERNAL "Project selected for local build while ENABLE_ALL is active")
|
||||
endif (ENABLE_ALL AND ENABLE_${enable_name})
|
||||
endmacro(bext_enable_all_default enable_name summary_name)
|
||||
|
||||
function(_bext_summary_append property_name value)
|
||||
get_property(values GLOBAL PROPERTY ${property_name})
|
||||
list(APPEND values "${value}")
|
||||
list(REMOVE_DUPLICATES values)
|
||||
set_property(GLOBAL PROPERTY ${property_name} "${values}")
|
||||
endfunction(_bext_summary_append property_name value)
|
||||
|
||||
function(_bext_summary_project_uses_local_build out pname upname)
|
||||
set(local_build FALSE)
|
||||
|
||||
if (TARGET ${upname}_BLD)
|
||||
set(local_build TRUE)
|
||||
endif (TARGET ${upname}_BLD)
|
||||
|
||||
if (DEFINED ENABLE_${upname} AND ENABLE_${upname})
|
||||
set(local_build TRUE)
|
||||
endif (DEFINED ENABLE_${upname} AND ENABLE_${upname})
|
||||
|
||||
if ("${pname}" STREQUAL "flexbison")
|
||||
if (TARGET FLEX_BLD OR TARGET BISON_BLD)
|
||||
set(local_build TRUE)
|
||||
endif (TARGET FLEX_BLD OR TARGET BISON_BLD)
|
||||
endif ("${pname}" STREQUAL "flexbison")
|
||||
|
||||
if ("${pname}" STREQUAL "qt")
|
||||
if (TARGET Qt6_BLD OR TARGET Qt6Svg_BLD)
|
||||
set(local_build TRUE)
|
||||
endif (TARGET Qt6_BLD OR TARGET Qt6Svg_BLD)
|
||||
endif ("${pname}" STREQUAL "qt")
|
||||
|
||||
if ("${pname}" STREQUAL "tk")
|
||||
if (TARGET TK_BLD)
|
||||
set(local_build TRUE)
|
||||
endif (TARGET TK_BLD)
|
||||
endif ("${pname}" STREQUAL "tk")
|
||||
|
||||
set(${out} ${local_build} PARENT_SCOPE)
|
||||
endfunction(_bext_summary_project_uses_local_build out pname upname)
|
||||
|
||||
function(_bext_summary_list_to_string out values)
|
||||
set(list_values ${values})
|
||||
if (list_values)
|
||||
list(SORT list_values)
|
||||
string(REPLACE ";" ", " rendered "${list_values}")
|
||||
else (list_values)
|
||||
set(rendered "none")
|
||||
endif (list_values)
|
||||
set(${out} "${rendered}" PARENT_SCOPE)
|
||||
endfunction(_bext_summary_list_to_string out values)
|
||||
|
||||
function(bext_print_configure_summary)
|
||||
set(active_groups)
|
||||
foreach(grp APPLESEED BRLCAD BRLCAD_EXTRA GDAL OSPRAY QT TCL)
|
||||
if (USE_${grp})
|
||||
list(APPEND active_groups ${grp})
|
||||
endif (USE_${grp})
|
||||
endforeach(grp APPLESEED BRLCAD BRLCAD_EXTRA GDAL OSPRAY QT TCL)
|
||||
|
||||
get_property(local_projects GLOBAL PROPERTY BEXT_SUMMARY_LOCAL_PROJECTS)
|
||||
get_property(system_projects GLOBAL PROPERTY BEXT_SUMMARY_SYSTEM_PROJECTS)
|
||||
get_property(skipped_projects GLOBAL PROPERTY BEXT_SUMMARY_SKIPPED_PROJECTS)
|
||||
get_property(forced_projects GLOBAL PROPERTY BEXT_SUMMARY_ENABLE_ALL_PROJECTS)
|
||||
|
||||
_bext_summary_list_to_string(active_groups_str "${active_groups}")
|
||||
_bext_summary_list_to_string(local_projects_str "${local_projects}")
|
||||
_bext_summary_list_to_string(system_projects_str "${system_projects}")
|
||||
_bext_summary_list_to_string(skipped_projects_str "${skipped_projects}")
|
||||
_bext_summary_list_to_string(forced_projects_str "${forced_projects}")
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "bext configure summary")
|
||||
message(STATUS " active USE_* groups: ${active_groups_str}")
|
||||
message(STATUS " local builds: ${local_projects_str}")
|
||||
message(STATUS " not built locally: ${system_projects_str}")
|
||||
if (ENABLE_ALL)
|
||||
message(STATUS " ENABLE_ALL local-build set: ${forced_projects_str}")
|
||||
endif (ENABLE_ALL)
|
||||
message(STATUS " skipped because group inactive: ${skipped_projects_str}")
|
||||
message(STATUS " bundled output root: ${CMAKE_BUNDLE_INSTALL_PREFIX}")
|
||||
message(STATUS " noinstall output root: ${CMAKE_NOBUNDLE_INSTALL_PREFIX}")
|
||||
message(STATUS "")
|
||||
endfunction(bext_print_configure_summary)
|
||||
|
||||
###############################################################################
|
||||
# The primary add_project function used to add individual dependency
|
||||
# directories.
|
||||
###############################################################################
|
||||
function(add_project pname)
|
||||
cmake_parse_arguments(A "" "" "GROUPS" ${ARGN})
|
||||
string(TOUPPER "${pname}" UPNAME)
|
||||
string(REPLACE "-" "_" UPNAME "${UPNAME}")
|
||||
if (NOT A_GROUPS)
|
||||
add_subdirectory(${pname})
|
||||
_bext_summary_project_uses_local_build(local_build ${pname} ${UPNAME})
|
||||
if (local_build)
|
||||
_bext_summary_append(BEXT_SUMMARY_LOCAL_PROJECTS ${pname})
|
||||
if (ENABLE_ALL AND BEXT_ENABLE_ALL_FORCED_${UPNAME})
|
||||
_bext_summary_append(BEXT_SUMMARY_ENABLE_ALL_PROJECTS ${pname})
|
||||
endif (ENABLE_ALL AND BEXT_ENABLE_ALL_FORCED_${UPNAME})
|
||||
else (local_build)
|
||||
_bext_summary_append(BEXT_SUMMARY_SYSTEM_PROJECTS ${pname})
|
||||
endif (local_build)
|
||||
set(${UPNAME}_ADDED 1 PARENT_SCOPE)
|
||||
return()
|
||||
endif (NOT A_GROUPS)
|
||||
set(is_added FALSE)
|
||||
foreach(grp ${A_GROUPS})
|
||||
if (USE_${grp})
|
||||
add_subdirectory(${pname})
|
||||
set(is_added TRUE)
|
||||
set(${UPNAME}_ADDED 1 PARENT_SCOPE)
|
||||
break()
|
||||
endif (USE_${grp})
|
||||
endforeach(grp ${A_GROUPS})
|
||||
if (is_added)
|
||||
_bext_summary_project_uses_local_build(local_build ${pname} ${UPNAME})
|
||||
if (local_build)
|
||||
_bext_summary_append(BEXT_SUMMARY_LOCAL_PROJECTS ${pname})
|
||||
if (ENABLE_ALL AND BEXT_ENABLE_ALL_FORCED_${UPNAME})
|
||||
_bext_summary_append(BEXT_SUMMARY_ENABLE_ALL_PROJECTS ${pname})
|
||||
endif (ENABLE_ALL AND BEXT_ENABLE_ALL_FORCED_${UPNAME})
|
||||
else (local_build)
|
||||
_bext_summary_append(BEXT_SUMMARY_SYSTEM_PROJECTS ${pname})
|
||||
endif (local_build)
|
||||
endif (is_added)
|
||||
if (NOT is_added)
|
||||
_bext_summary_append(BEXT_SUMMARY_SKIPPED_PROJECTS ${pname})
|
||||
if (ENABLE_${UPNAME})
|
||||
message("Disabling ${pname}")
|
||||
set(STALE_INSTALL_WARN TRUE PARENT_SCOPE)
|
||||
endif (ENABLE_${UPNAME})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E rm -rf ${CMAKE_BINARY_DIR}/${pname})
|
||||
unset(ENABLE_${UPNAME} CACHE)
|
||||
endif (NOT is_added)
|
||||
endfunction(add_project pname)
|
||||
|
||||
###############################################################################
|
||||
# Make the built-in clean target reset ExternalProject working state without
|
||||
# requiring a top-level CMake reconfigure. We preserve the generated control
|
||||
# files in STAMP_DIR and TMP_DIR, but remove the step marker files and any
|
||||
# generated source/build directories that can be safely recreated by the next
|
||||
# build.
|
||||
###############################################################################
|
||||
function(_bext_collect_subdirs out dir)
|
||||
set(dirs "${dir}")
|
||||
get_property(subdirs DIRECTORY "${dir}" PROPERTY SUBDIRECTORIES)
|
||||
foreach(subdir ${subdirs})
|
||||
_bext_collect_subdirs(child_dirs "${subdir}")
|
||||
list(APPEND dirs ${child_dirs})
|
||||
endforeach()
|
||||
set(${out} "${dirs}" PARENT_SCOPE)
|
||||
endfunction(_bext_collect_subdirs out dir)
|
||||
|
||||
function(_bext_path_is_in_build_tree out path)
|
||||
if (NOT path)
|
||||
set(${out} FALSE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(RELATIVE_PATH rel "${CMAKE_BINARY_DIR}" "${path}")
|
||||
if (IS_ABSOLUTE "${rel}" OR "${rel}" MATCHES "^\\.\\.")
|
||||
set(${out} FALSE PARENT_SCOPE)
|
||||
else()
|
||||
set(${out} TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction(_bext_path_is_in_build_tree out path)
|
||||
|
||||
function(_bext_register_extproject_clean ep_target)
|
||||
if (NOT TARGET ${ep_target})
|
||||
return()
|
||||
endif()
|
||||
|
||||
ExternalProject_Get_Property(${ep_target} SOURCE_DIR)
|
||||
set(ep_source_dir "${SOURCE_DIR}")
|
||||
ExternalProject_Get_Property(${ep_target} BINARY_DIR)
|
||||
set(ep_build_dir "${BINARY_DIR}")
|
||||
ExternalProject_Get_Property(${ep_target} STAMP_DIR)
|
||||
set(ep_stamp_dir "${STAMP_DIR}")
|
||||
|
||||
_bext_path_is_in_build_tree(ep_source_is_generated "${ep_source_dir}")
|
||||
_bext_path_is_in_build_tree(ep_build_is_generated "${ep_build_dir}")
|
||||
|
||||
set(clean_files
|
||||
"${ep_stamp_dir}/${ep_target}-mkdir"
|
||||
"${ep_stamp_dir}/${ep_target}-configure"
|
||||
"${ep_stamp_dir}/${ep_target}-build"
|
||||
"${ep_stamp_dir}/${ep_target}-install"
|
||||
"${ep_stamp_dir}/${ep_target}-done"
|
||||
)
|
||||
|
||||
# If the source tree is a generated copy in the build directory, remove it
|
||||
# and force the full download/update/patch pipeline to rerun on next build.
|
||||
if (ep_source_is_generated)
|
||||
list(APPEND clean_files
|
||||
"${ep_stamp_dir}/${ep_target}-download"
|
||||
"${ep_stamp_dir}/${ep_target}-update"
|
||||
"${ep_stamp_dir}/${ep_target}-patch"
|
||||
"${ep_source_dir}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Some wrappers use a separate generated binary directory outside the default
|
||||
# *_BLD-prefix/src tree (Qt is the main case.) If it lives in the build tree
|
||||
# and isn't the same path as SOURCE_DIR, it is safe to remove here.
|
||||
if (ep_build_is_generated AND NOT "${ep_build_dir}" STREQUAL "${ep_source_dir}")
|
||||
list(APPEND clean_files "${ep_build_dir}")
|
||||
endif()
|
||||
|
||||
list(REMOVE_DUPLICATES clean_files)
|
||||
set_property(TARGET ${ep_target} APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${clean_files}")
|
||||
if (TARGET ${ep_target}-install)
|
||||
set_property(TARGET ${ep_target}-install APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${clean_files}")
|
||||
endif()
|
||||
endfunction(_bext_register_extproject_clean ep_target)
|
||||
|
||||
function(register_external_project_clean_targets)
|
||||
_bext_collect_subdirs(all_dirs "${CMAKE_SOURCE_DIR}")
|
||||
list(REMOVE_DUPLICATES all_dirs)
|
||||
foreach(dir ${all_dirs})
|
||||
get_property(dir_targets DIRECTORY "${dir}" PROPERTY BUILDSYSTEM_TARGETS)
|
||||
foreach(dir_target ${dir_targets})
|
||||
if ("${dir_target}" MATCHES "_BLD$")
|
||||
_bext_register_extproject_clean("${dir_target}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction(register_external_project_clean_targets)
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
+594
-210
@@ -23,7 +23,7 @@
|
||||
# still possible to request a system library in individual cases.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(BEXT)
|
||||
|
||||
@@ -76,6 +76,27 @@ mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
|
||||
# Frameworks are deprecated in CMake, so avoid finding them
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Check if our working directory is in a symlinked path - that can cause some
|
||||
# serious problems for things like install and rpath updating when it comes
|
||||
# time to integrate into a build, so be loud.
|
||||
set(PROBLEM_PATH 0)
|
||||
file(REAL_PATH "${PROJECT_SOURCE_DIR}" PROJECT_REAL_SOURCE_DIR)
|
||||
if (NOT "${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_REAL_SOURCE_DIR}")
|
||||
message(WARNING "PROJECT_SOURCE_DIR is \"${PROJECT_SOURCE_DIR}\" but REAL_PATH is \"${PROJECT_REAL_SOURCE_DIR}\". Working with a symlinked alias path causes problems in subsequent file processing and is NOT recommended.")
|
||||
set(PROBLEM_PATH 1)
|
||||
endif()
|
||||
file(REAL_PATH "${PROJECT_BINARY_DIR}" PROJECT_REAL_BINARY_DIR)
|
||||
if (NOT "${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_REAL_BINARY_DIR}")
|
||||
message(WARNING "PROJECT_BINARY_DIR is \"${PROJECT_BINARY_DIR}\" but REAL_PATH is \"${PROJECT_REAL_BINARY_DIR}\". Working with a symlinked alias path causes problems in subsequent file processing and is NOT recommended.")
|
||||
set(PROBLEM_PATH 1)
|
||||
endif()
|
||||
if (PROBLEM_PATH)
|
||||
find_program(SLEEP_EXEC sleep)
|
||||
if(SLEEP_EXEC)
|
||||
execute_process(COMMAND ${SLEEP_EXEC} 15)
|
||||
endif(SLEEP_EXEC)
|
||||
endif(PROBLEM_PATH)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Once we do a run, we want our ENABLE_ALL setting to be consistent in
|
||||
@@ -102,6 +123,11 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
|
||||
# If the user hasn't specified it otherwise, build the static libraries too
|
||||
if (NOT DEFINED BUILD_STATIC_LIBS)
|
||||
set(BUILD_STATIC_LIBS ON)
|
||||
endif (NOT DEFINED BUILD_STATIC_LIBS)
|
||||
|
||||
# Define some variables
|
||||
if(NOT DEFINED BIN_DIR)
|
||||
set(BIN_DIR bin)
|
||||
@@ -169,6 +195,61 @@ endif (EXT_BUILD_VERBOSE)
|
||||
# ExternalProject_Add feature to manage 3rd party builds
|
||||
include(ExternalProject)
|
||||
|
||||
# ExternalProject source convention:
|
||||
# * Use SOURCE_DIR for an existing submodule built directly in place when no
|
||||
# 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 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.
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# CMake 4.0 removed support for cmake_minimum_required(VERSION < 3.5), but a
|
||||
# number of our bundled third party projects still declare such old minimums.
|
||||
# Because each dependency is configured as an independent ExternalProject
|
||||
# sub-build (a separate cmake invocation), a top level CMAKE_POLICY_VERSION_MINIMUM
|
||||
# setting - whether on the command line or from a CMakePresets cache variable -
|
||||
# does NOT reach those sub-builds. To make old dependencies configure regardless
|
||||
# of how bext itself is invoked, establish a default policy floor here and wrap
|
||||
# ExternalProject_Add so that every CMake-based sub-build is configured with it.
|
||||
#
|
||||
# The flag is inserted as the first CMAKE_ARGS value so it always lands inside
|
||||
# the CMAKE_ARGS group regardless of which ExternalProject keywords follow.
|
||||
# Sub-builds that drive a non-CMake configure (i.e. have no CMAKE_ARGS) are left
|
||||
# untouched. Defining a command that already exists makes the original available
|
||||
# under the same name with a leading underscore, a documented CMake behavior.
|
||||
if (NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||
endif (NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
||||
|
||||
function(ExternalProject_Add name)
|
||||
# Rebuild the call as a string of bracket-quoted arguments so that empty
|
||||
# arguments (e.g. CONFIGURE_COMMAND "") and values containing spaces,
|
||||
# semicolons or generator expressions are all preserved exactly. Inject the
|
||||
# policy floor immediately after the CMAKE_ARGS token so it becomes the first
|
||||
# CMAKE_ARGS value.
|
||||
set(ep_call "_ExternalProject_Add([==[${name}]==]")
|
||||
if (ARGC GREATER 1)
|
||||
math(EXPR ep_last "${ARGC} - 1")
|
||||
foreach(ep_i RANGE 1 ${ep_last})
|
||||
string(APPEND ep_call " [==[${ARGV${ep_i}}]==]")
|
||||
if ("${ARGV${ep_i}}" STREQUAL "CMAKE_ARGS")
|
||||
string(APPEND ep_call " [==[-DCMAKE_POLICY_VERSION_MINIMUM=${CMAKE_POLICY_VERSION_MINIMUM}]==]")
|
||||
endif ("${ARGV${ep_i}}" STREQUAL "CMAKE_ARGS")
|
||||
endforeach(ep_i RANGE 1 ${ep_last})
|
||||
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
|
||||
# flag to a build system, check our processor count
|
||||
include(ProcessorCount)
|
||||
@@ -178,6 +259,14 @@ if (NOT pcnt)
|
||||
set(pcnt 1)
|
||||
endif (NOT pcnt)
|
||||
|
||||
# External projects driven by a direct make invocation set their own -j value
|
||||
# below. Do not also pass down the top-level generator's jobserver state:
|
||||
# GNU make encodes it in MAKEFLAGS using options that other make variants
|
||||
# (notably FreeBSD make) do not understand.
|
||||
set(BEXT_MAKE_COMMAND
|
||||
${CMAKE_COMMAND} -E env --unset=MAKEFLAGS --unset=MFLAGS make
|
||||
)
|
||||
|
||||
# We want to pass the build type option to CMake builds if we're not using a
|
||||
# multiconfig generator - define a variable that will either be empty or define
|
||||
# the desired CMake line based on GENERATOR_IS_MULTI_CONFIG (see
|
||||
@@ -188,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}")
|
||||
@@ -202,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}")
|
||||
@@ -214,107 +313,28 @@ 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
|
||||
# the user about this.
|
||||
set(STALE_INSTALL_WARN FALSE)
|
||||
|
||||
# Gather graph generation inputs from the existing source-of-truth files.
|
||||
file(GLOB BEXT_GRAPH_PROJECT_FILES
|
||||
RELATIVE "${CMAKE_SOURCE_DIR}"
|
||||
"*/*.deps"
|
||||
"*/CMakeLists.txt"
|
||||
)
|
||||
list(REMOVE_DUPLICATES BEXT_GRAPH_PROJECT_FILES)
|
||||
list(SORT BEXT_GRAPH_PROJECT_FILES)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# It is common for more complex targets to need to key build settings off of
|
||||
# whether or not their dependencies are being built locally. These macros are
|
||||
# used to cut down on boilerplate code
|
||||
# Include some utility macros and functions to reduce boilerplate code needed
|
||||
# in dependency CMakeLists.txt files
|
||||
###############################################################################
|
||||
configure_file("${CMAKE_SOURCE_DIR}/dependencies.dot" "${CMAKE_BINARY_DIR}/bext.dot" COPYONLY)
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils.cmake")
|
||||
|
||||
macro(TargetVars roots)
|
||||
foreach(root ${${roots}})
|
||||
if (NOT ${root}_ADDED)
|
||||
message(FATAL_ERROR "${root} is listed as a dependency but is not yet added - fix project ordering in top level CMakeLists.txt file")
|
||||
endif (NOT ${root}_ADDED)
|
||||
if (TARGET ${root}_BLD)
|
||||
set(${root}_TARGET 1)
|
||||
endif (TARGET ${root}_BLD)
|
||||
endforeach(root ${${roots}})
|
||||
endmacro(TargetVars root)
|
||||
|
||||
|
||||
###
|
||||
# Loads dependencies from an in-src file named same as containing
|
||||
# directory with .deps suffix. Dependencies are added to the
|
||||
# corresponding ${proot}_DEPENDS variable.
|
||||
#
|
||||
# FIXME: Dependencies are also added here to a .dot file dependency
|
||||
# graph file, but that shouldn't be intertwined here as side effect.
|
||||
###
|
||||
macro(RegisterDeps proot)
|
||||
get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps")
|
||||
message(FATAL_ERROR "No ${dirname}.deps file found in ${CMAKE_CURRENT_SOURCE_DIR}/")
|
||||
endif (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps")
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/${dirname}.deps" DEP_LINES)
|
||||
string(TOLOWER "${proot}" lr)
|
||||
|
||||
# Add each dependency to this directory's _DEPENDS list
|
||||
foreach(dl ${DEP_LINES})
|
||||
set(${proot}_DEPENDS ${${proot}_DEPENDS} ${dl})
|
||||
endforeach(dl ${DEP_LINES})
|
||||
|
||||
# Add all dependencies to the global ALL_DEPENDENCIES list
|
||||
get_property(ALL_DEPS GLOBAL PROPERTY ALL_DEPENDENCIES)
|
||||
set(ALL_DEPS ${ALL_DEPS} ${${proot}_DEPENDS})
|
||||
list(SORT ALL_DEPS)
|
||||
list(REMOVE_DUPLICATES ALL_DEPS)
|
||||
set_property(GLOBAL PROPERTY ALL_DEPENDENCIES ${ALL_DEPS})
|
||||
|
||||
# Set the TARGET variables for CMake generator expression "if" tests
|
||||
TargetVars(${proot}_DEPENDS)
|
||||
|
||||
# Add each dependency to a global .dot file
|
||||
foreach(dl ${DEP_LINES})
|
||||
string(TOLOWER "${dl}" ldl)
|
||||
if (NOT "${ldl}" STREQUAL "patch")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/bext.dot" "\t${lr} -> ${ldl};\n")
|
||||
endif (NOT "${ldl}" STREQUAL "patch")
|
||||
endforeach(dl ${DEP_LINES})
|
||||
|
||||
endmacro(RegisterDeps)
|
||||
|
||||
macro(TargetInstallDeps croot roots)
|
||||
foreach(root ${${roots}})
|
||||
if (TARGET ${root}_BLD)
|
||||
ExternalProject_Add_stepdependencies(${croot}_BLD configure ${root}_BLD-install)
|
||||
endif (TARGET ${root}_BLD)
|
||||
endforeach(root ${${root}})
|
||||
endmacro(TargetInstallDeps root)
|
||||
|
||||
###############################################################################
|
||||
# We're using submodules to avoid automatically having to download a huge
|
||||
# amount of source code if it isn't needed. Define a convenience function
|
||||
# to use in the project to populate the submodule checkouts if needed.
|
||||
###############################################################################
|
||||
function(git_submodule_init path checkfile)
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${path}/${checkfile})
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
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)
|
||||
endif (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${path}/${checkfile})
|
||||
endfunction(git_submodule_init path)
|
||||
|
||||
###############################################################################
|
||||
# There are a large number of external packages that may need to be built -
|
||||
@@ -333,105 +353,21 @@ option(USE_OSPRAY "OSPRay rendering system" OFF)
|
||||
option(USE_QT "Qt graphical toolkit support" ON)
|
||||
option(USE_TCL "Tcl/Tk support" ON)
|
||||
|
||||
# If we're using BRLCAD_COMPONENTS, the check is more nuanced.
|
||||
# For bext, the BRLCAD_COMPONENTS list should be the expanded
|
||||
# list from BRL-CAD's parent logic that fully populates the
|
||||
# dependencies, not just the components directly specified by
|
||||
# the user to BRL-CAD's configure.
|
||||
function(cad_enable pname components)
|
||||
if (DEFINED BRLCAD_COMPONENTS)
|
||||
# In case the component list changed, make sure we're
|
||||
# not using a cached result.
|
||||
unset(ENABLE_${pname} CACHE)
|
||||
unset(DISABLE_${pname} CACHE)
|
||||
# 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 ()
|
||||
|
||||
set(acomponents ${components})
|
||||
|
||||
# Look for a component in the list
|
||||
foreach(c ${BRLCAD_COMPONENTS})
|
||||
list(FIND acomponents ${c} LFIND)
|
||||
if (NOT LFIND EQUAL -1)
|
||||
if (ENABLE_ALL AND NOT DEFINED ENABLE_${pname})
|
||||
set(ENABLE_${pname} ON PARENT_SCOPE)
|
||||
endif (ENABLE_ALL AND NOT DEFINED ENABLE_${pname})
|
||||
set(DISABLE_${pname} OFF PARENT_SCOPE)
|
||||
return()
|
||||
endif (NOT LFIND EQUAL -1)
|
||||
endforeach(c ${components})
|
||||
|
||||
# If we're a component build and this component
|
||||
# isn't enabled, it's a definite off
|
||||
set(ENABLE_${pname} OFF)
|
||||
set(DISABLE_${pname} ON)
|
||||
endif (DEFINED BRLCAD_COMPONENTS)
|
||||
|
||||
# Check for ENABLE_ALL
|
||||
if (ENABLE_ALL AND NOT DEFINED ENABLE_${pname})
|
||||
set(ENABLE_${pname} ON)
|
||||
endif (ENABLE_ALL AND NOT DEFINED ENABLE_${pname})
|
||||
|
||||
# Final decision
|
||||
set(ENABLE_${pname} ${ENABLE_${pname}} PARENT_SCOPE)
|
||||
set(DISABLE_${pname} ${DISABLE_${pname}} PARENT_SCOPE)
|
||||
endfunction(cad_enable pname components)
|
||||
|
||||
# The enable-disable-find logic for a lot of these follows a
|
||||
# pattern. Try to wrap that pattern up so we can more easily
|
||||
# adjust it for multiple projects simultaneously.
|
||||
macro(bext_enable pname)
|
||||
string(TOUPPER "${pname}" upname)
|
||||
#string(TOLOWER "${pname}" lpname)
|
||||
|
||||
if (ENABLE_ALL AND NOT DEFINED ENABLE_${upname})
|
||||
set(ENABLE_${upname} ON)
|
||||
endif (ENABLE_ALL AND NOT DEFINED ENABLE_${upname})
|
||||
|
||||
if (NOT ENABLE_${upname} AND NOT DISABLE_${upname})
|
||||
|
||||
find_package(${pname})
|
||||
|
||||
if (NOT ${pname}_FOUND AND NOT DEFINED ENABLE_${upname})
|
||||
set(ENABLE_${upname} "ON" CACHE BOOL "Enable ${pname} build")
|
||||
endif (NOT ${pname}_FOUND AND NOT DEFINED ENABLE_${upname})
|
||||
|
||||
endif (NOT ENABLE_${upname} AND NOT DISABLE_${upname})
|
||||
set(ENABLE_${upname} "${ENABLE_${upname}}" CACHE BOOL "Enable ${pname} build")
|
||||
endmacro(bext_enable pname)
|
||||
|
||||
|
||||
# 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.
|
||||
# Warn the user of this
|
||||
set(STALE_INSTALL_WARN FALSE)
|
||||
|
||||
function(add_project pname)
|
||||
cmake_parse_arguments(A "" "" "GROUPS" ${ARGN})
|
||||
string(TOUPPER "${pname}" UPNAME)
|
||||
string(REPLACE "-" "_" UPNAME "${UPNAME}")
|
||||
if (NOT A_GROUPS)
|
||||
add_subdirectory(${pname})
|
||||
set(${UPNAME}_ADDED 1 PARENT_SCOPE)
|
||||
return()
|
||||
endif (NOT A_GROUPS)
|
||||
set(is_added FALSE)
|
||||
foreach(grp ${A_GROUPS})
|
||||
if (USE_${grp})
|
||||
add_subdirectory(${pname})
|
||||
set(is_added TRUE)
|
||||
set(${UPNAME}_ADDED 1 PARENT_SCOPE)
|
||||
break()
|
||||
endif (USE_${grp})
|
||||
endforeach(grp ${A_GROUPS})
|
||||
if (NOT is_added)
|
||||
if (ENABLE_${UPNAME})
|
||||
message("Disabling ${pname}")
|
||||
set(STALE_INSTALL_WARN TRUE PARENT_SCOPE)
|
||||
endif (ENABLE_${UPNAME})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E rm -rf ${CMAKE_BINARY_DIR}/${pname})
|
||||
unset(ENABLE_${UPNAME} CACHE)
|
||||
endif (NOT is_added)
|
||||
endfunction(add_project pname)
|
||||
|
||||
###############################################################################
|
||||
# Python is a build-time dependency for both LLVM and ISPC. I think
|
||||
@@ -460,13 +396,460 @@ if (USE_OSPRAY)
|
||||
endif (USE_OSPRAY)
|
||||
|
||||
###############################################################################
|
||||
# There are a lot of individual projects, and their ordering is important. We
|
||||
# store them as a separate file.
|
||||
# Applying patch files cross platform is a challenging problem due to the
|
||||
# shortage of portable tools and issues with LF vs CRLF files - see
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/16854 for more background on
|
||||
# this. We need to address the patch build tool first thing, since any of the
|
||||
# other ExternalProject_Add builds that follow may depend on it.
|
||||
###############################################################################
|
||||
include("${CMAKE_SOURCE_DIR}/dependencies.cmake")
|
||||
add_project(patch)
|
||||
|
||||
# Now that we have the dependencies specified, finish the dependencies DOT file
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/bext.dot" "\n}\n")
|
||||
###############################################################################
|
||||
# Although we have bundled flex and bison programs, they can be problematic to
|
||||
# build - they require working Autotools tool chains (except on Windows where
|
||||
# we have winflexbison). We therefore attempt these builds only if we need to.
|
||||
# This check must come after the patch subdirectory, since if we DO add_project
|
||||
# the flexbison directory it will need the patch executable.
|
||||
###############################################################################
|
||||
if (USE_APPLESEED OR USE_OSPRAY)
|
||||
|
||||
if (ENABLE_ALL)
|
||||
if (NOT DEFINED ENABLE_BISON)
|
||||
set(ENABLE_BISON ON)
|
||||
endif (NOT DEFINED ENABLE_BISON)
|
||||
endif (ENABLE_ALL)
|
||||
|
||||
if (NOT ENABLE_FLEX)
|
||||
find_package(FLEX 2.6)
|
||||
|
||||
if (NOT FLEX_FOUND AND NOT DEFINED ENABLE_FLEX)
|
||||
set(ENABLE_FLEX ON)
|
||||
endif (NOT FLEX_FOUND AND NOT DEFINED ENABLE_FLEX)
|
||||
endif (NOT ENABLE_FLEX)
|
||||
|
||||
if (NOT ENABLE_BISON)
|
||||
find_package(BISON 3.0)
|
||||
|
||||
if (NOT BISON_FOUND AND NOT DEFINED ENABLE_BISON)
|
||||
set(ENABLE_BISON ON)
|
||||
endif (NOT BISON_FOUND AND NOT DEFINED ENABLE_BISON)
|
||||
endif (NOT ENABLE_BISON)
|
||||
|
||||
if (ENABLE_FLEX OR ENABLE_BISON)
|
||||
add_project(flexbison GROUPS "APPLESEED;OSPRAY")
|
||||
endif (ENABLE_FLEX OR ENABLE_BISON)
|
||||
|
||||
# Whether or not we actually added the subdirectories, let subsequent targets
|
||||
# know we have handled the FLEX and BISON dependencies. Some will list these
|
||||
# as potential build targets, since we may try to compile them, but as the
|
||||
# default orientation for these is "build only if we have to" the find
|
||||
# process itself needs to satisfy the check.
|
||||
set(FLEX_ADDED 1)
|
||||
set(BISON_ADDED 1)
|
||||
|
||||
endif (USE_APPLESEED OR USE_OSPRAY)
|
||||
|
||||
###############################################################################
|
||||
# Build tools are used during compilation, but are not bundled or distributed
|
||||
# with binary packages. We group these tools here for convenience. Unlike the
|
||||
# build targets intended for distribution, these outputs are all
|
||||
# targeted to the noinstall subdirectory.
|
||||
###############################################################################
|
||||
add_project(astyle GROUPS "BRLCAD")
|
||||
add_project(lemon GROUPS "BRLCAD")
|
||||
add_project(re2c GROUPS "BRLCAD")
|
||||
add_project(perplex GROUPS "BRLCAD")
|
||||
add_project(strclear GROUPS "BRLCAD")
|
||||
|
||||
# RPATH editing - LIEF has the core capabilities, and plief exposes them via
|
||||
# a command line utility with patchelf compatible options, so we can drop
|
||||
# either patchelf or plief into our upstream workflows.
|
||||
add_project(lief GROUPS "BRLCAD")
|
||||
add_project(plief 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
|
||||
# to use our bundled zlib if it is enabled.) Developers adding, reordering or
|
||||
# removing dependencies here need to make sure they are aware of impact they
|
||||
# may be having on other external projects in other files.
|
||||
###############################################################################
|
||||
|
||||
# zlib compression/decompression library
|
||||
# https://zlib.net
|
||||
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
|
||||
add_project(zstd GROUPS "APPLESEED;OSPRAY")
|
||||
|
||||
# minizip-ng - zip manipulation library written in C
|
||||
# https://github.com/zlib-ng/minizip-ng
|
||||
add_project(minizip-ng GROUPS "APPLESEED")
|
||||
|
||||
# LZ4 - lossless compression algorithm
|
||||
# https://github.com/lz4/lz4
|
||||
add_project(lz4 GROUPS "APPLESEED")
|
||||
|
||||
# libdeflate fast, whole-buffer DEFLATE-based compression
|
||||
# https://github.com/ebiggers/libdeflate
|
||||
add_project(deflate GROUPS "APPLESEED")
|
||||
|
||||
# fmt - formatting library providing an alternative to C++ iostreams
|
||||
# https://github.com/fmtlib/fmt
|
||||
add_project(fmt GROUPS "APPLESEED")
|
||||
|
||||
# yaml-cpp - YAML parser and emitter in C++ matching the YAML 1.2 spec
|
||||
# https://github.com/jbeder/yaml-cpp
|
||||
add_project(yaml-cpp GROUPS "APPLESEED")
|
||||
|
||||
# pystring - collection of C++ functions which match the interface and behavior
|
||||
# of python's string class methods
|
||||
# https://github.com/imageworks/pystring
|
||||
add_project(pystring GROUPS "APPLESEED")
|
||||
|
||||
# Henry Spencer's regular expression matching library
|
||||
# https://github.com/BRL-CAD/regex
|
||||
add_project(regex GROUPS "BRLCAD")
|
||||
|
||||
# expat - library for parsing XML 1.0 Fourth Edition
|
||||
# https://github.com/libexpat/libexpat
|
||||
add_project(expat GROUPS "APPLESEED")
|
||||
|
||||
# International Components for Unicode
|
||||
# https://github.com/unicode-org/icu
|
||||
add_project(icu GROUPS "APPLESEED")
|
||||
|
||||
# Xerces-C++ - a validating XML parser
|
||||
# https://xerces.apache.org/xerces-c/
|
||||
add_project(xerces-c GROUPS "APPLESEED")
|
||||
|
||||
# Boost - C++ libraries
|
||||
# https://www.boost.org
|
||||
# https://github.com/boostorg/boost
|
||||
add_project(boost GROUPS "APPLESEED")
|
||||
|
||||
# netpbm library - support for pnm,ppm,pbm, etc. image files
|
||||
# http://netpbm.sourceforge.net/
|
||||
add_project(netpbm GROUPS "BRLCAD")
|
||||
|
||||
# libjpeg-turbo - JPEG image codec
|
||||
# https://github.com/libjpeg-turbo/libjpeg-turbo
|
||||
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;TCL")
|
||||
|
||||
# libtiff - Tag Image File Format (TIFF) support
|
||||
# https://libtiff.gitlab.io/libtiff/
|
||||
# https://gitlab.com/libtiff/libtiff
|
||||
add_project(tiff GROUPS "APPLESEED;GDAL")
|
||||
|
||||
# OpenEXR - EXR image storage format
|
||||
# https://openexr.com/
|
||||
# https://github.com/AcademySoftwareFoundation/openexr
|
||||
add_project(openexr GROUPS "APPLESEED")
|
||||
|
||||
# OpenColorIO - color management
|
||||
# https://opencolorio.org
|
||||
# https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||
# Note - the VFX Reference Platform (https://vfxplatform.com/)
|
||||
# is a useful reference for what versions to expect elements
|
||||
# of the rendering pipeline software stack to use/require
|
||||
add_project(opencolorio GROUPS "APPLESEED")
|
||||
|
||||
# OpenImageIO - reading and writing images, aimed at VFX studios
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
add_project(openimageio GROUPS "APPLESEED")
|
||||
|
||||
# ncurses - text-based user interfaces library
|
||||
# https://invisible-island.net/ncurses/
|
||||
add_project(ncurses GROUPS "OSPRAY")
|
||||
|
||||
# Lightning Memory-Mapped Database
|
||||
# https://github.com/LMDB/lmdb
|
||||
add_project(lmdb GROUPS "BRLCAD")
|
||||
|
||||
# Eigen - linear algebra library
|
||||
# https://eigen.tuxfamily.org
|
||||
add_project(eigen GROUPS "BRLCAD;APPLESEED")
|
||||
|
||||
# oneTBB - Threading Building Blocks
|
||||
# https://github.com/oneapi-src/oneTBB
|
||||
add_project(onetbb GROUPS "APPLESEED;OSPRAY;BRLCAD")
|
||||
|
||||
# rkcommon - C++ infrastructure and CMake utilities
|
||||
# https://github.com/ospray/rkcommon
|
||||
add_project(rkcommon GROUPS "OSPRAY")
|
||||
|
||||
# ISPC - Implicit SPMD Program Compiler
|
||||
# https://ispc.github.io
|
||||
# https://github.com/ispc/ispc
|
||||
add_project(ispc GROUPS "OSPRAY")
|
||||
|
||||
# STEPcode - support for reading and writing STEP files
|
||||
# https://github.com/stepcode/stepcode
|
||||
add_project(stepcode GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# SQLITE3 - embeddable database
|
||||
# https://www.sqlite.org
|
||||
add_project(sqlite3 GROUPS "GDAL")
|
||||
|
||||
# PROJ - generic coordinate transformation
|
||||
# https://proj.org
|
||||
add_project(proj GROUPS "GDAL")
|
||||
|
||||
# GDAL - translator library for raster and vector geospatial data formats
|
||||
# https://gdal.org
|
||||
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")
|
||||
|
||||
# tinygltf - tiny glTF library(loader/saver)
|
||||
# https://github.com/syoyo/tinygltf
|
||||
add_project(tinygltf GROUPS "BRLCAD")
|
||||
|
||||
# pugixml - a light-weight C++ XML processing library
|
||||
# https://pugixml.org/
|
||||
add_project(pugixml GROUPS "BRLCAD;APPLESEED")
|
||||
|
||||
# Open Asset Import Library - library for supporting I/O for a number of
|
||||
# Geometry file formats
|
||||
# https://github.com/assimp/assimp
|
||||
add_project(assetimport GROUPS "BRLCAD")
|
||||
|
||||
# OpenCV - Open Source Computer Vision Library
|
||||
# http://opencv.org
|
||||
add_project(opencv GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# Clipper2 - A Polygon Clipping and Offsetting library
|
||||
# https://github.com/AngusJohnson/Clipper2
|
||||
add_project(clipper2 GROUPS "BRLCAD")
|
||||
|
||||
# GeometricTools - a collection of geometry algorithms.
|
||||
# https://github.com/davideberly/GeometricTools
|
||||
add_project(gte GROUPS "BRLCAD")
|
||||
|
||||
# Adaptive Multigrid Solvers - Poisson Surface Reconstruction code.
|
||||
# https://github.com/mkazhdan/PoissonRecon
|
||||
add_project(poissonrecon GROUPS "BRLCAD")
|
||||
|
||||
# mmesh - mesh decimation and processing library.
|
||||
# https://github.com/BRL-CAD/mmesh
|
||||
add_project(mmesh GROUPS "BRLCAD")
|
||||
|
||||
# Manifold Library - used for performing boolean ops on meshes
|
||||
# https://github.com/elalish/manifold
|
||||
add_project(manifold GROUPS "BRLCAD")
|
||||
|
||||
# openNURBS - Non-Uniform Rational BSpline library
|
||||
# https://github.com/mcneel/opennurbs
|
||||
add_project(opennurbs GROUPS "BRLCAD")
|
||||
|
||||
# OSMesa - Off Screen Mesa Rendering Library
|
||||
# https://github.com/starseeker/osmesa
|
||||
add_project(osmesa GROUPS "BRLCAD")
|
||||
|
||||
# Bullet3 - collision detection/multi-physics simulation library
|
||||
# https://github.com/bulletphysics/bullet3
|
||||
add_project(bullet GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# Open Shading Language (OSL) - language for programmable shading
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
#
|
||||
# TODO - need to check if https://github.com/lexxmark/winflexbison will
|
||||
# work for Windows for OSL's usage of flex/bison...
|
||||
add_project(osl GROUPS "APPLESEED")
|
||||
|
||||
# Embree raytracing kernel
|
||||
# https://github.com/embree/embree
|
||||
add_project(embree GROUPS "APPLESEED;OSPRAY")
|
||||
|
||||
# TCL - scripting language. For Tcl/Tk builds we want
|
||||
# static lib building on so we get the stub libraries.
|
||||
# https://www.tcl.tk
|
||||
set(TCL_ENABLE_TK ON CACHE BOOL "enable tk")
|
||||
# Tcl 8.6.18 bundles Itcl 4.3.7. Itk remains a separate upstream project.
|
||||
# Keep the compatibility floors distinct from the bundled versions so a newer
|
||||
# system installation can be used without changing the versions we ship.
|
||||
set(BEXT_ITCL_MIN_VERSION "4.3.0")
|
||||
set(BEXT_ITCL_BUNDLED_VERSION "4.3.7")
|
||||
set(BEXT_ITCL_BUNDLED_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/tcl/tcl/pkgs/itcl${BEXT_ITCL_BUNDLED_VERSION}"
|
||||
)
|
||||
set(BEXT_ITK_MIN_VERSION "4.2.3")
|
||||
set(BEXT_ITK_BUNDLED_VERSION "4.2.7")
|
||||
set(BEXT_TK_COMPONENTS "archer;mged;bwish;rtwizard;brlman")
|
||||
add_project(tcl GROUPS "TCL")
|
||||
add_project(tk GROUPS "TCL")
|
||||
add_project(itk GROUPS "TCL")
|
||||
add_project(iwidgets GROUPS "TCL")
|
||||
add_project(tkhtml GROUPS "TCL")
|
||||
add_project(tktable GROUPS "TCL")
|
||||
|
||||
# Qt - cross-platform user interface/application development toolkit
|
||||
# https://download.qt.io/archive/qt
|
||||
add_project(qt GROUPS "QT")
|
||||
|
||||
# Appleseed - global illumination rendering engine
|
||||
# https://github.com/appleseedhq/appleseed
|
||||
add_project(appleseed GROUPS "APPLESEED")
|
||||
|
||||
# Open Image Denoise - AI denoiser used by OSPRay's denoiser module
|
||||
# https://github.com/RenderKit/oidn
|
||||
add_project(oidn GROUPS "OSPRAY")
|
||||
|
||||
# OSPRay - ray tracing engine
|
||||
# https://github.com/ospray/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.
|
||||
###############################################################################
|
||||
register_external_project_clean_targets()
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Generate the dependency graph from the existing build metadata. The DOT file
|
||||
# is always emitted during the normal build, and rendered forms are generated
|
||||
# too when Graphviz's dot tool is available.
|
||||
###############################################################################
|
||||
find_program(GRAPHVIZ_DOT_EXECUTABLE dot)
|
||||
set(BEXT_GRAPH_OUTPUTS
|
||||
"${CMAKE_BINARY_DIR}/bext.dot"
|
||||
"${CMAKE_BINARY_DIR}/bext.svg"
|
||||
)
|
||||
if (GRAPHVIZ_DOT_EXECUTABLE)
|
||||
list(APPEND BEXT_GRAPH_OUTPUTS
|
||||
"${CMAKE_BINARY_DIR}/bext.png"
|
||||
"${CMAKE_BINARY_DIR}/bext.pdf"
|
||||
)
|
||||
endif ()
|
||||
|
||||
set(BEXT_GRAPH_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/CMake/GenerateDepsGraph.cmake"
|
||||
"${CMAKE_SOURCE_DIR}/CMakeLists.txt"
|
||||
"${CMAKE_SOURCE_DIR}/.gitmodules"
|
||||
)
|
||||
foreach(graph_input ${BEXT_GRAPH_PROJECT_FILES})
|
||||
list(APPEND BEXT_GRAPH_DEPENDS "${CMAKE_SOURCE_DIR}/${graph_input}")
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${BEXT_GRAPH_OUTPUTS}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBEXT_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DBEXT_BINARY_DIR=${CMAKE_BINARY_DIR}
|
||||
-DGRAPHVIZ_DOT_EXECUTABLE=${GRAPHVIZ_DOT_EXECUTABLE}
|
||||
-DBEXT_RENDER_png=$<BOOL:${GRAPHVIZ_DOT_EXECUTABLE}>
|
||||
-DBEXT_RENDER_pdf=$<BOOL:${GRAPHVIZ_DOT_EXECUTABLE}>
|
||||
-P ${CMAKE_SOURCE_DIR}/CMake/GenerateDepsGraph.cmake
|
||||
DEPENDS ${BEXT_GRAPH_DEPENDS}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(deps_graph ALL DEPENDS ${BEXT_GRAPH_OUTPUTS})
|
||||
|
||||
# Validate the derived dependency inventory and ensure the checked-in reference
|
||||
# table matches it. Updating documentation is explicit because normal builds
|
||||
# must not modify the source tree.
|
||||
add_custom_target(check_dependency_metadata
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBEXT_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DBEXT_DOC_MODE=CHECK
|
||||
-P ${CMAKE_SOURCE_DIR}/CMake/GenerateDependencyDocs.cmake
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(update_dependency_docs
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBEXT_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DBEXT_DOC_MODE=WRITE
|
||||
-P ${CMAKE_SOURCE_DIR}/CMake/GenerateDependencyDocs.cmake
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
set(BEXT_SBOM_OUTPUT "${CMAKE_BINARY_DIR}/bext.spdx.json")
|
||||
add_custom_command(
|
||||
OUTPUT "${BEXT_SBOM_OUTPUT}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBEXT_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DBEXT_SBOM_OUTPUT=${BEXT_SBOM_OUTPUT}
|
||||
-P ${CMAKE_SOURCE_DIR}/CMake/GenerateSbom.cmake
|
||||
DEPENDS
|
||||
${CMAKE_SOURCE_DIR}/CMake/BextDependencyInventory.cmake
|
||||
${CMAKE_SOURCE_DIR}/CMake/GenerateSbom.cmake
|
||||
${CMAKE_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_SOURCE_DIR}/.gitmodules
|
||||
${BEXT_GRAPH_DEPENDS}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(sbom DEPENDS "${BEXT_SBOM_OUTPUT}")
|
||||
add_custom_target(supply_chain_check
|
||||
DEPENDS check_dependency_metadata sbom
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Warn the user if the settings changed in a way the indicate there is a risk
|
||||
@@ -480,12 +863,14 @@ if (EXISTS "${CMAKE_BUNDLE_INSTALL_PREFIX}" AND STALE_INSTALL_WARN)
|
||||
endif (OFILES_BIN OR OFILES_LIB)
|
||||
endif (EXISTS "${CMAKE_BUNDLE_INSTALL_PREFIX}" AND STALE_INSTALL_WARN)
|
||||
|
||||
bext_print_configure_summary()
|
||||
|
||||
###############################################################################
|
||||
# On Windows, if we get dlls built for the wrong configuration it can cause
|
||||
# problems. Define a utility target to check
|
||||
###############################################################################
|
||||
add_custom_target(dll_typecheck
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=\"$<CONFIG>\" -DDLL_DIR=\"${CMAKE_INSTALL_PREFIX}/bext_output/install/bin\" -P ${CMAKE_SOURCE_DIR}/CMake/DllTypeCheck.cmake)
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=\"$<CONFIG>\" -DDLL_DIR=\"${CMAKE_INSTALL_PREFIX}/install/bin\" -P ${CMAKE_SOURCE_DIR}/CMake/DllTypeCheck.cmake)
|
||||
|
||||
###############################################################################
|
||||
# Check that Windows LoadLibrary call can succeed with our dll outputs
|
||||
@@ -493,7 +878,7 @@ add_custom_target(dll_typecheck
|
||||
if (WIN32)
|
||||
add_executable(lltest ${CMAKE_SOURCE_DIR}/CMake/LoadLibraryTest.cpp)
|
||||
add_custom_target(dll_loadcheck
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=\"$<CONFIG>\" -DLEXEC=\"$<TARGET_FILE:lltest>\" -DDLL_DIR=\"${CMAKE_INSTALL_PREFIX}/bext_output/install/bin\" -P ${CMAKE_SOURCE_DIR}/CMake/LoadLibraryCheck.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=\"$<CONFIG>\" -DLEXEC=\"$<TARGET_FILE:lltest>\" -DDLL_DIR=\"${CMAKE_INSTALL_PREFIX}/install/bin\" -P ${CMAKE_SOURCE_DIR}/CMake/LoadLibraryCheck.cmake
|
||||
DEPENDS lltest
|
||||
)
|
||||
endif (WIN32)
|
||||
@@ -501,7 +886,7 @@ endif (WIN32)
|
||||
###############################################################################
|
||||
# Report where we will be putting our output
|
||||
###############################################################################
|
||||
message("Output directory: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "Output directory: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
@@ -509,4 +894,3 @@ message("Output directory: ${CMAKE_INSTALL_PREFIX}")
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 21,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "layout",
|
||||
"hidden": true,
|
||||
"description": "Output layout for presets whose name already carries the config (e.g. auto/Release, auto/Debug): build/<profile>/<Config>. Release and Debug trees sit side by side so both configs can be kept and consumed at once.",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}"
|
||||
},
|
||||
{
|
||||
"name": "layout-implicit-release",
|
||||
"hidden": true,
|
||||
"description": "Output layout for the unqualified convenience aliases (e.g. --preset=auto): build/<profile>/Release. Resolves to the same tree as <profile>/Release.",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}/Release"
|
||||
},
|
||||
{
|
||||
"name": "type-release",
|
||||
"hidden": true,
|
||||
"description": "Single-config Release build type (matches a BRL-CAD Release build).",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "type-debug",
|
||||
"hidden": true,
|
||||
"description": "Single-config Debug build type (matches a BRL-CAD Debug build).",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "profile-auto",
|
||||
"hidden": true,
|
||||
"description": "Standard BRL-CAD-oriented profile. Use suitable system packages when found and build local copies only when needed.",
|
||||
"cacheVariables": {
|
||||
"USE_APPLESEED": "OFF",
|
||||
"USE_BRLCAD": "ON",
|
||||
"USE_BRLCAD_EXTRA": "ON",
|
||||
"USE_GDAL": "ON",
|
||||
"USE_OSPRAY": "OFF",
|
||||
"USE_QT": "ON",
|
||||
"USE_TCL": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "profile-bundled",
|
||||
"hidden": true,
|
||||
"description": "Standard BRL-CAD-oriented profile with bundled/local builds preferred for all active dependency groups.",
|
||||
"cacheVariables": {
|
||||
"ENABLE_ALL": "ON",
|
||||
"USE_APPLESEED": "OFF",
|
||||
"USE_BRLCAD": "ON",
|
||||
"USE_BRLCAD_EXTRA": "ON",
|
||||
"USE_GDAL": "ON",
|
||||
"USE_OSPRAY": "OFF",
|
||||
"USE_QT": "ON",
|
||||
"USE_TCL": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "profile-minimal",
|
||||
"hidden": true,
|
||||
"description": "Core BRL-CAD profile without extras, GDAL, Qt, Tcl/Tk, Appleseed, or OSPRay.",
|
||||
"cacheVariables": {
|
||||
"USE_APPLESEED": "OFF",
|
||||
"USE_BRLCAD": "ON",
|
||||
"USE_BRLCAD_EXTRA": "OFF",
|
||||
"USE_GDAL": "OFF",
|
||||
"USE_OSPRAY": "OFF",
|
||||
"USE_QT": "OFF",
|
||||
"USE_TCL": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "profile-everything",
|
||||
"hidden": true,
|
||||
"description": "Enable all current dependency groups and prefer bundled/local builds for all of them.",
|
||||
"cacheVariables": {
|
||||
"ENABLE_ALL": "ON",
|
||||
"USE_APPLESEED": "ON",
|
||||
"USE_BRLCAD": "ON",
|
||||
"USE_BRLCAD_EXTRA": "ON",
|
||||
"USE_GDAL": "ON",
|
||||
"USE_OSPRAY": "ON",
|
||||
"USE_QT": "ON",
|
||||
"USE_TCL": "ON",
|
||||
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "auto",
|
||||
"displayName": "Auto (Release)",
|
||||
"description": "Convenience alias for auto/Release.",
|
||||
"inherits": ["layout-implicit-release", "profile-auto", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "auto/Release",
|
||||
"displayName": "Auto (Release)",
|
||||
"inherits": ["layout", "profile-auto", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "auto/Debug",
|
||||
"displayName": "Auto (Debug)",
|
||||
"inherits": ["layout", "profile-auto", "type-debug"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "bundled",
|
||||
"displayName": "Bundled (Release)",
|
||||
"description": "Convenience alias for bundled/Release.",
|
||||
"inherits": ["layout-implicit-release", "profile-bundled", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "bundled/Release",
|
||||
"displayName": "Bundled (Release)",
|
||||
"inherits": ["layout", "profile-bundled", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "bundled/Debug",
|
||||
"displayName": "Bundled (Debug)",
|
||||
"inherits": ["layout", "profile-bundled", "type-debug"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "minimal",
|
||||
"displayName": "Minimal (Release)",
|
||||
"description": "Convenience alias for minimal/Release.",
|
||||
"inherits": ["layout-implicit-release", "profile-minimal", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "minimal/Release",
|
||||
"displayName": "Minimal (Release)",
|
||||
"inherits": ["layout", "profile-minimal", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "minimal/Debug",
|
||||
"displayName": "Minimal (Debug)",
|
||||
"inherits": ["layout", "profile-minimal", "type-debug"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "everything",
|
||||
"displayName": "Everything (Release)",
|
||||
"description": "Convenience alias for everything/Release.",
|
||||
"inherits": ["layout-implicit-release", "profile-everything", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "everything/Release",
|
||||
"displayName": "Everything (Release)",
|
||||
"inherits": ["layout", "profile-everything", "type-release"]
|
||||
},
|
||||
{
|
||||
"name": "everything/Debug",
|
||||
"displayName": "Everything (Debug)",
|
||||
"inherits": ["layout", "profile-everything", "type-debug"]
|
||||
}
|
||||
]
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
# bext - Dependency Reference
|
||||
|
||||
This file is a package map for `bext`. It shows which `USE_*` groups can bring
|
||||
each project into scope and whether its outputs land in `install/` or
|
||||
`noinstall/`.
|
||||
|
||||
A package listed here may still use a system installation instead of building a
|
||||
local copy unless `ENABLE_ALL=ON` or `ENABLE_<pkg>=ON` is used.
|
||||
|
||||
For some BRL-CAD-related packages, `BRLCAD_COMPONENTS` can narrow the final
|
||||
selection further.
|
||||
|
||||
# Output types
|
||||
|
||||
* `install` - bundled output intended for downstream use
|
||||
* `noinstall` - build-only tool or compile-time-only asset
|
||||
|
||||
# Projects
|
||||
|
||||
<!-- BEGIN GENERATED PROJECT TABLE -->
|
||||
<!-- Generated by CMake/GenerateDependencyDocs.cmake; do not edit this block. -->
|
||||
| Project | `USE_*` group(s) | Output | Dependencies | Source |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `appleseed` | `USE_APPLESEED` | `install` | `boost`, `eigen`, `embree`, `jpeg`, `llvm`, `lz4`, `onetbb`, `opencolorio`, `openexr`, `openimageio`, `osl`, `patch`, `png`, `tiff`, `xerces-c`, `zlib` | [repository](https://github.com/BRL-CAD/appleseed) |
|
||||
| `assetimport` | `USE_BRLCAD` | `install` | `patch`, `pugixml`, `zlib` | [repository](https://github.com/BRL-CAD/assimp) |
|
||||
| `astyle` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/astyle) |
|
||||
| `boost` | `USE_APPLESEED` | `install` | `icu`, `patch`, `zlib`, `zstd` | [repository](https://github.com/BRL-CAD/boost) |
|
||||
| `bullet` | `USE_BRLCAD_EXTRA` | `install` | `patch` | [repository](https://github.com/BRL-CAD/bullet3.git) |
|
||||
| `clipper2` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/Clipper2.git) |
|
||||
| `deflate` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/libdeflate) |
|
||||
| `eigen` | `USE_BRLCAD`, `USE_APPLESEED` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/eigen) |
|
||||
| `embree` | `USE_APPLESEED`, `USE_OSPRAY` | `install` | `boost`, `onetbb`, `patch`, `zlib` | [repository](https://github.com/BRL-CAD/embree) |
|
||||
| `expat` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/libexpat) |
|
||||
| `flexbison` | `USE_APPLESEED`, `USE_OSPRAY` | `noinstall` | — | [repository](https://github.com/BRL-CAD/winflexbison) |
|
||||
| `fmt` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/fmt) |
|
||||
| `gdal` | `USE_GDAL` | `install` | `patch`, `png`, `proj`, `sqlite3`, `tiff`, `zlib` | [repository](https://github.com/BRL-CAD/gdal) |
|
||||
| `gte` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/GeometricTools) |
|
||||
| `icu` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/icu) |
|
||||
| `ispc` | `USE_OSPRAY` | `install` | `bison`, `flex`, `patch`, `llvm`, `ncurses`, `zlib` | [repository](https://github.com/BRL-CAD/ispc) |
|
||||
| `itk` | `USE_TCL` | `install` | `patch`, `tcl`, `tk` | [repository](https://github.com/BRL-CAD/itk) |
|
||||
| `iwidgets` | `USE_TCL` | `install` | `patch`, `itk` | [repository](https://github.com/BRL-CAD/iwidgets) |
|
||||
| `jpeg` | `USE_APPLESEED`, `USE_BRLCAD`, `USE_GDAL` | `install` | `patch` | [repository](https://github.com/BRL-CAD/libjpeg-turbo) |
|
||||
| `lemon` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/lemon) |
|
||||
| `lief` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/LIEF) |
|
||||
| `llvm` | `USE_APPLESEED`, `USE_OSPRAY` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/llvm-project) |
|
||||
| `lmdb` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/lmdb) |
|
||||
| `lz4` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/lz4) |
|
||||
| `manifold` | `USE_BRLCAD` | `install` | `patch`, `clipper2` | [repository](https://github.com/BRL-CAD/manifold.git) |
|
||||
| `minizip-ng` | `USE_APPLESEED` | `install` | `patch`, `zlib`, `zstd` | [repository](https://github.com/BRL-CAD/minizip-ng) |
|
||||
| `mmesh` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/mmesh.git) |
|
||||
| `ncurses` | `USE_OSPRAY` | `install` | `patch` | [repository](https://github.com/BRL-CAD/ncurses) |
|
||||
| `netpbm` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/netpbm) |
|
||||
| `oidn` | `USE_OSPRAY` | `install` | `ispc`, `onetbb` | [repository](https://github.com/BRL-CAD/oidn) |
|
||||
| `onetbb` | `USE_APPLESEED`, `USE_OSPRAY`, `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/oneTBB) |
|
||||
| `opencolorio` | `USE_APPLESEED` | `install` | `expat`, `minizip-ng`, `openexr`, `patch`, `pystring`, `yaml-cpp`, `zlib`, `zstd` | [repository](https://github.com/BRL-CAD/OpenColorIO) |
|
||||
| `opencv` | `USE_BRLCAD_EXTRA` | `install` | `patch`, `png`, `zlib` | [repository](https://github.com/BRL-CAD/opencv) |
|
||||
| `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`, `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) |
|
||||
| `pystring` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/pystring) |
|
||||
| `qt` | `USE_QT` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/qt) |
|
||||
| `re2c` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/re2c) |
|
||||
| `regex` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/regex) |
|
||||
| `rkcommon` | `USE_OSPRAY` | `install` | `onetbb`, `patch` | [repository](https://github.com/BRL-CAD/rkcommon) |
|
||||
| `sqlite3` | `USE_GDAL` | `install` | `patch` | [repository](https://github.com/BRL-CAD/sqlite3.git) |
|
||||
| `stepcode` | `USE_BRLCAD_EXTRA` | `install` | `lemon`, `patch`, `perplex`, `re2c` | [repository](https://github.com/BRL-CAD/stepcode) |
|
||||
| `strclear` | `USE_BRLCAD` | `noinstall` | `patch` | [repository](https://github.com/BRL-CAD/strclear) |
|
||||
| `tcl` | `USE_TCL` | `install` | `patch`, `zlib` | [repository](https://github.com/BRL-CAD/tcl.git) |
|
||||
| `tiff` | `USE_APPLESEED`, `USE_GDAL` | `install` | `jpeg`, `patch`, `zlib` | [repository](https://github.com/BRL-CAD/libtiff) |
|
||||
| `tinygltf` | `USE_BRLCAD` | `install` | `patch` | [repository](https://github.com/BRL-CAD/tinygltf.git) |
|
||||
| `tk` | `USE_TCL` | `install` | `patch`, `tcl` | [repository](https://github.com/BRL-CAD/tk) |
|
||||
| `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) |
|
||||
| `yaml-cpp` | `USE_APPLESEED` | `install` | `patch` | [repository](https://github.com/BRL-CAD/yaml-cpp) |
|
||||
| `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 -->
|
||||
|
||||
# Notes
|
||||
|
||||
* `install/` versus `noinstall/` is about downstream use, not importance.
|
||||
Several `noinstall` entries are essential build helpers.
|
||||
* `ENABLE_ALL=ON` does not add `USE_APPLESEED` or `USE_OSPRAY` by itself.
|
||||
Those groups still need to be enabled explicitly.
|
||||
* A few source trees, such as `patchelf`, are present in the repository but are
|
||||
not currently added by the top-level build.
|
||||
* Run the `update_dependency_docs` target after changing project groups,
|
||||
dependency edges, output locations, or submodule sources. CI runs
|
||||
`check_dependency_metadata` to detect drift, unknown edges, cycles, missing
|
||||
source pins, and missing bundled-output license installation.
|
||||
* The `sbom` target writes an SPDX 2.3 JSON inventory to `bext.spdx.json` in
|
||||
the build directory. `supply_chain_check` validates metadata and produces
|
||||
the SBOM together.
|
||||
|
||||
# Adding a dependency
|
||||
|
||||
For maintainers, the high-level workflow for adding a new dependency to `bext`
|
||||
is:
|
||||
|
||||
1. Decide whether the dependency belongs in `bext` at all.
|
||||
Only add repositories that are expected to support live BRL-CAD or related
|
||||
build features. Exploratory work that may be discarded should stay in a branch
|
||||
until the dependency choice is settled.
|
||||
|
||||
2. Prepare the BRL-CAD-hosted source repository first.
|
||||
`bext` generally points at BRL-CAD-managed copies of upstream sources rather
|
||||
than upstream repositories directly. Before wiring anything into `bext`, make
|
||||
sure the BRL-CAD copy has the intended `RELEASE` content, submodules handled as
|
||||
needed, and license files available for installation.
|
||||
|
||||
3. Choose the `USE_*` group or groups that should bring the dependency into
|
||||
scope.
|
||||
This controls when the dependency is considered at all. If none of the
|
||||
existing groups fit, add a new one only if it represents a real build profile
|
||||
that users can reason about.
|
||||
|
||||
4. Add the new top-level directory and git submodule.
|
||||
The directory should usually contain:
|
||||
* the upstream source as a git submodule
|
||||
* a managing `CMakeLists.txt`
|
||||
* a `<name>.deps` file listing other `bext` projects it depends on
|
||||
* any patch files or helper resources needed by the build
|
||||
|
||||
After `git submodule add`, update `.gitmodules` to include `ignore = dirty` for
|
||||
the new entry, consistent with the existing submodules.
|
||||
|
||||
5. Add the build logic.
|
||||
Follow the patterns used by nearby dependencies:
|
||||
* use `git_submodule_init(...)`
|
||||
* use `RegisterDeps(...)`
|
||||
* decide whether the outputs belong in `install` or `noinstall`
|
||||
* copy license files into `${DOC_LICENSE_DIR}`
|
||||
* use `bext_enable(...)`, `cad_enable(...)`, or custom logic as needed to
|
||||
respect system detection and BRL-CAD component selection
|
||||
|
||||
6. Register the dependency in the top-level build.
|
||||
Add `add_project(...)` to the top-level `CMakeLists.txt` in dependency order so
|
||||
that any prerequisites appear earlier in the file.
|
||||
|
||||
7. Update the docs.
|
||||
At minimum:
|
||||
* add the project to this file
|
||||
* update `INSTALL.md` if the new dependency adds system prerequisites
|
||||
* update `NOTES.md` if the dependency needs special submodule or maintainer
|
||||
handling
|
||||
|
||||
8. Test the intended selection behavior and build flow.
|
||||
Check at least:
|
||||
* the default configure path for the relevant `USE_*` groups
|
||||
* `-DENABLE_ALL=ON`
|
||||
* any new or changed prerequisite detection
|
||||
* downstream use if the outputs are intended for BRL-CAD bundling
|
||||
|
||||
9. Only after the dependency is working, commit the new submodule reference and
|
||||
the `bext` integration together.
|
||||
That keeps the repository history aligned with a working configuration rather
|
||||
than a partial experiment.
|
||||
|
||||
For lower-level git and submodule procedures, see [NOTES.md](NOTES.md).
|
||||
+138
-22
@@ -1,51 +1,167 @@
|
||||
# bext - Installation
|
||||
# bext - Installation Notes
|
||||
|
||||
For building all of the projects present in this repository, you will need Git, CMake, a modern C/C++ compiler and some support libraries installed on your operating system. If you want flex and bison you'll also need a working Autotools stack on non-Windows platforms.
|
||||
This file covers machine setup and source checkout details. For the main build
|
||||
flow and option behavior, see [README.md](README.md).
|
||||
|
||||
# Base requirements
|
||||
|
||||
All builds need:
|
||||
|
||||
* Git
|
||||
* CMake 3.19 or newer
|
||||
* A modern C compiler
|
||||
* A modern C++ compiler
|
||||
|
||||
Additional requirements depend on the enabled stacks:
|
||||
|
||||
* `USE_APPLESEED` and `USE_OSPRAY` will use a system `flex` and
|
||||
`bison` if they are already installed. If they are not and `bext`
|
||||
needs to build them locally on non-Windows platforms, a working
|
||||
Autotools stack is also needed.
|
||||
* `USE_QT`, `USE_APPLESEED`, or `USE_OSPRAY` need Python 3 available
|
||||
to the build.
|
||||
* `USE_OSPRAY` needs `m4`.
|
||||
|
||||
# Source checkout options
|
||||
|
||||
Default clone:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/BRL-CAD/bext
|
||||
```
|
||||
|
||||
This is usually the best starting point. `bext` will populate submodules on
|
||||
demand during configure.
|
||||
|
||||
Recursive clone:
|
||||
|
||||
```sh
|
||||
git clone --recursive https://github.com/BRL-CAD/bext
|
||||
```
|
||||
|
||||
Use this if you want all submodule content fetched up front, or if you expect
|
||||
to configure and build without network access later.
|
||||
|
||||
Shallow clone options:
|
||||
|
||||
* `cmake ../bext -DGIT_SHALLOW_CLONE=ON ...`
|
||||
* `git clone --recursive --depth=1 https://github.com/BRL-CAD/bext`
|
||||
|
||||
Shallow clones are fine for compile-only use, but they are not recommended for
|
||||
development or for submodule update work.
|
||||
|
||||
# Alternate repositories and offline mirrors
|
||||
|
||||
`BEXT_REPOSITORY_ROOT` selects the directory containing the dependency
|
||||
repositories. It defaults to `https://github.com/BRL-CAD`. For another host,
|
||||
specify the URL of the equivalent repository directory:
|
||||
|
||||
```sh
|
||||
cmake --preset auto -DBEXT_REPOSITORY_ROOT=https://git.example.org/brlcad
|
||||
```
|
||||
|
||||
For offline use, the directory can contain bare Git mirrors such as
|
||||
`bext.git`, `astyle.git`, and `libpng.git`, as produced by BRL-CAD's
|
||||
`sh/mirror_repos.sh`. Clone bext first, then let CMake populate the required
|
||||
submodules:
|
||||
|
||||
```sh
|
||||
git clone /path/to/mirror/BRL-CAD/bext.git
|
||||
cd bext
|
||||
cmake --preset auto -DBEXT_REPOSITORY_ROOT=/path/to/mirror/BRL-CAD
|
||||
```
|
||||
|
||||
The root points directly to the repositories; CMake does not append `BRL-CAD`.
|
||||
Local paths and `file://` URLs are supported, as are remote Git URLs including
|
||||
`ssh://` URLs. Relative local paths are resolved against the bext source
|
||||
directory. Quote the `-D` argument if the path contains spaces. The setting
|
||||
is saved in the configure cache.
|
||||
|
||||
The optional bootstrap script accepts the same setting:
|
||||
|
||||
```sh
|
||||
cmake -DPROFILE=auto -DBEXT_REPOSITORY_ROOT=/path/to/mirror/BRL-CAD \
|
||||
-P CMake/BextBootstrap.cmake
|
||||
```
|
||||
|
||||
Bootstrap runs separately from configure, so pass the setting to both commands
|
||||
if you use both workflows. `LIST_ONLY=ON` previews bootstrap selection without
|
||||
fetching.
|
||||
|
||||
CMake redirects `https://github.com/BRL-CAD/` URLs using command-scoped Git
|
||||
configuration, including recursive submodule operations. Local roots enable
|
||||
file transport and forbid network transport for those Git operations. They
|
||||
also disable shallow-clone recommendations, even with `GIT_SHALLOW_CLONE=ON`,
|
||||
so full mirrors can supply older pinned commits. The mirrors must contain all
|
||||
required commits. Recursive submodules outside that URL prefix need their
|
||||
own Git URL mappings and local mirrors; otherwise initialization fails.
|
||||
|
||||
The override does not change `.gitmodules` or install persistent Git rewrite
|
||||
settings. To return CMake-driven updates to GitHub, set
|
||||
`-DBEXT_REPOSITORY_ROOT=https://github.com/BRL-CAD`. Direct Git commands use
|
||||
their normal configuration. This setting controls submodule fetching, not
|
||||
network access by dependency build scripts.
|
||||
|
||||
# Path and directory caveats
|
||||
|
||||
* Avoid symlinked source or build directory paths. `bext` warns about these
|
||||
because they can cause downstream install and rpath problems.
|
||||
* On non-Windows platforms, bundled Tcl/Tk builds do not support spaces in the
|
||||
source or build directory path.
|
||||
|
||||
# Ubuntu Linux
|
||||
|
||||
Basic tools needed for all configurations:
|
||||
```
|
||||
Base packages:
|
||||
|
||||
```sh
|
||||
sudo apt install git cmake gcc g++
|
||||
```
|
||||
|
||||
For Tk you'll need basic X11 libraries:
|
||||
```
|
||||
For Tcl/Tk builds:
|
||||
|
||||
```sh
|
||||
sudo apt install libfontconfig1-dev libfreetype6-dev xserver-xorg-dev libx11-dev libxi-dev libxext-dev
|
||||
```
|
||||
|
||||
For Qt, Appleseed and OSPRay you'll need Python
|
||||
```
|
||||
For Qt, Appleseed, and OSPRay:
|
||||
|
||||
```sh
|
||||
sudo apt install libpython3-dev
|
||||
```
|
||||
|
||||
For Qt you'll also need (in addition to the above) the XCB packages (see https://doc.qt.io/qt-6/linux-requirements.html)
|
||||
```
|
||||
For Qt on X11 systems, install the XCB development packages:
|
||||
|
||||
```sh
|
||||
sudo apt install libx11-xcb-dev libxfixes-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
|
||||
```
|
||||
|
||||
For OSPRay you'll need m4, and for the ISPC compiler used by OSPRay you'll need the gcc multilib packages:
|
||||
```
|
||||
For OSPRay:
|
||||
|
||||
```sh
|
||||
sudo apt install m4 gcc-multilib g++-multilib
|
||||
```
|
||||
|
||||
If you don't want to build flex and bison for the OSPRay/Appleseed stacks you can also install those:
|
||||
```
|
||||
If you want to rely on system `flex` and `bison`:
|
||||
|
||||
```sh
|
||||
sudo apt install flex bison
|
||||
```
|
||||
|
||||
If you do want to build them, install the Autotools stack:
|
||||
```
|
||||
sudo apt-get install autotools-dev autoconf
|
||||
If `bext` may need to build `flex` and `bison` locally:
|
||||
|
||||
```sh
|
||||
sudo apt install autotools-dev autoconf
|
||||
```
|
||||
|
||||
# Windows
|
||||
|
||||
Windows will need some variety of Python installed for Qt/Appleseed/OSPRay.
|
||||
If you enable Qt, Appleseed, or OSPRay, make sure Python 3 is installed and
|
||||
available in the build environment.
|
||||
|
||||
# OSX
|
||||
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.
|
||||
|
||||
XCode
|
||||
|
||||
What else? - TODO
|
||||
# macOS
|
||||
|
||||
Assuming XCode is installed, good to go.
|
||||
|
||||
@@ -134,6 +134,13 @@ user@linux:~/bext (main) $ git commit -m "Update submodule references for AssetI
|
||||
user@linux:~/bext (main) $ git push
|
||||
```
|
||||
|
||||
# Parallelize updates
|
||||
|
||||
git config submodule.fetchJobs 0 # 0 = one job per CPU core
|
||||
git config fetch.parallel 0
|
||||
git config fetch.recurseSubmodules on-demand # only fetch the submodules that changed
|
||||
|
||||
|
||||
# Changing the branch of a submodule
|
||||
|
||||
https://stackoverflow.com/questions/29882960/changing-an-existing-submodules-branch
|
||||
@@ -350,7 +357,7 @@ process are:
|
||||
suggests the upstream might be receptive to changing how their install
|
||||
structure is laid out.
|
||||
|
||||
Once you have everything installing into bext_output/install/ correctly and
|
||||
Once you have everything installing into install/ correctly and
|
||||
using the correct dependencies, congratulations - you're now ready to add
|
||||
the submodule to bext in lieu of a working source copy. This will allow
|
||||
bext to manage when and how the directory is populated based on build
|
||||
@@ -358,9 +365,10 @@ settings, as well as providing a convenient(ish) mechanism for updating
|
||||
submodule references as needed (see above).
|
||||
|
||||
As an example, we document below the steps taken for the geogram library from
|
||||
https://github.com/BrunoLevy/geogram After creating a full fork of the project
|
||||
via github and verifying actions were not enabled, we clone the new repository
|
||||
recursively to get the source code of all submodules:
|
||||
https://github.com/BrunoLevy/geogram (which we're no longer actively bundling,
|
||||
but it still serves as a good illustration.) After creating a full fork of the
|
||||
project via github and verifying actions were not enabled, we clone the new
|
||||
repository recursively to get the source code of all submodules:
|
||||
|
||||
```
|
||||
$ git clone --recursive git@github.com:BRL-CAD/geogram.git
|
||||
@@ -770,10 +778,10 @@ build (main) $ make GEOGRAM_BLD
|
||||
[100%] Built target GEOGRAM_BLD
|
||||
```
|
||||
|
||||
Once we have a successful completion, we inspect the contents of bext_output/install:
|
||||
Once we have a successful completion, we inspect the contents of install:
|
||||
|
||||
```
|
||||
bext/build (main) $ ls -R ~/bext_output/install/
|
||||
bext/build (main) $ ls -R ~/install/
|
||||
```
|
||||
|
||||
One thing to note is that a lot of the third party headers have been installed,
|
||||
@@ -867,7 +875,7 @@ By convention we keep the labels alphabetized.
|
||||
Note that the bext build takes responsibility for making third party
|
||||
dependencies relocatable by leveraging LIEF, but if the upstream project ends
|
||||
up encoding fixed install paths rather than using relative lookups it may
|
||||
happen that a working bext_output/install copy fails to work when copied into
|
||||
happen that a working install copy fails to work when copied into
|
||||
the main BRL-CAD build. If and when that happens, the original sources must be
|
||||
patched to allow for relocatable execution (we have to do this for Tcl, for
|
||||
example.) This should be done via patch file, and if the upstream project will
|
||||
|
||||
@@ -1,95 +1,183 @@
|
||||
# bext - External Dependencies Management
|
||||
# bext - External Dependencies for BRL-CAD
|
||||
|
||||
This repository manages the building of dependencies used by large scale computer graphics projects, with a primary focus on the [BRL-CAD](https://github.com/BRL-CAD/brlcad) computer aided design system.
|
||||
`bext` builds third-party libraries and helper tools used by
|
||||
[BRL-CAD](https://github.com/BRL-CAD/brlcad). By default it prefers suitable
|
||||
system packages and builds local copies only when they are needed.
|
||||
|
||||
# Quick start
|
||||
|
||||
* Clone this repository
|
||||
Clone the repository, configure with the official `auto` preset, and build:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/BRL-CAD/bext
|
||||
cd bext
|
||||
cmake --preset auto
|
||||
cmake --build build/auto --config Release --parallel 8
|
||||
```
|
||||
(This should be fast - by default most of the downloading happens during the configure process.)
|
||||
* Make a build directory
|
||||
|
||||
Submodules are populated on demand during configure. For checkout and
|
||||
platform setup details, see [INSTALL.md](INSTALL.md).
|
||||
|
||||
The preset workflow relies on CMake's newer preset support. If you are using
|
||||
CMake 3.19 or 3.20, use the raw configure equivalents below.
|
||||
|
||||
# Optional bootstrap
|
||||
|
||||
If you want to fetch a given profile's source submodules up front
|
||||
instead of letting configure fetch them on demand:
|
||||
|
||||
```sh
|
||||
mkdir bext_build && cd bext_build
|
||||
cmake -DPROFILE=auto -P CMake/BextBootstrap.cmake
|
||||
cmake --preset auto
|
||||
```
|
||||
* Configure with CMake. Individual components can be enabled or disabled, but the ENABLE_ALL flag is used to automatically turn on all the projects. There are also USE_* variables that can enable or disable various groupings of components based on which specific application stacks the user wishes to support.
|
||||
|
||||
Use `LIST_ONLY=ON` to preview the selected submodules without fetching them,
|
||||
and `GIT_SHALLOW_CLONE=ON` to specify shallow clones during bootstrap.
|
||||
|
||||
Both configure and bootstrap accept `BEXT_REPOSITORY_ROOT` to fetch from an
|
||||
alternate host or a local Git mirror. See [alternate repositories and offline
|
||||
mirrors](INSTALL.md#alternate-repositories-and-offline-mirrors) for examples.
|
||||
|
||||
# How manual selection works
|
||||
|
||||
Build selection happens in three layers:
|
||||
|
||||
1. `USE_*` options decide which dependency families are in scope.
|
||||
2. For in-scope packages, the default behavior is to use a suitable system
|
||||
package if one is found and build a local copy only when needed.
|
||||
3. `ENABLE_<pkg>=ON` or `OFF` overrides one package explicitly.
|
||||
|
||||
Default `USE_*` values:
|
||||
|
||||
* `USE_BRLCAD=ON`
|
||||
* `USE_BRLCAD_EXTRA=ON`
|
||||
* `USE_GDAL=ON`
|
||||
* `USE_QT=ON`
|
||||
* `USE_TCL=ON`
|
||||
* `USE_APPLESEED=OFF`
|
||||
* `USE_OSPRAY=OFF`
|
||||
|
||||
`ENABLE_ALL=ON` changes step 2 by preferring local builds for packages in the
|
||||
active `USE_*` groups. It does not turn on groups whose `USE_*` option is
|
||||
`OFF`.
|
||||
|
||||
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.
|
||||
|
||||
# Official profiles
|
||||
|
||||
The supported configure entry points are:
|
||||
|
||||
* `auto` - standard BRL-CAD-oriented profile using suitable system packages
|
||||
when found
|
||||
* `bundled` - standard BRL-CAD-oriented profile with bundled/local builds
|
||||
preferred for all active groups
|
||||
* `minimal` - core BRL-CAD profile without extras, GDAL, Qt, Tcl/Tk,
|
||||
Appleseed, or OSPRay
|
||||
* `everything` - all current groups enabled with bundled/local builds
|
||||
preferred throughout
|
||||
|
||||
Use them like this:
|
||||
|
||||
```sh
|
||||
cmake --preset auto
|
||||
cmake --preset bundled
|
||||
cmake --preset minimal
|
||||
cmake --preset everything
|
||||
```
|
||||
|
||||
Build using the preset's build directory:
|
||||
|
||||
```sh
|
||||
cmake --build build/auto --config Release --parallel 8
|
||||
```
|
||||
|
||||
# Raw configure equivalents
|
||||
|
||||
`auto`:
|
||||
|
||||
```sh
|
||||
cmake ../bext -DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
`bundled`:
|
||||
|
||||
```sh
|
||||
cmake ../bext -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
* Run the build process.
|
||||
```sh
|
||||
cmake --build . --config Release --parallel 8
|
||||
```
|
||||
|
||||
Note that if you know you are going to build most or all of the component projects you can immediately populate all submodules when performing the clone:
|
||||
`minimal`:
|
||||
|
||||
```sh
|
||||
git clone --recursive https://github.com/BRL-CAD/bext
|
||||
cmake ../bext \
|
||||
-DUSE_BRLCAD_EXTRA=OFF \
|
||||
-DUSE_GDAL=OFF \
|
||||
-DUSE_QT=OFF \
|
||||
-DUSE_TCL=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
This is primarily useful if you want to do all the downloading at once up front or you are preparing to work in an environment without an internet connection.
|
||||
`everything`:
|
||||
|
||||
A word of caution - full cloning of all the repository contents can be time, bandwidth and space intensive. To help alleviate this a bit, you can add -DGIT_SHALLOW_CLONE=ON to the CMake configure, or if you're pre-cloning all repositories ahead of time use --depth=1 option with the above recursive clone. Be aware that shallow clones have some limitations that make them unsuitable for much other than compiling (updating to newer versions of submodules won't work, for example) so shallow clones aren't recommended for development.
|
||||
```sh
|
||||
cmake ../bext \
|
||||
-DENABLE_ALL=ON \
|
||||
-DUSE_APPLESEED=ON \
|
||||
-DUSE_OSPRAY=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
# USE_* Options
|
||||
# Build outputs
|
||||
|
||||
A complete ENABLE_ALL build of all components in this repository is a *very* large build, and developers not needing some subset of the components may wish to avoid paying the price of building *all* submodules. That is why the USE_* options are defined - ENABLE_ALL will only enable those submodules that indicate they are used by at least one active USE_* option. By default, USE_BRLCAD, USE_BRLCAD_EXTRA, USE_GDAL and USE_TCL are enabled as they collectively define the most common set of dependencies used by a standard BRL-CAD build. However, if a developer is building BRL-CAD without terrain support and without Tcl/Tk support, setting USE_GDAL and USE_TCL to OFF will skip compilation of those submodules. Available USE_* options are:
|
||||
By default, `CMAKE_INSTALL_PREFIX` is the build directory. `bext` creates two
|
||||
output trees under that prefix:
|
||||
|
||||
* USE_BRLCAD - Core BRL-CAD dependencies always needed to build BRL-CAD successfully.
|
||||
* USE_BRLCAD_EXTRA - Optional BRL-CAD dependencies.
|
||||
* USE_GDAL - Geospatial Data Abstraction Library and dependencies
|
||||
* USE_TCL - Tcl/Tk and associated packages
|
||||
* USE_QT - Qt - cross-platform software for creating graphical user interfaces
|
||||
* USE_APPLESEED - Physically-based global illumination rendering engine
|
||||
* USE_OSPRAY - Intel high performance ray tracing engine
|
||||
* `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
|
||||
|
||||
(For BRL-CAD components specifically, a more nuanced enable/disable decision can be made if the BRLCAD_COMPONENTS variable is set. If the parent BRL-CAD build is only building a subset of the BRL-CAD target set, not all dependencies will be needed.)
|
||||
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.
|
||||
|
||||
# Using the Build Outputs with BRL-CAD
|
||||
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
|
||||
forms such as `bext.svg`, `bext.png`, and `bext.pdf`.
|
||||
|
||||
At the moment this repository and BRL-CAD's support of it are still experimental.
|
||||
To test it, the steps are as follows:
|
||||
When BRL-CAD consumes a `bext` build, `BRLCAD_EXT_DIR` should point at the
|
||||
parent directory containing both `install/` and `noinstall/`.
|
||||
|
||||
# Using the build outputs with BRL-CAD
|
||||
|
||||
If you used the `auto` preset, `BRLCAD_EXT_DIR` should be `../bext/build/auto`.
|
||||
Configure BRL-CAD with:
|
||||
|
||||
* Clone the BRL-CAD repository
|
||||
```sh
|
||||
git clone https://github.com/BRL-CAD/brlcad
|
||||
```
|
||||
* Make a build directory
|
||||
```sh
|
||||
cd .. && mkdir brlcad_exttest_build && cd brlcad_exttest_build
|
||||
```
|
||||
* Configure with CMake, specifying the path holding the bext output directory the BRLCAD_EXT_DIR variable to locate bext_output. Unless you have overridden the CMAKE_INSTALL_PREFIX of the bext build, it will be located in your home directory. The bext_output directory should in turn contain install and noinstall folders. If you also wish to test with Qt, you must currently enable that support in BRL-CAD as well. (Note that the BRL-CAD configure process is responsible for staging the BRLCAD_EXT_DIR contents into the build directory, so it can take some time to complete...)
|
||||
```sh
|
||||
cmake ../brlcad -DBRLCAD_EXT_DIR=<your_bext_install_dir>/bext_output -DBRLCAD_ENABLE_QT=ON -DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
* Run the build process.
|
||||
```sh
|
||||
mkdir brlcad_build
|
||||
cd brlcad_build
|
||||
cmake ../brlcad -DBRLCAD_EXT_DIR=../bext_build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release --parallel 8
|
||||
cmake --build . --target package --parallel 8
|
||||
```
|
||||
|
||||
If all goes well, the final result should be a relocatable BRL-CAD archive
|
||||
including both the main BRL-CAD outputs and the products of this external
|
||||
dependencies repository.
|
||||
If you built Qt in `bext`, also enable Qt in BRL-CAD:
|
||||
|
||||
```sh
|
||||
cmake ../brlcad \
|
||||
-DBRLCAD_EXT_DIR=../bext_build \
|
||||
-DBRLCAD_ENABLE_QT=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
|
||||
# About This Repository
|
||||
|
||||
In broad, the structure of the source tree is two tiered - the top level directories each denote a specific dependency project (Tcl, Qt, GDAL, etc.). Within that directory are found:
|
||||
|
||||
* A reference (using git submodules) to a copy of the upstream source code
|
||||
* Our managing CMakeLists.txt file defining the logic for building that project
|
||||
* A <dirname>.deps file identifying a project's dependencies on other bext projects
|
||||
* Any patch files or other supporting resources not part of the upstream tree
|
||||
|
||||
Sometimes third party libraries will depend on other third party libraries (for example, libpng's use of zlib) - when a bundled component that is a dependency of other bundled projects is enabled, the expectation is that the other bundled components will use our copy rather than system copies of those libraries.
|
||||
|
||||
# Compilation-Only Tools
|
||||
|
||||
Although most of the components here are intended for bundling with the eventual binary software distribution, there are some exceptions to that rule. A few of the projects (AStyle, patch, LIEF, etc.) target a different installation folder and are used only for compilation (for this repository and/or when bundling the results of building this repository with other applications.)
|
||||
|
||||
There are also header-only "libraries" such as Eigen that are needed only for compilation, and do not need to be distributed with our packages.
|
||||
|
||||
To figure out which projects are in these categories, check for a CMAKE_NOBUNDLE_INSTALL_PREFIX target being used by their top level CMakeLists.txt file managing the ExternalProject_Add build definition.
|
||||
# More information
|
||||
|
||||
* [INSTALL.md](INSTALL.md) - platform prerequisites, checkout options, and
|
||||
setup caveats
|
||||
* [DEPENDENCIES.md](DEPENDENCIES.md) - package-to-group reference, output
|
||||
classification, and dependency addition workflow
|
||||
* [NOTES.md](NOTES.md) - maintainer notes and submodule procedures
|
||||
* [XMIN.md](XMIN.md) - testing-only headless X11 support using Xmin
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
A bunch of the patches are still adding FindZLIB.cmake - fix.
|
||||
|
||||
Make sure for all the Find*.cmake files we're adding we reference
|
||||
the copy in the toplevel bext/CMake directory unless there's a reason
|
||||
not to - shouldn't be making per-proejct addfiles/ copies of those
|
||||
since we'd just have to update each one.
|
||||
|
||||
Right now, I don't think we're really handling switching config options
|
||||
properly. If we enable/disable individual components, dependencies using
|
||||
those components need to be reset - their old compiles will no longer be
|
||||
valid if one of their dependencies changes. We need to:
|
||||
|
||||
1. clear the bext_output directory, so the contents reflect the new
|
||||
1. clear the output directories, so the contents reflect the new
|
||||
settings rather than keeping potentially outdated files
|
||||
|
||||
2. remove old build directory contents for those projects that have
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Xmin-backed bundled toolkits
|
||||
|
||||
Xmin is a small, self-contained X11 server and client library - see
|
||||
https://github.com/starseeker/Xmin
|
||||
|
||||
An installed Xmin SDK can provide the X11 and OpenGL surface for bext's
|
||||
bundled Tk and Qt, allowing fully interactive automated GUI application testing
|
||||
in an environment that has neither X nor OpenGL.
|
||||
|
||||
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.
|
||||
@@ -9,20 +9,32 @@ if (ENABLE_APPLESEED)
|
||||
if (TARGET ZLIB_BLD)
|
||||
set(Z_PREFIX_STR "brl_")
|
||||
endif (TARGET ZLIB_BLD)
|
||||
set(APPLESEED_SIMD_ARGS)
|
||||
if (APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)")
|
||||
list(APPEND APPLESEED_SIMD_ARGS
|
||||
-DUSE_SSE=OFF
|
||||
-DUSE_SSE42=OFF
|
||||
-DUSE_AVX=OFF
|
||||
-DUSE_AVX2=OFF
|
||||
-DUSE_F16C=OFF
|
||||
)
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(APPLESEED_BLD
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/appleseed"
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/appleseed"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
#PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/appleseed.patch
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/appleseed.patch
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
${APPLESEED_SIMD_ARGS}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
|
||||
-DBOOST_ROOT=$<$<BOOL:${BOOST_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DEigen3_ROOT=$<$<BOOL:${EIGEN_BUNDLED}>:${CMAKE_NOBUNDLE_INSTALL_PREFIX}>
|
||||
-DEMBREE_ROOT=$<$<BOOL:${EMBREE_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DISPC_ROOT=$<$<BOOL:${ISPC_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DTBB_ROOT=$<$<BOOL:${TBB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
$<$<BOOL:${ONETBB_TARGET}>:-DTBB_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DJPEG_ROOT=$<$<BOOL:${JPEG_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DPNG_ROOT=$<$<BOOL:${PNG_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DTIFF_ROOT=$<$<BOOL:${TIFF_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
@@ -32,6 +44,16 @@ if (ENABLE_APPLESEED)
|
||||
-DOPENEXR_ROOT=$<$<BOOL:${OPENEXR_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DOPENIMAGEIO_ROOT=$<$<BOOL:${OPENIMAGEIO_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DOSL_ROOT=$<$<BOOL:${OSL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
# appleseed locates the OSL tools (oslc shader compiler, oslinfo query tool)
|
||||
# via find_program() calls in its FindOSL.cmake that are malformed -- the
|
||||
# path hint is parsed as an additional program name -- so the tools are only
|
||||
# found if they happen to be on PATH, otherwise OSL_COMPILER / OSL_QUERY_INFO
|
||||
# end up empty. That breaks the .osl->.oso build (command degrades to just
|
||||
# its flags, "'-O2' is not recognized") and the post-build copy of oslinfo
|
||||
# into the sandbox (cmake -E copy with an empty source). Pass both tools
|
||||
# explicitly, as appleseed's own CI does; find_program() honors a pre-set var.
|
||||
-DOSL_COMPILER=$<$<BOOL:${OSL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}/${BIN_DIR}/oslc${CMAKE_EXECUTABLE_SUFFIX}>
|
||||
-DOSL_QUERY_INFO=$<$<BOOL:${OSL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}/${BIN_DIR}/oslinfo${CMAKE_EXECUTABLE_SUFFIX}>
|
||||
-DXERCES_C_ROOT=$<$<BOOL:${XERCES_C_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DZLIB_C_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DWITH_STUDIO=OFF
|
||||
@@ -41,6 +63,7 @@ if (ENABLE_APPLESEED)
|
||||
-DWITH_PYTHON3_BINDINGS=OFF
|
||||
-DINSTALL_TESTS=OFF
|
||||
-DINSTALL_API_EXAMPLES=OFF
|
||||
-DWARNINGS_AS_ERRORS=OFF
|
||||
-DUSE_FIND_PACKAGE_FOR_EMBREE=ON
|
||||
-DUSE_FIND_PACKAGE_FOR_EXR=ON
|
||||
-DUSE_FIND_PACKAGE_FOR_LZ4=ON
|
||||
@@ -52,11 +75,13 @@ if (ENABLE_APPLESEED)
|
||||
-DBIN_DIR=${BIN_DIR}
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
||||
-DCMAKE_PREFIX_PATH=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-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}
|
||||
-DOpenEXR_DIR=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}/cmake/OpenEXR
|
||||
LOG_CONFIGURE ${EXT_BUILD_QUIET}
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
LOG_INSTALL ${EXT_BUILD_QUIET}
|
||||
@@ -81,4 +106,3 @@ endif (ENABLE_APPLESEED)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 74ed663..ba8c28e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -224,9 +224,28 @@ if (USE_STATIC_BOOST)
|
||||
endif ()
|
||||
find_package(Boost 1.70 REQUIRED COMPONENTS atomic chrono date_time filesystem regex system thread wave)
|
||||
add_definitions(-DBOOST_FILESYSTEM_VERSION=3 -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_ALL_DYN_LINK)
|
||||
+if (MSVC)
|
||||
+ # Boost 1.85's auto_link.hpp caps its MSVC toolset tag at vc143 (VS2022), but
|
||||
+ # the bundled Boost is built with the newer (VS2026) toolset and installed as
|
||||
+ # vc145. With BOOST_ALL_DYN_LINK the auto-link #pragma comment(lib, ...)
|
||||
+ # directives would otherwise request boost_*-vc143-mt-x64-1_85.lib, which do
|
||||
+ # not exist (LNK1104). Override the tag to match the bundled libraries.
|
||||
+ add_definitions(-DBOOST_LIB_TOOLSET="vc145")
|
||||
+endif ()
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
find_package(OSL REQUIRED)
|
||||
+# appleseed links OSL via the oslcomp/oslexec/oslquery_LIBRARY_IMP variables,
|
||||
+# which are only populated by appleseed's module-mode FindOSL.cmake. When OSL is
|
||||
+# resolved in CONFIG mode instead (e.g. CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON with
|
||||
+# a bundled OSLConfig.cmake), those variables stay empty and OSL is silently left
|
||||
+# out of the link (unresolved OSL_v1_xx::ShadingSystem/RendererServices/... at
|
||||
+# link time). Fall back to the imported targets provided by OSLConfig.
|
||||
+if (TARGET OSL::oslexec AND NOT oslexec_LIBRARY_IMP)
|
||||
+ set(oslcomp_LIBRARY_IMP OSL::oslcomp)
|
||||
+ set(oslexec_LIBRARY_IMP OSL::oslexec)
|
||||
+ set(oslquery_LIBRARY_IMP OSL::oslquery)
|
||||
+endif ()
|
||||
-find_package(OpenEXR REQUIRED)
|
||||
+find_package(OpenEXR MODULE REQUIRED)
|
||||
find_package(OpenImageIO REQUIRED)
|
||||
|
||||
@@ -275,7 +294,6 @@ endif ()
|
||||
|
||||
include_directories(
|
||||
${IMATH_INCLUDE_DIRS}
|
||||
- ${IMATH_INCLUDE_DIRS}/OpenEXR/
|
||||
${LZ4_INCLUDE_DIR}
|
||||
${OPENCOLORIO_INCLUDE_DIRS}
|
||||
${OPENEXR_INCLUDE_DIRS}
|
||||
@@ -674,3 +692,11 @@ endif ()
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
+find_package(OpenEXR REQUIRED)
|
||||
+get_target_property(IMATH_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
|
||||
+if (APPLE)
|
||||
+foreach (IMATH_INCLUDE_DIR IN LISTS IMATH_INCLUDES)
|
||||
+ string (REGEX REPLACE "/Imath/?$" "" IMATH_INCLUDE_DIR "${IMATH_INCLUDE_DIR}")
|
||||
+ add_compile_options("-Wp,-I${IMATH_INCLUDE_DIR}")
|
||||
+endforeach ()
|
||||
+endif ()
|
||||
diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
|
||||
index 00c769d..0f38a0d 100644
|
||||
--- a/cmake/FindOpenEXR.cmake
|
||||
+++ b/cmake/FindOpenEXR.cmake
|
||||
@@ -56,16 +56,22 @@ if (TARGET OpenEXR::OpenEXR AND TARGET Imath::Imath)
|
||||
# Mimic old style variables
|
||||
set (OPENEXR_VERSION ${OpenEXR_VERSION})
|
||||
get_target_property(IMATH_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
|
||||
+ set (IMATH_INCLUDE_DIRS ${IMATH_INCLUDES})
|
||||
+ string (REGEX REPLACE "/Imath/?$" "" IMATH_INCLUDE_DIRS "${IMATH_INCLUDE_DIRS}")
|
||||
+ set (IMATH_INCLUDE_DIR ${IMATH_INCLUDES})
|
||||
get_target_property(ILMBASE_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
|
||||
- get_target_property(ILMBASE_IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
|
||||
- get_target_property(IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
|
||||
- get_target_property(OPENEXR_IEX_LIBRARY OpenEXR::Iex INTERFACE_LINK_LIBRARIES)
|
||||
- get_target_property(OPENEXR_ILMTHREAD_LIBRARY OpenEXR::IlmThread INTERFACE_LINK_LIBRARIES)
|
||||
+ set (ILMBASE_IMATH_LIBRARY Imath::Imath)
|
||||
+ set (IMATH_LIBRARY Imath::Imath)
|
||||
+ set (OPENEXR_IEX_LIBRARY OpenEXR::Iex)
|
||||
+ set (OPENEXR_ILMTHREAD_LIBRARY OpenEXR::IlmThread)
|
||||
set (ILMBASE_LIBRARIES ${ILMBASE_IMATH_LIBRARY})
|
||||
set (ILMBASE_FOUND true)
|
||||
|
||||
get_target_property(OPENEXR_INCLUDES OpenEXR::OpenEXR INTERFACE_INCLUDE_DIRECTORIES)
|
||||
- get_target_property(OPENEXR_ILMIMF_LIBRARY OpenEXR::OpenEXR INTERFACE_LINK_LIBRARIES)
|
||||
+ set (OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDES})
|
||||
+ string (REGEX REPLACE "/OpenEXR/?$" "" OPENEXR_INCLUDE_DIRS "${OPENEXR_INCLUDE_DIRS}")
|
||||
+ set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDES})
|
||||
+ set (OPENEXR_ILMIMF_LIBRARY OpenEXR::OpenEXR)
|
||||
set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_LIBRARIES})
|
||||
set (OPENEXR_FOUND true)
|
||||
|
||||
diff --git a/src/thirdparty/bcd/bcd/Denoiser.cpp b/src/thirdparty/bcd/bcd/Denoiser.cpp
|
||||
index 109ec87..ef7ed8e 100644
|
||||
--- a/src/thirdparty/bcd/bcd/Denoiser.cpp
|
||||
+++ b/src/thirdparty/bcd/bcd/Denoiser.cpp
|
||||
@@ -125,7 +125,7 @@ bool Denoiser::denoise()
|
||||
i,
|
||||
boost::ref(abortRequested)));
|
||||
|
||||
- denoiseThreads.push_back(move(t));
|
||||
+ denoiseThreads.push_back(std::move(t));
|
||||
|
||||
startPixelIndexIt = endPixelIndexIt;
|
||||
}
|
||||
diff --git a/src/appleseed/main/allocator.cpp b/src/appleseed/main/allocator.cpp
|
||||
--- a/src/appleseed/main/allocator.cpp
|
||||
+++ b/src/appleseed/main/allocator.cpp
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
+#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <exception>
|
||||
@@ -501,7 +502,14 @@
|
||||
if (size < 1)
|
||||
size = 1;
|
||||
|
||||
- void* ptr = aligned_malloc(size, MemoryAlignment);
|
||||
+ /* BRL-CAD PATCH: use plain malloc (already 16-byte aligned on x64)
|
||||
+ * instead of aligned_malloc. This operator new/delete override only
|
||||
+ * applies inside appleseed.dll, so std::strings/objects allocated by the
|
||||
+ * default CRT allocator in other modules (art.exe, brl-cad DLLs,
|
||||
+ * msvcp140d) and freed here would hit aligned_free() on a non-aligned
|
||||
+ * block and crash (seen in foundation::SearchPaths::do_to_string at
|
||||
+ * render start). malloc/free keep every module on one shared CRT heap. */
|
||||
+ void* ptr = malloc(size);
|
||||
|
||||
if (!ptr)
|
||||
throw std::bad_alloc();
|
||||
@@ -514,7 +522,7 @@
|
||||
if (!ptr)
|
||||
return;
|
||||
|
||||
- aligned_free(ptr);
|
||||
+ free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/appleseed/renderer/device/cpu/cpurenderdevice.cpp b/src/appleseed/renderer/device/cpu/cpurenderdevice.cpp
|
||||
--- a/src/appleseed/renderer/device/cpu/cpurenderdevice.cpp
|
||||
+++ b/src/appleseed/renderer/device/cpu/cpurenderdevice.cpp
|
||||
@@ -86,7 +86,12 @@
|
||||
m_texture_system,
|
||||
m_error_handler);
|
||||
m_shading_system->attribute("lockgeom", 1);
|
||||
- m_shading_system->attribute("colorspace", "Linear");
|
||||
+ /* BRL-CAD PATCH: OSL's working color space must be a name OSL knows (its
|
||||
+ * default is "Rec709", the linear-Rec709 working space). The upstream
|
||||
+ * "Linear" is not a recognized OSL color space, so OSL logged
|
||||
+ * "Unknown color space \"Linear\"" on every color transform and flagged an
|
||||
+ * error (nonzero process exit) even though rendering succeeded. */
|
||||
+ m_shading_system->attribute("colorspace", "Rec709");
|
||||
m_shading_system->attribute("commonspace", "world");
|
||||
m_shading_system->attribute("statistics:level", 1);
|
||||
m_shading_system->attribute(
|
||||
@@ -1,6 +1,7 @@
|
||||
# Decide if we're using assetimport.
|
||||
# Also, assetimport is used directly by a libgcv plugin
|
||||
cad_enable(ASSETIMPORT "libgcv")
|
||||
# Also, assetimport is used directly by a libgcv plugin and (until we update to Manifold 3.0)
|
||||
# is needed by Manifold, which is used by librt
|
||||
cad_enable(ASSETIMPORT "libgcv;librt")
|
||||
|
||||
bext_enable(ASSETIMPORT)
|
||||
|
||||
@@ -12,13 +13,16 @@ if (ENABLE_ASSETIMPORT)
|
||||
|
||||
RegisterDeps(ASSETIMPORT)
|
||||
if (TARGET ZLIB_BLD)
|
||||
set(ZLIB_TARGET ZLIB_BLD)
|
||||
set(Z_PREFIX_STR "brl_")
|
||||
endif (TARGET ZLIB_BLD)
|
||||
|
||||
ExternalProject_Add(ASSETIMPORT_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/assimp"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/assetimport.patch
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/assetimport_CMake.patch
|
||||
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/assetimport_stb.patch
|
||||
COMMAND ${CMAKE_COMMAND};-E;remove;<SOURCE_DIR>/cmake-modules/FindZLIB.cmake
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindZLIB.cmake;<SOURCE_DIR>/cmake-modules/FindZLIB.cmake
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
@@ -33,9 +37,11 @@ if (ENABLE_ASSETIMPORT)
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=${LIB_DIR}
|
||||
-DASSIMP_BUILD_USE_CCACHE=OFF
|
||||
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF
|
||||
-DASSIMP_BUILD_TESTS=OFF
|
||||
-DASSIMP_BUILD_MINIZIP=ON
|
||||
-DASSIMP_BUILD_ZLIB=OFF
|
||||
-DASSIMP_INJECT_DEBUG_POSTFIX=OFF
|
||||
-DASSIMP_INSTALL_PDB=OFF
|
||||
DEPENDS ${ASSETIMPORT_DEPS}
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
diff -Naur assimp/CMakeLists.txt ASSETIMPORT_BLD/CMakeLists.txt
|
||||
--- assimp/CMakeLists.txt 2024-08-22 16:04:35.540387715 -0400
|
||||
+++ ASSETIMPORT_BLD/CMakeLists.txt 2024-08-22 16:05:12.765176737 -0400
|
||||
@@ -37,6 +37,7 @@
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
||||
+SET(CMAKE_POLICY_DEFAULT_CMP0144 NEW)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 3.22 )
|
||||
|
||||
diff -Naur ASSETIMPORT/cmake-modules/FindZLIB.cmake ASSETIMPORT_BLD/cmake-modules/FindZLIB.cmake
|
||||
--- ASSETIMPORT/cmake-modules/FindZLIB.cmake 2024-06-25 10:10:10.163683303 -0400
|
||||
+++ ASSETIMPORT_BLD/cmake-modules/FindZLIB.cmake 2024-06-25 10:08:14.147412121 -0400
|
||||
@@ -1,48 +1,123 @@
|
||||
-#-------------------------------------------------------------------
|
||||
-# This file is part of the CMake build system for OGRE
|
||||
-# (Object-oriented Graphics Rendering Engine)
|
||||
-# For the latest info, see http://www.ogre3d.org/
|
||||
+#.rst:
|
||||
+# FindZLIB
|
||||
+# --------
|
||||
#
|
||||
-# The contents of this file are placed in the public domain. Feel
|
||||
-# free to make use of it in any way you like.
|
||||
-#-------------------------------------------------------------------
|
||||
-
|
||||
-# - Try to find ZLIB
|
||||
-# Once done, this will define
|
||||
+# Find the native ZLIB includes and library.
|
||||
#
|
||||
-# ZLIB_FOUND - system has ZLIB
|
||||
-# ZLIB_INCLUDE_DIRS - the ZLIB include directories
|
||||
-# ZLIB_LIBRARIES - link these to use ZLIB
|
||||
-
|
||||
-include(FindPkgMacros)
|
||||
-findpkg_begin(ZLIB)
|
||||
-
|
||||
-# Get path, convert backslashes as ${ENV_${var}}
|
||||
-getenv_path(ZLIB_HOME)
|
||||
-
|
||||
-# construct search paths
|
||||
-set(ZLIB_PREFIX_PATH ${ZLIB_HOME} ${ENV_ZLIB_HOME})
|
||||
-create_search_paths(ZLIB)
|
||||
-# redo search if prefix path changed
|
||||
-clear_if_changed(ZLIB_PREFIX_PATH
|
||||
- ZLIB_LIBRARY_FWK
|
||||
- ZLIB_LIBRARY_REL
|
||||
- ZLIB_LIBRARY_DBG
|
||||
- ZLIB_INCLUDE_DIR
|
||||
-)
|
||||
-
|
||||
-set(ZLIB_LIBRARY_NAMES z zlib zdll)
|
||||
-get_debug_names(ZLIB_LIBRARY_NAMES)
|
||||
-
|
||||
-use_pkgconfig(ZLIB_PKGC zzip-zlib-config)
|
||||
-
|
||||
-findpkg_framework(ZLIB)
|
||||
-
|
||||
-find_path(ZLIB_INCLUDE_DIR NAMES zlib.h HINTS ${ZLIB_INC_SEARCH_PATH} ${ZLIB_PKGC_INCLUDE_DIRS})
|
||||
-find_library(ZLIB_LIBRARY_REL NAMES ${ZLIB_LIBRARY_NAMES} HINTS ${ZLIB_LIB_SEARCH_PATH} ${ZLIB_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
|
||||
-find_library(ZLIB_LIBRARY_DBG NAMES ${ZLIB_LIBRARY_NAMES_DBG} HINTS ${ZLIB_LIB_SEARCH_PATH} ${ZLIB_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
|
||||
-
|
||||
-make_library_set(ZLIB_LIBRARY)
|
||||
-
|
||||
-findpkg_finish(ZLIB)
|
||||
+# IMPORTED Targets
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
+# ZLIB has been found.
|
||||
+#
|
||||
+# Result Variables
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines the following variables:
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
+# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
+# ZLIB_FOUND - True if zlib found.
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
+# ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
+# ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
+# ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
+# ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
+#
|
||||
+# Backward Compatibility
|
||||
+# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# The following variable are provided for backward compatibility
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
+# ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
+# ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
+#
|
||||
+# Hints
|
||||
+# ^^^^^
|
||||
+#
|
||||
+# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
+# module where to look.
|
||||
|
||||
+#=============================================================================
|
||||
+# Copyright 2001-2011 Kitware, Inc.
|
||||
+#
|
||||
+# Distributed under the OSI-approved BSD License (the "License");
|
||||
+# see accompanying file Copyright.txt for details.
|
||||
+#
|
||||
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+# See the License for more information.
|
||||
+#=============================================================================
|
||||
+# (To distribute this file outside of CMake, substitute the full
|
||||
+# License text for the above reference.)
|
||||
+
|
||||
+set(_ZLIB_SEARCHES)
|
||||
+
|
||||
+# Search ZLIB_ROOT first if it is set.
|
||||
+if(ZLIB_ROOT)
|
||||
+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
+endif()
|
||||
+
|
||||
+# Normal search.
|
||||
+set(_ZLIB_SEARCH_NORMAL
|
||||
+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
+ "$ENV{PROGRAMFILES}/zlib"
|
||||
+ )
|
||||
+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
+
|
||||
+set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1)
|
||||
+
|
||||
+# Try each search configuration.
|
||||
+foreach(search ${_ZLIB_SEARCHES})
|
||||
+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
|
||||
+endforeach()
|
||||
+
|
||||
+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
+
|
||||
+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
+
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
+
|
||||
+ # only append a TWEAK version if it exists:
|
||||
+ set(ZLIB_VERSION_TWEAK "")
|
||||
+ if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
+endif()
|
||||
+
|
||||
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
+# all listed variables are TRUE
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
+ VERSION_VAR ZLIB_VERSION_STRING)
|
||||
+
|
||||
+if(ZLIB_FOUND)
|
||||
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
+
|
||||
+ if(NOT TARGET ZLIB::ZLIB)
|
||||
+ add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
+ set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
+ IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
+ endif()
|
||||
+endif()
|
||||
diff -Naur ASSETIMPORT/code/AssetLib/MDL/MDLFileData.h ASSETIMPORT_BLD/code/AssetLib/MDL/MDLFileData.h
|
||||
--- ASSETIMPORT/code/AssetLib/MDL/MDLFileData.h 2024-06-25 10:10:10.171683183 -0400
|
||||
+++ ASSETIMPORT_BLD/code/AssetLib/MDL/MDLFileData.h 2024-06-25 10:08:14.148412106 -0400
|
||||
@@ -876,7 +876,7 @@
|
||||
: apcOutBones(),
|
||||
iNum()
|
||||
{
|
||||
- abNeedMaterials.reserve(10);
|
||||
+ //abNeedMaterials.reserve(10);
|
||||
}
|
||||
|
||||
//! Destruction: properly delete all allocated resources
|
||||
diff -Naur ASSETIMPORT/code/CMakeLists.txt ASSETIMPORT_BLD/code/CMakeLists.txt
|
||||
--- ASSETIMPORT/code/CMakeLists.txt 2024-06-25 10:10:10.175683123 -0400
|
||||
+++ ASSETIMPORT_BLD/code/CMakeLists.txt 2024-06-25 10:08:14.149412091 -0400
|
||||
@@ -906,17 +906,18 @@
|
||||
SOURCE_GROUP( Extra FILES ${Extra_SRCS})
|
||||
|
||||
# pugixml
|
||||
-IF(ASSIMP_HUNTER_ENABLED)
|
||||
- hunter_add_package(pugixml)
|
||||
- find_package(pugixml CONFIG REQUIRED)
|
||||
-ELSE()
|
||||
- SET( Pugixml_SRCS
|
||||
- ../contrib/pugixml/src/pugiconfig.hpp
|
||||
- ../contrib/pugixml/src/pugixml.hpp
|
||||
- )
|
||||
- INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
- SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
|
||||
-ENDIF()
|
||||
+#IF(ASSIMP_HUNTER_ENABLED)
|
||||
+# hunter_add_package(pugixml)
|
||||
+# find_package(pugixml CONFIG REQUIRED)
|
||||
+#ELSE()
|
||||
+# SET( Pugixml_SRCS
|
||||
+# ../contrib/pugixml/src/pugiconfig.hpp
|
||||
+# ../contrib/pugixml/src/pugixml.hpp
|
||||
+# )
|
||||
+# INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
+# SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
|
||||
+#ENDIF()
|
||||
+find_package(pugixml REQUIRED)
|
||||
|
||||
# utf8
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
@@ -1268,6 +1269,10 @@
|
||||
$<INSTALL_INTERFACE:${ASSIMP_INCLUDE_INSTALL_DIR}>
|
||||
)
|
||||
|
||||
+if (TARGET pugixml)
|
||||
+ set(PUGIXML_LIBRARIES pugixml)
|
||||
+endif (TARGET pugixml)
|
||||
+
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
TARGET_LINK_LIBRARIES(assimp
|
||||
PUBLIC
|
||||
@@ -1289,7 +1294,7 @@
|
||||
target_link_libraries(assimp PRIVATE ${draco_LIBRARIES})
|
||||
endif()
|
||||
ELSE()
|
||||
- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES})
|
||||
+ TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${PUGIXML_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES})
|
||||
if (ASSIMP_BUILD_DRACO)
|
||||
target_link_libraries(assimp ${draco_LIBRARIES})
|
||||
endif()
|
||||
@@ -1307,6 +1312,7 @@
|
||||
TARGET_LINK_LIBRARIES(assimp ${C4D_EXTRA_LIBRARIES})
|
||||
ENDIF ()
|
||||
|
||||
+if(0)
|
||||
if( MSVC )
|
||||
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
|
||||
# CMake 3.12 added a variable for this
|
||||
@@ -1353,11 +1359,12 @@
|
||||
target_compile_definitions(assimp PUBLIC WindowsStore)
|
||||
TARGET_LINK_LIBRARIES(assimp advapi32)
|
||||
endif()
|
||||
+endif(0)
|
||||
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
VERSION ${ASSIMP_VERSION}
|
||||
SOVERSION ${ASSIMP_SOVERSION} # use full version
|
||||
- OUTPUT_NAME assimp${LIBRARY_SUFFIX}
|
||||
+ #OUTPUT_NAME assimp${LIBRARY_SUFFIX}
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
diff -Naur assimp/include/assimp/ParsingUtils.h ASSETIMPORT_BLD/include/assimp/ParsingUtils.h
|
||||
--- assimp/include/assimp/ParsingUtils.h 2025-03-13 14:04:31.626017442 -0400
|
||||
+++ ASSETIMPORT_BLD/include/assimp/ParsingUtils.h 2025-03-13 14:05:20.877847011 -0400
|
||||
@@ -167,7 +167,7 @@
|
||||
}
|
||||
*_out = (char_t)'\0';
|
||||
|
||||
- while (IsLineEnd(*buffer) && '\0' != *buffer) {
|
||||
+ while (IsLineEnd(*buffer) && '\0' != *buffer && buffer != end) {
|
||||
++buffer;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
--- assimp/CMakeLists.txt 2025-07-22 16:48:44.626337172 -0400
|
||||
+++ ASSETIMPORT_BLD/CMakeLists.txt 2025-07-22 16:28:32.943270150 -0400
|
||||
@@ -37,6 +37,7 @@
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
|
||||
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
||||
+SET(CMAKE_POLICY_DEFAULT_CMP0144 NEW)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 3.22 )
|
||||
|
||||
--- assimp/cmake-modules/assimp-plain-config.cmake.in 2025-07-22 16:48:43.776340530 -0400
|
||||
+++ ASSETIMPORT_BLD/cmake-modules/assimp-plain-config.cmake.in 2025-07-22 16:28:33.458267904 -0400
|
||||
@@ -1,5 +1,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+find_package(ZLIB MODULE REQUIRED)
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
||||
|
||||
set(ASSIMP_ROOT_DIR ${PACKAGE_PREFIX_DIR})
|
||||
diff -Naur assimp/code/CMakeLists.txt ASSETIMPORT_BLD/code/CMakeLists.txt
|
||||
--- assimp/code/CMakeLists.txt 2026-02-04 16:56:22.592686074 -0500
|
||||
+++ ASSETIMPORT_BLD/code/CMakeLists.txt 2026-02-04 16:55:19.040925630 -0500
|
||||
@@ -1113,18 +1113,19 @@
|
||||
ENDIF() # IF (ASSIMP_BUILD_USD_IMPORTER)
|
||||
|
||||
# pugixml
|
||||
-IF(ASSIMP_HUNTER_ENABLED)
|
||||
- hunter_add_package(pugixml)
|
||||
- find_package(pugixml CONFIG REQUIRED)
|
||||
-ELSEIF(NOT TARGET pugixml::pugixml)
|
||||
- SET( Pugixml_SRCS
|
||||
- ../contrib/pugixml/src/pugiconfig.hpp
|
||||
- ../contrib/pugixml/src/pugixml.cpp
|
||||
- ../contrib/pugixml/src/pugixml.hpp
|
||||
- )
|
||||
- INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
- SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
|
||||
-ENDIF()
|
||||
+#IF(ASSIMP_HUNTER_ENABLED)
|
||||
+# hunter_add_package(pugixml)
|
||||
+# find_package(pugixml CONFIG REQUIRED)
|
||||
+#ELSEIF(NOT TARGET pugixml::pugixml)
|
||||
+# SET( Pugixml_SRCS
|
||||
+# ../contrib/pugixml/src/pugiconfig.hpp
|
||||
+# ../contrib/pugixml/src/pugixml.cpp
|
||||
+# ../contrib/pugixml/src/pugixml.hpp
|
||||
+# )
|
||||
+# INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
+# SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
|
||||
+#ENDIF()
|
||||
+find_package(pugixml REQUIRED)
|
||||
|
||||
# utf8
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
@@ -1414,6 +1415,10 @@
|
||||
$<INSTALL_INTERFACE:${ASSIMP_INCLUDE_INSTALL_DIR}>
|
||||
)
|
||||
|
||||
+if (TARGET pugixml)
|
||||
+ set(PUGIXML_LIBRARIES pugixml)
|
||||
+endif (TARGET pugixml)
|
||||
+
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
TARGET_LINK_LIBRARIES(assimp
|
||||
PUBLIC
|
||||
@@ -1435,7 +1440,8 @@
|
||||
target_link_libraries(assimp PRIVATE ${draco_LIBRARIES})
|
||||
endif()
|
||||
ELSE()
|
||||
- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES})
|
||||
+ find_package(ZLIB MODULE REQUIRED)
|
||||
+ TARGET_LINK_LIBRARIES(assimp ZLIB::ZLIB ${PUGIXML_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES})
|
||||
if (ASSIMP_BUILD_DRACO)
|
||||
target_link_libraries(assimp ${draco_LIBRARIES})
|
||||
endif()
|
||||
@@ -1453,6 +1459,7 @@
|
||||
TARGET_LINK_LIBRARIES(assimp ${C4D_EXTRA_LIBRARIES})
|
||||
ENDIF ()
|
||||
|
||||
+if(0)
|
||||
if( MSVC )
|
||||
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
|
||||
# CMake 3.12 added a variable for this
|
||||
@@ -1499,11 +1506,12 @@
|
||||
target_compile_definitions(assimp PUBLIC WindowsStore)
|
||||
TARGET_LINK_LIBRARIES(assimp advapi32)
|
||||
endif()
|
||||
+endif(0)
|
||||
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
VERSION ${ASSIMP_VERSION}
|
||||
SOVERSION ${ASSIMP_SOVERSION} # use full version
|
||||
- OUTPUT_NAME assimp${LIBRARY_SUFFIX}
|
||||
+ #OUTPUT_NAME assimp${LIBRARY_SUFFIX}
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -Naur assimp/contrib/stb/stb_image.h ASSETIMPORT_BLD/contrib/stb/stb_image.h
|
||||
--- assimp/contrib/stb/stb_image.h 2026-02-05 14:22:20.343920277 -0500
|
||||
+++ ASSETIMPORT_BLD/contrib/stb/stb_image.h 2026-02-05 14:24:43.112400148 -0500
|
||||
@@ -5079,7 +5079,7 @@
|
||||
{
|
||||
stbi_uc palette[1024], pal_img_n=0;
|
||||
stbi_uc has_trans=0, tc[3]={0};
|
||||
- stbi__uint16 tc16[3];
|
||||
+ stbi__uint16 tc16[3]={0};
|
||||
stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
|
||||
int first=1,k,interlace=0, color=0, is_iphone=0;
|
||||
stbi__context *s = z->s;
|
||||
+1
-1
Submodule assetimport/assimp updated: 61aeb7a67b...cfc14a26d2
@@ -1,8 +1,6 @@
|
||||
# Astyle is not bundled with BRL-CAD - it is a source code formatting tool,
|
||||
# optionally used during compilation to validate our style guidelines.
|
||||
if (ENABLE_ALL AND NOT DEFINED ENABLE_ASTYLE)
|
||||
set(ENABLE_ASTYLE ON)
|
||||
endif (ENABLE_ALL AND NOT DEFINED ENABLE_ASTYLE)
|
||||
bext_enable_all_default(ASTYLE astyle)
|
||||
|
||||
if (NOT ENABLE_ASTYLE)
|
||||
|
||||
@@ -30,12 +28,14 @@ if (ENABLE_ASTYLE)
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DBIN_DIR=${BIN_DIR}
|
||||
-DLIB_DIR=${LIB_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}
|
||||
-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}
|
||||
@@ -53,4 +53,3 @@ endif (ENABLE_ASTYLE)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
+1
-1
Submodule astyle/astyle updated: 35f559a2f6...848edc8206
+128
-31
@@ -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 "-------------------------------------------" )
|
||||
|
||||
@@ -16,6 +16,8 @@ if (ENABLE_BOOST)
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/boost"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/boost_cmake.patch
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindZLIB.cmake;<SOURCE_DIR>/libs/iostreams/cmake/FindZLIB.cmake
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/boost/FindICU.cmake;<SOURCE_DIR>/libs/locale/cmake/FindICU.cmake
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
@@ -57,4 +59,3 @@ endif (ENABLE_BOOST)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
@@ -0,0 +1,437 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindICU
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
Find the International Components for Unicode (ICU) libraries and
|
||||
programs.
|
||||
|
||||
This module supports multiple components.
|
||||
Components can include any of: ``data``, ``i18n``, ``io``, ``le``,
|
||||
``lx``, ``test``, ``tu`` and ``uc``.
|
||||
|
||||
Note that on Windows ``data`` is named ``dt`` and ``i18n`` is named
|
||||
``in``; any of the names may be used, and the appropriate
|
||||
platform-specific library name will be automatically selected.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
Added support for static libraries on Windows.
|
||||
|
||||
This module reports information about the ICU installation in
|
||||
several variables. General variables::
|
||||
|
||||
ICU_VERSION - ICU release version
|
||||
ICU_FOUND - true if the main programs and libraries were found
|
||||
ICU_LIBRARIES - component libraries to be linked
|
||||
ICU_INCLUDE_DIRS - the directories containing the ICU headers
|
||||
|
||||
Imported targets::
|
||||
|
||||
ICU::<C>
|
||||
|
||||
Where ``<C>`` is the name of an ICU component, for example
|
||||
``ICU::i18n``; ``<C>`` is lower-case.
|
||||
|
||||
ICU programs are reported in::
|
||||
|
||||
ICU_GENCNVAL_EXECUTABLE - path to gencnval executable
|
||||
ICU_ICUINFO_EXECUTABLE - path to icuinfo executable
|
||||
ICU_GENBRK_EXECUTABLE - path to genbrk executable
|
||||
ICU_ICU-CONFIG_EXECUTABLE - path to icu-config executable
|
||||
ICU_GENRB_EXECUTABLE - path to genrb executable
|
||||
ICU_GENDICT_EXECUTABLE - path to gendict executable
|
||||
ICU_DERB_EXECUTABLE - path to derb executable
|
||||
ICU_PKGDATA_EXECUTABLE - path to pkgdata executable
|
||||
ICU_UCONV_EXECUTABLE - path to uconv executable
|
||||
ICU_GENCFU_EXECUTABLE - path to gencfu executable
|
||||
ICU_MAKECONV_EXECUTABLE - path to makeconv executable
|
||||
ICU_GENNORM2_EXECUTABLE - path to gennorm2 executable
|
||||
ICU_GENCCODE_EXECUTABLE - path to genccode executable
|
||||
ICU_GENSPREP_EXECUTABLE - path to gensprep executable
|
||||
ICU_ICUPKG_EXECUTABLE - path to icupkg executable
|
||||
ICU_GENCMN_EXECUTABLE - path to gencmn executable
|
||||
|
||||
ICU component libraries are reported in::
|
||||
|
||||
ICU_<C>_FOUND - ON if component was found; ``<C>`` is upper-case.
|
||||
ICU_<C>_LIBRARIES - libraries for component; ``<C>`` is upper-case.
|
||||
|
||||
ICU datafiles are reported in::
|
||||
|
||||
ICU_MAKEFILE_INC - Makefile.inc
|
||||
ICU_PKGDATA_INC - pkgdata.inc
|
||||
|
||||
This module reads hints about search results from::
|
||||
|
||||
ICU_ROOT - the root of the ICU installation
|
||||
|
||||
The environment variable ``ICU_ROOT`` may also be used; the
|
||||
ICU_ROOT variable takes precedence.
|
||||
|
||||
The following cache variables may also be set::
|
||||
|
||||
ICU_<P>_EXECUTABLE - the path to executable <P>; ``<P>`` is upper-case.
|
||||
ICU_INCLUDE_DIR - the directory containing the ICU headers
|
||||
ICU_<C>_LIBRARY - the library for component <C>; ``<C>`` is upper-case.
|
||||
|
||||
.. note::
|
||||
|
||||
In most cases none of the above variables will require setting,
|
||||
unless multiple ICU versions are available and a specific version
|
||||
is required.
|
||||
|
||||
Other variables one may set to control this module are::
|
||||
|
||||
ICU_DEBUG - Set to ON to enable debug output from FindICU.
|
||||
#]=======================================================================]
|
||||
|
||||
# Written by Roger Leigh <rleigh@codelibre.net>
|
||||
|
||||
set(icu_programs
|
||||
gencnval
|
||||
icuinfo
|
||||
genbrk
|
||||
icu-config
|
||||
genrb
|
||||
gendict
|
||||
derb
|
||||
pkgdata
|
||||
uconv
|
||||
gencfu
|
||||
makeconv
|
||||
gennorm2
|
||||
genccode
|
||||
gensprep
|
||||
icupkg
|
||||
gencmn)
|
||||
|
||||
set(icu_data
|
||||
Makefile.inc
|
||||
pkgdata.inc)
|
||||
|
||||
# The ICU checks are contained in a function due to the large number
|
||||
# of temporary variables needed.
|
||||
function(_ICU_FIND)
|
||||
# Set up search paths, taking compiler into account. Search ICU_ROOT,
|
||||
# with ICU_ROOT in the environment as a fallback if unset.
|
||||
if(ICU_ROOT)
|
||||
list(APPEND icu_roots "${ICU_ROOT}")
|
||||
else()
|
||||
if(NOT "$ENV{ICU_ROOT}" STREQUAL "")
|
||||
file(TO_CMAKE_PATH "$ENV{ICU_ROOT}" NATIVE_PATH)
|
||||
list(APPEND icu_roots "${NATIVE_PATH}")
|
||||
set(ICU_ROOT "${NATIVE_PATH}"
|
||||
CACHE PATH "Location of the ICU installation" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find include directory
|
||||
list(APPEND icu_include_suffixes "include")
|
||||
find_path(ICU_INCLUDE_DIR
|
||||
NAMES "unicode/utypes.h"
|
||||
HINTS ${icu_roots}
|
||||
PATH_SUFFIXES ${icu_include_suffixes}
|
||||
DOC "ICU include directory")
|
||||
set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE)
|
||||
|
||||
# Get version
|
||||
if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h")
|
||||
file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str
|
||||
REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*")
|
||||
|
||||
string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*"
|
||||
"\\1" icu_version_string "${icu_header_str}")
|
||||
set(ICU_VERSION "${icu_version_string}")
|
||||
set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE)
|
||||
unset(icu_header_str)
|
||||
unset(icu_version_string)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
# 64-bit binary directory
|
||||
set(_bin64 "bin64")
|
||||
# 64-bit library directory
|
||||
set(_lib64 "lib64")
|
||||
endif()
|
||||
|
||||
|
||||
# Find all ICU programs
|
||||
list(APPEND icu_binary_suffixes "${_bin64}" "bin" "sbin")
|
||||
foreach(program ${icu_programs})
|
||||
string(TOUPPER "${program}" program_upcase)
|
||||
set(cache_var "ICU_${program_upcase}_EXECUTABLE")
|
||||
set(program_var "ICU_${program_upcase}_EXECUTABLE")
|
||||
find_program("${cache_var}"
|
||||
NAMES "${program}"
|
||||
HINTS ${icu_roots}
|
||||
PATH_SUFFIXES ${icu_binary_suffixes}
|
||||
DOC "ICU ${program} executable"
|
||||
NO_PACKAGE_ROOT_PATH
|
||||
)
|
||||
mark_as_advanced("${cache_var}")
|
||||
set("${program_var}" "${${cache_var}}" PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
# Find all ICU libraries
|
||||
list(APPEND icu_library_suffixes "${_lib64}" "lib")
|
||||
set(ICU_REQUIRED_LIBS_FOUND ON)
|
||||
set(static_prefix )
|
||||
# static icu libraries compiled with MSVC have the prefix 's'
|
||||
if(MSVC)
|
||||
set(static_prefix "s")
|
||||
endif()
|
||||
foreach(component ${ICU_FIND_COMPONENTS})
|
||||
string(TOUPPER "${component}" component_upcase)
|
||||
set(component_cache "ICU_${component_upcase}_LIBRARY")
|
||||
set(component_cache_release "${component_cache}_RELEASE")
|
||||
set(component_cache_debug "${component_cache}_DEBUG")
|
||||
set(component_found "ICU_${component_upcase}_FOUND")
|
||||
set(component_found_compat "${component_upcase}_FOUND")
|
||||
set(component_libnames "icu${component}")
|
||||
set(component_debug_libnames "icu${component}d")
|
||||
|
||||
# Special case deliberate library naming mismatches between Unix
|
||||
# and Windows builds
|
||||
unset(component_libnames)
|
||||
unset(component_debug_libnames)
|
||||
list(APPEND component_libnames "icu${component}")
|
||||
list(APPEND component_debug_libnames "icu${component}d")
|
||||
if(component STREQUAL "data")
|
||||
list(APPEND component_libnames "icudt")
|
||||
# Note there is no debug variant at present
|
||||
list(APPEND component_debug_libnames "icudtd")
|
||||
endif()
|
||||
if(component STREQUAL "dt")
|
||||
list(APPEND component_libnames "icudata")
|
||||
# Note there is no debug variant at present
|
||||
list(APPEND component_debug_libnames "icudatad")
|
||||
endif()
|
||||
if(component STREQUAL "i18n")
|
||||
list(APPEND component_libnames "icuin")
|
||||
list(APPEND component_debug_libnames "icuind")
|
||||
endif()
|
||||
if(component STREQUAL "in")
|
||||
list(APPEND component_libnames "icui18n")
|
||||
list(APPEND component_debug_libnames "icui18nd")
|
||||
endif()
|
||||
|
||||
if(static_prefix)
|
||||
unset(static_component_libnames)
|
||||
unset(static_component_debug_libnames)
|
||||
foreach(component_libname ${component_libnames})
|
||||
list(APPEND static_component_libnames
|
||||
${static_prefix}${component_libname})
|
||||
endforeach()
|
||||
foreach(component_libname ${component_debug_libnames})
|
||||
list(APPEND static_component_debug_libnames
|
||||
${static_prefix}${component_libname})
|
||||
endforeach()
|
||||
list(APPEND component_libnames ${static_component_libnames})
|
||||
list(APPEND component_debug_libnames ${static_component_debug_libnames})
|
||||
endif()
|
||||
find_library("${component_cache_release}"
|
||||
NAMES ${component_libnames}
|
||||
HINTS ${icu_roots}
|
||||
PATH_SUFFIXES ${icu_library_suffixes}
|
||||
DOC "ICU ${component} library (release)"
|
||||
NO_PACKAGE_ROOT_PATH
|
||||
)
|
||||
find_library("${component_cache_debug}"
|
||||
NAMES ${component_debug_libnames}
|
||||
HINTS ${icu_roots}
|
||||
PATH_SUFFIXES ${icu_library_suffixes}
|
||||
DOC "ICU ${component} library (debug)"
|
||||
NO_PACKAGE_ROOT_PATH
|
||||
)
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ICU_${component_upcase})
|
||||
mark_as_advanced("${component_cache_release}" "${component_cache_debug}")
|
||||
if(${component_cache})
|
||||
set("${component_found}" ON)
|
||||
set("${component_found_compat}" ON)
|
||||
list(APPEND ICU_LIBRARY "${${component_cache}}")
|
||||
if (ICU_FIND_REQUIRED_${component})
|
||||
list(APPEND ICU_LIBS_FOUND "${component} (required): ${${component_cache}}")
|
||||
else()
|
||||
list(APPEND ICU_LIBS_FOUND "${component} (optional): ${${component_cache}}")
|
||||
endif()
|
||||
else()
|
||||
if (ICU_FIND_REQUIRED_${component})
|
||||
set(ICU_REQUIRED_LIBS_FOUND OFF)
|
||||
list(APPEND ICU_LIBS_NOTFOUND "${component} (required)")
|
||||
else()
|
||||
list(APPEND ICU_LIBS_NOTFOUND "${component} (optional)")
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced("${component_found}")
|
||||
mark_as_advanced("${component_found_compat}")
|
||||
set("${component_cache}" "${${component_cache}}" PARENT_SCOPE)
|
||||
set("${component_found}" "${${component_found}}" PARENT_SCOPE)
|
||||
set("${component_found_compat}" "${${component_found_compat}}" PARENT_SCOPE)
|
||||
endforeach()
|
||||
set(_ICU_REQUIRED_LIBS_FOUND "${ICU_REQUIRED_LIBS_FOUND}" PARENT_SCOPE)
|
||||
set(ICU_LIBRARY "${ICU_LIBRARY}" PARENT_SCOPE)
|
||||
|
||||
# Find all ICU data files
|
||||
if(CMAKE_LIBRARY_ARCHITECTURE)
|
||||
list(APPEND icu_data_suffixes
|
||||
"${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}"
|
||||
"lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}"
|
||||
"${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu"
|
||||
"lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu")
|
||||
endif()
|
||||
list(APPEND icu_data_suffixes
|
||||
"${_lib64}/icu/${ICU_VERSION}"
|
||||
"lib/icu/${ICU_VERSION}"
|
||||
"${_lib64}/icu"
|
||||
"lib/icu")
|
||||
foreach(data ${icu_data})
|
||||
string(TOUPPER "${data}" data_upcase)
|
||||
string(REPLACE "." "_" data_upcase "${data_upcase}")
|
||||
set(cache_var "ICU_${data_upcase}")
|
||||
set(data_var "ICU_${data_upcase}")
|
||||
find_file("${cache_var}"
|
||||
NAMES "${data}"
|
||||
HINTS ${icu_roots}
|
||||
PATH_SUFFIXES ${icu_data_suffixes}
|
||||
DOC "ICU ${data} data file")
|
||||
mark_as_advanced("${cache_var}")
|
||||
set("${data_var}" "${${cache_var}}" PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
if(NOT ICU_FIND_QUIETLY)
|
||||
if(ICU_LIBS_FOUND)
|
||||
message(STATUS "Found the following ICU libraries:")
|
||||
foreach(found ${ICU_LIBS_FOUND})
|
||||
message(STATUS " ${found}")
|
||||
endforeach()
|
||||
endif()
|
||||
if(ICU_LIBS_NOTFOUND)
|
||||
message(STATUS "The following ICU libraries were not found:")
|
||||
foreach(notfound ${ICU_LIBS_NOTFOUND})
|
||||
message(STATUS " ${notfound}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ICU_DEBUG)
|
||||
message(STATUS "--------FindICU.cmake search debug--------")
|
||||
message(STATUS "ICU binary path search order: ${icu_roots}")
|
||||
message(STATUS "ICU include path search order: ${icu_roots}")
|
||||
message(STATUS "ICU library path search order: ${icu_roots}")
|
||||
message(STATUS "----------------")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
_ICU_FIND()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ICU
|
||||
FOUND_VAR ICU_FOUND
|
||||
REQUIRED_VARS ICU_INCLUDE_DIR
|
||||
ICU_LIBRARY
|
||||
_ICU_REQUIRED_LIBS_FOUND
|
||||
VERSION_VAR ICU_VERSION
|
||||
FAIL_MESSAGE "Failed to find all ICU components")
|
||||
|
||||
unset(_ICU_REQUIRED_LIBS_FOUND)
|
||||
|
||||
if(ICU_FOUND)
|
||||
set(ICU_INCLUDE_DIRS "${ICU_INCLUDE_DIR}")
|
||||
set(ICU_LIBRARIES "${ICU_LIBRARY}")
|
||||
foreach(_ICU_component ${ICU_FIND_COMPONENTS})
|
||||
string(TOUPPER "${_ICU_component}" _ICU_component_upcase)
|
||||
set(_ICU_component_cache "ICU_${_ICU_component_upcase}_LIBRARY")
|
||||
set(_ICU_component_cache_release "ICU_${_ICU_component_upcase}_LIBRARY_RELEASE")
|
||||
set(_ICU_component_cache_debug "ICU_${_ICU_component_upcase}_LIBRARY_DEBUG")
|
||||
set(_ICU_component_lib "ICU_${_ICU_component_upcase}_LIBRARIES")
|
||||
set(_ICU_component_found "ICU_${_ICU_component_upcase}_FOUND")
|
||||
set(_ICU_imported_target "ICU::${_ICU_component}")
|
||||
if(${_ICU_component_found})
|
||||
set("${_ICU_component_lib}" "${${_ICU_component_cache}}")
|
||||
if(NOT TARGET ${_ICU_imported_target})
|
||||
add_library(${_ICU_imported_target} UNKNOWN IMPORTED)
|
||||
if(ICU_INCLUDE_DIR)
|
||||
set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
|
||||
endif()
|
||||
if(EXISTS "${${_ICU_component_cache}}")
|
||||
set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${${_ICU_component_cache}}")
|
||||
endif()
|
||||
if(EXISTS "${${_ICU_component_cache_release}}")
|
||||
set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${${_ICU_component_cache_release}}")
|
||||
endif()
|
||||
if(EXISTS "${${_ICU_component_cache_debug}}")
|
||||
set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${${_ICU_component_cache_debug}}")
|
||||
endif()
|
||||
if(CMAKE_DL_LIBS AND _ICU_component STREQUAL "uc")
|
||||
set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
unset(_ICU_component_upcase)
|
||||
unset(_ICU_component_cache)
|
||||
unset(_ICU_component_lib)
|
||||
unset(_ICU_component_found)
|
||||
unset(_ICU_imported_target)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(ICU_DEBUG)
|
||||
message(STATUS "--------FindICU.cmake results debug--------")
|
||||
message(STATUS "ICU found: ${ICU_FOUND}")
|
||||
message(STATUS "ICU_VERSION number: ${ICU_VERSION}")
|
||||
message(STATUS "ICU_ROOT directory: ${ICU_ROOT}")
|
||||
message(STATUS "ICU_INCLUDE_DIR directory: ${ICU_INCLUDE_DIR}")
|
||||
message(STATUS "ICU_LIBRARIES: ${ICU_LIBRARIES}")
|
||||
|
||||
foreach(program IN LISTS icu_programs)
|
||||
string(TOUPPER "${program}" program_upcase)
|
||||
set(program_lib "ICU_${program_upcase}_EXECUTABLE")
|
||||
message(STATUS "${program} program: ${program_lib}=${${program_lib}}")
|
||||
unset(program_upcase)
|
||||
unset(program_lib)
|
||||
endforeach()
|
||||
|
||||
foreach(data IN LISTS icu_data)
|
||||
string(TOUPPER "${data}" data_upcase)
|
||||
string(REPLACE "." "_" data_upcase "${data_upcase}")
|
||||
set(data_lib "ICU_${data_upcase}")
|
||||
message(STATUS "${data} data: ${data_lib}=${${data_lib}}")
|
||||
unset(data_upcase)
|
||||
unset(data_lib)
|
||||
endforeach()
|
||||
|
||||
foreach(component IN LISTS ICU_FIND_COMPONENTS)
|
||||
string(TOUPPER "${component}" component_upcase)
|
||||
set(component_lib "ICU_${component_upcase}_LIBRARIES")
|
||||
set(component_found "ICU_${component_upcase}_FOUND")
|
||||
set(component_found_compat "${component_upcase}_FOUND")
|
||||
message(STATUS "${component} library found: ${component_found}=${${component_found}}")
|
||||
message(STATUS "${component} library found (compat name): ${component_found_compat}=${${component_found_compat}}")
|
||||
message(STATUS "${component} library: ${component_lib}=${${component_lib}}")
|
||||
unset(component_upcase)
|
||||
unset(component_lib)
|
||||
unset(component_found)
|
||||
unset(component_found_compat)
|
||||
endforeach()
|
||||
message(STATUS "----------------")
|
||||
endif()
|
||||
|
||||
unset(icu_programs)
|
||||
|
||||
+10
-575
@@ -1,134 +1,8 @@
|
||||
diff -Naur boost/libs/iostreams/cmake/FindZLIB.cmake BOOST_BLD/libs/iostreams/cmake/FindZLIB.cmake
|
||||
--- boost/libs/iostreams/cmake/FindZLIB.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ BOOST_BLD/libs/iostreams/cmake/FindZLIB.cmake 2023-09-19 20:06:29.832486499 -0400
|
||||
@@ -0,0 +1,123 @@
|
||||
+#.rst:
|
||||
+# FindZLIB
|
||||
+# --------
|
||||
+#
|
||||
+# Find the native ZLIB includes and library.
|
||||
+#
|
||||
+# IMPORTED Targets
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
+# ZLIB has been found.
|
||||
+#
|
||||
+# Result Variables
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines the following variables:
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
+# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
+# ZLIB_FOUND - True if zlib found.
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
+# ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
+# ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
+# ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
+# ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
+#
|
||||
+# Backward Compatibility
|
||||
+# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# The following variable are provided for backward compatibility
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
+# ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
+# ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
+#
|
||||
+# Hints
|
||||
+# ^^^^^
|
||||
+#
|
||||
+# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
+# module where to look.
|
||||
+
|
||||
+#=============================================================================
|
||||
+# Copyright 2001-2011 Kitware, Inc.
|
||||
+#
|
||||
+# Distributed under the OSI-approved BSD License (the "License");
|
||||
+# see accompanying file Copyright.txt for details.
|
||||
+#
|
||||
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+# See the License for more information.
|
||||
+#=============================================================================
|
||||
+# (To distribute this file outside of CMake, substitute the full
|
||||
+# License text for the above reference.)
|
||||
+
|
||||
+set(_ZLIB_SEARCHES)
|
||||
+
|
||||
+# Search ZLIB_ROOT first if it is set.
|
||||
+if(ZLIB_ROOT)
|
||||
+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
+endif()
|
||||
+
|
||||
+# Normal search.
|
||||
+set(_ZLIB_SEARCH_NORMAL
|
||||
+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
+ "$ENV{PROGRAMFILES}/zlib"
|
||||
+ )
|
||||
+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
+
|
||||
+set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1)
|
||||
+
|
||||
+# Try each search configuration.
|
||||
+foreach(search ${_ZLIB_SEARCHES})
|
||||
+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
|
||||
+endforeach()
|
||||
+
|
||||
+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
+
|
||||
+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
+
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
+
|
||||
+ # only append a TWEAK version if it exists:
|
||||
+ set(ZLIB_VERSION_TWEAK "")
|
||||
+ if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
+endif()
|
||||
+
|
||||
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
+# all listed variables are TRUE
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
+ VERSION_VAR ZLIB_VERSION_STRING)
|
||||
+
|
||||
+if(ZLIB_FOUND)
|
||||
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
+
|
||||
+ if(NOT TARGET ZLIB::ZLIB)
|
||||
+ add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
+ set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
+ IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
+ endif()
|
||||
+endif()
|
||||
diff -Naur boost/libs/iostreams/CMakeLists.txt BOOST_BLD/libs/iostreams/CMakeLists.txt
|
||||
--- boost/libs/iostreams/CMakeLists.txt 2023-09-19 20:13:32.123188586 -0400
|
||||
+++ BOOST_BLD/libs/iostreams/CMakeLists.txt 2023-09-19 20:07:09.587847180 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
diff --git a/libs/iostreams/CMakeLists.txt b/libs/iostreams/CMakeLists.txt
|
||||
index 1d8352f5..11f8e584 100644
|
||||
--- a/libs/iostreams/CMakeLists.txt
|
||||
+++ b/libs/iostreams/CMakeLists.txt
|
||||
@@ -6,6 +6,8 @@ cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_iostreams VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
@@ -137,450 +11,11 @@ diff -Naur boost/libs/iostreams/CMakeLists.txt BOOST_BLD/libs/iostreams/CMakeLis
|
||||
add_library(boost_iostreams
|
||||
src/file_descriptor.cpp
|
||||
src/mapped_file.cpp
|
||||
diff -Naur boost/libs/locale/cmake/FindICU.cmake BOOST_BLD/libs/locale/cmake/FindICU.cmake
|
||||
--- boost/libs/locale/cmake/FindICU.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ BOOST_BLD/libs/locale/cmake/FindICU.cmake 2023-09-19 20:12:51.128083577 -0400
|
||||
@@ -0,0 +1,436 @@
|
||||
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
+# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
+
|
||||
+#[=======================================================================[.rst:
|
||||
+FindICU
|
||||
+-------
|
||||
+
|
||||
+.. versionadded:: 3.7
|
||||
+
|
||||
+Find the International Components for Unicode (ICU) libraries and
|
||||
+programs.
|
||||
+
|
||||
+This module supports multiple components.
|
||||
+Components can include any of: ``data``, ``i18n``, ``io``, ``le``,
|
||||
+``lx``, ``test``, ``tu`` and ``uc``.
|
||||
+
|
||||
+Note that on Windows ``data`` is named ``dt`` and ``i18n`` is named
|
||||
+``in``; any of the names may be used, and the appropriate
|
||||
+platform-specific library name will be automatically selected.
|
||||
+
|
||||
+.. versionadded:: 3.11
|
||||
+ Added support for static libraries on Windows.
|
||||
+
|
||||
+This module reports information about the ICU installation in
|
||||
+several variables. General variables::
|
||||
+
|
||||
+ ICU_VERSION - ICU release version
|
||||
+ ICU_FOUND - true if the main programs and libraries were found
|
||||
+ ICU_LIBRARIES - component libraries to be linked
|
||||
+ ICU_INCLUDE_DIRS - the directories containing the ICU headers
|
||||
+
|
||||
+Imported targets::
|
||||
+
|
||||
+ ICU::<C>
|
||||
+
|
||||
+Where ``<C>`` is the name of an ICU component, for example
|
||||
+``ICU::i18n``; ``<C>`` is lower-case.
|
||||
+
|
||||
+ICU programs are reported in::
|
||||
+
|
||||
+ ICU_GENCNVAL_EXECUTABLE - path to gencnval executable
|
||||
+ ICU_ICUINFO_EXECUTABLE - path to icuinfo executable
|
||||
+ ICU_GENBRK_EXECUTABLE - path to genbrk executable
|
||||
+ ICU_ICU-CONFIG_EXECUTABLE - path to icu-config executable
|
||||
+ ICU_GENRB_EXECUTABLE - path to genrb executable
|
||||
+ ICU_GENDICT_EXECUTABLE - path to gendict executable
|
||||
+ ICU_DERB_EXECUTABLE - path to derb executable
|
||||
+ ICU_PKGDATA_EXECUTABLE - path to pkgdata executable
|
||||
+ ICU_UCONV_EXECUTABLE - path to uconv executable
|
||||
+ ICU_GENCFU_EXECUTABLE - path to gencfu executable
|
||||
+ ICU_MAKECONV_EXECUTABLE - path to makeconv executable
|
||||
+ ICU_GENNORM2_EXECUTABLE - path to gennorm2 executable
|
||||
+ ICU_GENCCODE_EXECUTABLE - path to genccode executable
|
||||
+ ICU_GENSPREP_EXECUTABLE - path to gensprep executable
|
||||
+ ICU_ICUPKG_EXECUTABLE - path to icupkg executable
|
||||
+ ICU_GENCMN_EXECUTABLE - path to gencmn executable
|
||||
+
|
||||
+ICU component libraries are reported in::
|
||||
+
|
||||
+ ICU_<C>_FOUND - ON if component was found; ``<C>`` is upper-case.
|
||||
+ ICU_<C>_LIBRARIES - libraries for component; ``<C>`` is upper-case.
|
||||
+
|
||||
+ICU datafiles are reported in::
|
||||
+
|
||||
+ ICU_MAKEFILE_INC - Makefile.inc
|
||||
+ ICU_PKGDATA_INC - pkgdata.inc
|
||||
+
|
||||
+This module reads hints about search results from::
|
||||
+
|
||||
+ ICU_ROOT - the root of the ICU installation
|
||||
+
|
||||
+The environment variable ``ICU_ROOT`` may also be used; the
|
||||
+ICU_ROOT variable takes precedence.
|
||||
+
|
||||
+The following cache variables may also be set::
|
||||
+
|
||||
+ ICU_<P>_EXECUTABLE - the path to executable <P>; ``<P>`` is upper-case.
|
||||
+ ICU_INCLUDE_DIR - the directory containing the ICU headers
|
||||
+ ICU_<C>_LIBRARY - the library for component <C>; ``<C>`` is upper-case.
|
||||
+
|
||||
+.. note::
|
||||
+
|
||||
+ In most cases none of the above variables will require setting,
|
||||
+ unless multiple ICU versions are available and a specific version
|
||||
+ is required.
|
||||
+
|
||||
+Other variables one may set to control this module are::
|
||||
+
|
||||
+ ICU_DEBUG - Set to ON to enable debug output from FindICU.
|
||||
+#]=======================================================================]
|
||||
+
|
||||
+# Written by Roger Leigh <rleigh@codelibre.net>
|
||||
+
|
||||
+set(icu_programs
|
||||
+ gencnval
|
||||
+ icuinfo
|
||||
+ genbrk
|
||||
+ icu-config
|
||||
+ genrb
|
||||
+ gendict
|
||||
+ derb
|
||||
+ pkgdata
|
||||
+ uconv
|
||||
+ gencfu
|
||||
+ makeconv
|
||||
+ gennorm2
|
||||
+ genccode
|
||||
+ gensprep
|
||||
+ icupkg
|
||||
+ gencmn)
|
||||
+
|
||||
+set(icu_data
|
||||
+ Makefile.inc
|
||||
+ pkgdata.inc)
|
||||
+
|
||||
+# The ICU checks are contained in a function due to the large number
|
||||
+# of temporary variables needed.
|
||||
+function(_ICU_FIND)
|
||||
+ # Set up search paths, taking compiler into account. Search ICU_ROOT,
|
||||
+ # with ICU_ROOT in the environment as a fallback if unset.
|
||||
+ if(ICU_ROOT)
|
||||
+ list(APPEND icu_roots "${ICU_ROOT}")
|
||||
+ else()
|
||||
+ if(NOT "$ENV{ICU_ROOT}" STREQUAL "")
|
||||
+ file(TO_CMAKE_PATH "$ENV{ICU_ROOT}" NATIVE_PATH)
|
||||
+ list(APPEND icu_roots "${NATIVE_PATH}")
|
||||
+ set(ICU_ROOT "${NATIVE_PATH}"
|
||||
+ CACHE PATH "Location of the ICU installation" FORCE)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ # Find include directory
|
||||
+ list(APPEND icu_include_suffixes "include")
|
||||
+ find_path(ICU_INCLUDE_DIR
|
||||
+ NAMES "unicode/utypes.h"
|
||||
+ HINTS ${icu_roots}
|
||||
+ PATH_SUFFIXES ${icu_include_suffixes}
|
||||
+ DOC "ICU include directory")
|
||||
+ set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE)
|
||||
+
|
||||
+ # Get version
|
||||
+ if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h")
|
||||
+ file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str
|
||||
+ REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*")
|
||||
+
|
||||
+ string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*"
|
||||
+ "\\1" icu_version_string "${icu_header_str}")
|
||||
+ set(ICU_VERSION "${icu_version_string}")
|
||||
+ set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE)
|
||||
+ unset(icu_header_str)
|
||||
+ unset(icu_version_string)
|
||||
+ endif()
|
||||
+
|
||||
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
+ # 64-bit binary directory
|
||||
+ set(_bin64 "bin64")
|
||||
+ # 64-bit library directory
|
||||
+ set(_lib64 "lib64")
|
||||
+ endif()
|
||||
+
|
||||
+
|
||||
+ # Find all ICU programs
|
||||
+ list(APPEND icu_binary_suffixes "${_bin64}" "bin" "sbin")
|
||||
+ foreach(program ${icu_programs})
|
||||
+ string(TOUPPER "${program}" program_upcase)
|
||||
+ set(cache_var "ICU_${program_upcase}_EXECUTABLE")
|
||||
+ set(program_var "ICU_${program_upcase}_EXECUTABLE")
|
||||
+ find_program("${cache_var}"
|
||||
+ NAMES "${program}"
|
||||
+ HINTS ${icu_roots}
|
||||
+ PATH_SUFFIXES ${icu_binary_suffixes}
|
||||
+ DOC "ICU ${program} executable"
|
||||
+ NO_PACKAGE_ROOT_PATH
|
||||
+ )
|
||||
+ mark_as_advanced("${cache_var}")
|
||||
+ set("${program_var}" "${${cache_var}}" PARENT_SCOPE)
|
||||
+ endforeach()
|
||||
+
|
||||
+ # Find all ICU libraries
|
||||
+ list(APPEND icu_library_suffixes "${_lib64}" "lib")
|
||||
+ set(ICU_REQUIRED_LIBS_FOUND ON)
|
||||
+ set(static_prefix )
|
||||
+ # static icu libraries compiled with MSVC have the prefix 's'
|
||||
+ if(MSVC)
|
||||
+ set(static_prefix "s")
|
||||
+ endif()
|
||||
+ foreach(component ${ICU_FIND_COMPONENTS})
|
||||
+ string(TOUPPER "${component}" component_upcase)
|
||||
+ set(component_cache "ICU_${component_upcase}_LIBRARY")
|
||||
+ set(component_cache_release "${component_cache}_RELEASE")
|
||||
+ set(component_cache_debug "${component_cache}_DEBUG")
|
||||
+ set(component_found "ICU_${component_upcase}_FOUND")
|
||||
+ set(component_found_compat "${component_upcase}_FOUND")
|
||||
+ set(component_libnames "icu${component}")
|
||||
+ set(component_debug_libnames "icu${component}d")
|
||||
+
|
||||
+ # Special case deliberate library naming mismatches between Unix
|
||||
+ # and Windows builds
|
||||
+ unset(component_libnames)
|
||||
+ unset(component_debug_libnames)
|
||||
+ list(APPEND component_libnames "icu${component}")
|
||||
+ list(APPEND component_debug_libnames "icu${component}d")
|
||||
+ if(component STREQUAL "data")
|
||||
+ list(APPEND component_libnames "icudt")
|
||||
+ # Note there is no debug variant at present
|
||||
+ list(APPEND component_debug_libnames "icudtd")
|
||||
+ endif()
|
||||
+ if(component STREQUAL "dt")
|
||||
+ list(APPEND component_libnames "icudata")
|
||||
+ # Note there is no debug variant at present
|
||||
+ list(APPEND component_debug_libnames "icudatad")
|
||||
+ endif()
|
||||
+ if(component STREQUAL "i18n")
|
||||
+ list(APPEND component_libnames "icuin")
|
||||
+ list(APPEND component_debug_libnames "icuind")
|
||||
+ endif()
|
||||
+ if(component STREQUAL "in")
|
||||
+ list(APPEND component_libnames "icui18n")
|
||||
+ list(APPEND component_debug_libnames "icui18nd")
|
||||
+ endif()
|
||||
+
|
||||
+ if(static_prefix)
|
||||
+ unset(static_component_libnames)
|
||||
+ unset(static_component_debug_libnames)
|
||||
+ foreach(component_libname ${component_libnames})
|
||||
+ list(APPEND static_component_libnames
|
||||
+ ${static_prefix}${component_libname})
|
||||
+ endforeach()
|
||||
+ foreach(component_libname ${component_debug_libnames})
|
||||
+ list(APPEND static_component_debug_libnames
|
||||
+ ${static_prefix}${component_libname})
|
||||
+ endforeach()
|
||||
+ list(APPEND component_libnames ${static_component_libnames})
|
||||
+ list(APPEND component_debug_libnames ${static_component_debug_libnames})
|
||||
+ endif()
|
||||
+ find_library("${component_cache_release}"
|
||||
+ NAMES ${component_libnames}
|
||||
+ HINTS ${icu_roots}
|
||||
+ PATH_SUFFIXES ${icu_library_suffixes}
|
||||
+ DOC "ICU ${component} library (release)"
|
||||
+ NO_PACKAGE_ROOT_PATH
|
||||
+ )
|
||||
+ find_library("${component_cache_debug}"
|
||||
+ NAMES ${component_debug_libnames}
|
||||
+ HINTS ${icu_roots}
|
||||
+ PATH_SUFFIXES ${icu_library_suffixes}
|
||||
+ DOC "ICU ${component} library (debug)"
|
||||
+ NO_PACKAGE_ROOT_PATH
|
||||
+ )
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ select_library_configurations(ICU_${component_upcase})
|
||||
+ mark_as_advanced("${component_cache_release}" "${component_cache_debug}")
|
||||
+ if(${component_cache})
|
||||
+ set("${component_found}" ON)
|
||||
+ set("${component_found_compat}" ON)
|
||||
+ list(APPEND ICU_LIBRARY "${${component_cache}}")
|
||||
+ if (ICU_FIND_REQUIRED_${component})
|
||||
+ list(APPEND ICU_LIBS_FOUND "${component} (required): ${${component_cache}}")
|
||||
+ else()
|
||||
+ list(APPEND ICU_LIBS_FOUND "${component} (optional): ${${component_cache}}")
|
||||
+ endif()
|
||||
+ else()
|
||||
+ if (ICU_FIND_REQUIRED_${component})
|
||||
+ set(ICU_REQUIRED_LIBS_FOUND OFF)
|
||||
+ list(APPEND ICU_LIBS_NOTFOUND "${component} (required)")
|
||||
+ else()
|
||||
+ list(APPEND ICU_LIBS_NOTFOUND "${component} (optional)")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ mark_as_advanced("${component_found}")
|
||||
+ mark_as_advanced("${component_found_compat}")
|
||||
+ set("${component_cache}" "${${component_cache}}" PARENT_SCOPE)
|
||||
+ set("${component_found}" "${${component_found}}" PARENT_SCOPE)
|
||||
+ set("${component_found_compat}" "${${component_found_compat}}" PARENT_SCOPE)
|
||||
+ endforeach()
|
||||
+ set(_ICU_REQUIRED_LIBS_FOUND "${ICU_REQUIRED_LIBS_FOUND}" PARENT_SCOPE)
|
||||
+ set(ICU_LIBRARY "${ICU_LIBRARY}" PARENT_SCOPE)
|
||||
+
|
||||
+ # Find all ICU data files
|
||||
+ if(CMAKE_LIBRARY_ARCHITECTURE)
|
||||
+ list(APPEND icu_data_suffixes
|
||||
+ "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}"
|
||||
+ "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}"
|
||||
+ "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu"
|
||||
+ "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu")
|
||||
+ endif()
|
||||
+ list(APPEND icu_data_suffixes
|
||||
+ "${_lib64}/icu/${ICU_VERSION}"
|
||||
+ "lib/icu/${ICU_VERSION}"
|
||||
+ "${_lib64}/icu"
|
||||
+ "lib/icu")
|
||||
+ foreach(data ${icu_data})
|
||||
+ string(TOUPPER "${data}" data_upcase)
|
||||
+ string(REPLACE "." "_" data_upcase "${data_upcase}")
|
||||
+ set(cache_var "ICU_${data_upcase}")
|
||||
+ set(data_var "ICU_${data_upcase}")
|
||||
+ find_file("${cache_var}"
|
||||
+ NAMES "${data}"
|
||||
+ HINTS ${icu_roots}
|
||||
+ PATH_SUFFIXES ${icu_data_suffixes}
|
||||
+ DOC "ICU ${data} data file")
|
||||
+ mark_as_advanced("${cache_var}")
|
||||
+ set("${data_var}" "${${cache_var}}" PARENT_SCOPE)
|
||||
+ endforeach()
|
||||
+
|
||||
+ if(NOT ICU_FIND_QUIETLY)
|
||||
+ if(ICU_LIBS_FOUND)
|
||||
+ message(STATUS "Found the following ICU libraries:")
|
||||
+ foreach(found ${ICU_LIBS_FOUND})
|
||||
+ message(STATUS " ${found}")
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ if(ICU_LIBS_NOTFOUND)
|
||||
+ message(STATUS "The following ICU libraries were not found:")
|
||||
+ foreach(notfound ${ICU_LIBS_NOTFOUND})
|
||||
+ message(STATUS " ${notfound}")
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if(ICU_DEBUG)
|
||||
+ message(STATUS "--------FindICU.cmake search debug--------")
|
||||
+ message(STATUS "ICU binary path search order: ${icu_roots}")
|
||||
+ message(STATUS "ICU include path search order: ${icu_roots}")
|
||||
+ message(STATUS "ICU library path search order: ${icu_roots}")
|
||||
+ message(STATUS "----------------")
|
||||
+ endif()
|
||||
+endfunction()
|
||||
+
|
||||
+_ICU_FIND()
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ICU
|
||||
+ FOUND_VAR ICU_FOUND
|
||||
+ REQUIRED_VARS ICU_INCLUDE_DIR
|
||||
+ ICU_LIBRARY
|
||||
+ _ICU_REQUIRED_LIBS_FOUND
|
||||
+ VERSION_VAR ICU_VERSION
|
||||
+ FAIL_MESSAGE "Failed to find all ICU components")
|
||||
+
|
||||
+unset(_ICU_REQUIRED_LIBS_FOUND)
|
||||
+
|
||||
+if(ICU_FOUND)
|
||||
+ set(ICU_INCLUDE_DIRS "${ICU_INCLUDE_DIR}")
|
||||
+ set(ICU_LIBRARIES "${ICU_LIBRARY}")
|
||||
+ foreach(_ICU_component ${ICU_FIND_COMPONENTS})
|
||||
+ string(TOUPPER "${_ICU_component}" _ICU_component_upcase)
|
||||
+ set(_ICU_component_cache "ICU_${_ICU_component_upcase}_LIBRARY")
|
||||
+ set(_ICU_component_cache_release "ICU_${_ICU_component_upcase}_LIBRARY_RELEASE")
|
||||
+ set(_ICU_component_cache_debug "ICU_${_ICU_component_upcase}_LIBRARY_DEBUG")
|
||||
+ set(_ICU_component_lib "ICU_${_ICU_component_upcase}_LIBRARIES")
|
||||
+ set(_ICU_component_found "ICU_${_ICU_component_upcase}_FOUND")
|
||||
+ set(_ICU_imported_target "ICU::${_ICU_component}")
|
||||
+ if(${_ICU_component_found})
|
||||
+ set("${_ICU_component_lib}" "${${_ICU_component_cache}}")
|
||||
+ if(NOT TARGET ${_ICU_imported_target})
|
||||
+ add_library(${_ICU_imported_target} UNKNOWN IMPORTED)
|
||||
+ if(ICU_INCLUDE_DIR)
|
||||
+ set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
|
||||
+ endif()
|
||||
+ if(EXISTS "${${_ICU_component_cache}}")
|
||||
+ set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
+ IMPORTED_LOCATION "${${_ICU_component_cache}}")
|
||||
+ endif()
|
||||
+ if(EXISTS "${${_ICU_component_cache_release}}")
|
||||
+ set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
|
||||
+ IMPORTED_CONFIGURATIONS RELEASE)
|
||||
+ set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
+ IMPORTED_LOCATION_RELEASE "${${_ICU_component_cache_release}}")
|
||||
+ endif()
|
||||
+ if(EXISTS "${${_ICU_component_cache_debug}}")
|
||||
+ set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
|
||||
+ IMPORTED_CONFIGURATIONS DEBUG)
|
||||
+ set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
+ IMPORTED_LOCATION_DEBUG "${${_ICU_component_cache_debug}}")
|
||||
+ endif()
|
||||
+ if(CMAKE_DL_LIBS AND _ICU_component STREQUAL "uc")
|
||||
+ set_target_properties(${_ICU_imported_target} PROPERTIES
|
||||
+ INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ unset(_ICU_component_upcase)
|
||||
+ unset(_ICU_component_cache)
|
||||
+ unset(_ICU_component_lib)
|
||||
+ unset(_ICU_component_found)
|
||||
+ unset(_ICU_imported_target)
|
||||
+ endforeach()
|
||||
+endif()
|
||||
+
|
||||
+if(ICU_DEBUG)
|
||||
+ message(STATUS "--------FindICU.cmake results debug--------")
|
||||
+ message(STATUS "ICU found: ${ICU_FOUND}")
|
||||
+ message(STATUS "ICU_VERSION number: ${ICU_VERSION}")
|
||||
+ message(STATUS "ICU_ROOT directory: ${ICU_ROOT}")
|
||||
+ message(STATUS "ICU_INCLUDE_DIR directory: ${ICU_INCLUDE_DIR}")
|
||||
+ message(STATUS "ICU_LIBRARIES: ${ICU_LIBRARIES}")
|
||||
+
|
||||
+ foreach(program IN LISTS icu_programs)
|
||||
+ string(TOUPPER "${program}" program_upcase)
|
||||
+ set(program_lib "ICU_${program_upcase}_EXECUTABLE")
|
||||
+ message(STATUS "${program} program: ${program_lib}=${${program_lib}}")
|
||||
+ unset(program_upcase)
|
||||
+ unset(program_lib)
|
||||
+ endforeach()
|
||||
+
|
||||
+ foreach(data IN LISTS icu_data)
|
||||
+ string(TOUPPER "${data}" data_upcase)
|
||||
+ string(REPLACE "." "_" data_upcase "${data_upcase}")
|
||||
+ set(data_lib "ICU_${data_upcase}")
|
||||
+ message(STATUS "${data} data: ${data_lib}=${${data_lib}}")
|
||||
+ unset(data_upcase)
|
||||
+ unset(data_lib)
|
||||
+ endforeach()
|
||||
+
|
||||
+ foreach(component IN LISTS ICU_FIND_COMPONENTS)
|
||||
+ string(TOUPPER "${component}" component_upcase)
|
||||
+ set(component_lib "ICU_${component_upcase}_LIBRARIES")
|
||||
+ set(component_found "ICU_${component_upcase}_FOUND")
|
||||
+ set(component_found_compat "${component_upcase}_FOUND")
|
||||
+ message(STATUS "${component} library found: ${component_found}=${${component_found}}")
|
||||
+ message(STATUS "${component} library found (compat name): ${component_found_compat}=${${component_found_compat}}")
|
||||
+ message(STATUS "${component} library: ${component_lib}=${${component_lib}}")
|
||||
+ unset(component_upcase)
|
||||
+ unset(component_lib)
|
||||
+ unset(component_found)
|
||||
+ unset(component_found_compat)
|
||||
+ endforeach()
|
||||
+ message(STATUS "----------------")
|
||||
+endif()
|
||||
+
|
||||
+unset(icu_programs)
|
||||
diff -Naur boost/libs/locale/CMakeLists.txt BOOST_BLD/libs/locale/CMakeLists.txt
|
||||
--- boost/libs/locale/CMakeLists.txt 2023-09-19 20:13:32.379183041 -0400
|
||||
+++ BOOST_BLD/libs/locale/CMakeLists.txt 2023-09-19 20:12:31.660513836 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
diff --git a/libs/locale/CMakeLists.txt b/libs/locale/CMakeLists.txt
|
||||
index f47ad394..21956d88 100644
|
||||
--- a/libs/locale/CMakeLists.txt
|
||||
+++ b/libs/locale/CMakeLists.txt
|
||||
@@ -6,6 +6,8 @@ cmake_minimum_required(VERSION 3.11...3.20)
|
||||
|
||||
project(boost_locale VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
# Decide if we're using Bullet
|
||||
cad_enable(BULLET "libged")
|
||||
|
||||
bext_enable(Bullet)
|
||||
|
||||
# Decision made, start processing if we are enabled
|
||||
|
||||
if (ENABLE_BULLET)
|
||||
|
||||
git_submodule_init(bullet3 CMakeLists.txt)
|
||||
|
||||
RegisterDeps(BULLET)
|
||||
|
||||
set(BULLET_CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DBIN_DIR=${BIN_DIR}
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
||||
-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}
|
||||
-DINSTALL_LIBS=ON
|
||||
-DUSE_DOUBLE_PRECISION=ON
|
||||
-DUSE_GRAPHICAL_BENCHMARK=OFF
|
||||
-DBUILD_BULLET3=OFF
|
||||
-DBUILD_EXTRAS=OFF
|
||||
-DENABLE_VHACD=OFF
|
||||
-DBUILD_CPU_DEMOS=OFF
|
||||
-DUSE_GLUT=OFF
|
||||
-DBUILD_ENET=OFF
|
||||
-DBUILD_CLSOCKET=OFF
|
||||
-DBUILD_EGL=OFF
|
||||
-DBUILD_OPENGL3_DEMOS=OFF
|
||||
-DBUILD_BULLET2_DEMOS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND BULLET_CMAKE_ARGS
|
||||
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(BULLET_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/bullet3"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/bullet_cmake.patch
|
||||
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/bullet_wdocumentation.patch
|
||||
CMAKE_ARGS ${BULLET_CMAKE_ARGS}
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
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
|
||||
)
|
||||
|
||||
TargetInstallDeps(BULLET BULLET_DEPENDS)
|
||||
|
||||
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bullet3/LICENSE.txt
|
||||
${DOC_LICENSE_DIR}/bullet.txt
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
endif (ENABLE_BULLET)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
Submodule
+1
Submodule bullet/bullet3 added at 63c4d67e33
@@ -0,0 +1,12 @@
|
||||
diff -Naur bullet3/CMakeLists.txt BULLET_BLD/CMakeLists.txt
|
||||
--- bullet3/CMakeLists.txt 2026-03-18 12:04:48.152344880 -0400
|
||||
+++ BULLET_BLD/CMakeLists.txt 2026-03-18 09:52:07.100507175 -0400
|
||||
@@ -23,6 +23,8 @@
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
#MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})
|
||||
|
||||
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
+
|
||||
OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
|
||||
SET(CLAMP_VELOCITIES "0" CACHE STRING "Clamp rigid bodies' velocity to this value, if larger than zero. Useful to prevent floating point errors or in general runaway velocities in complex scenarios")
|
||||
OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" ON)
|
||||
@@ -0,0 +1,197 @@
|
||||
diff --git a/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
|
||||
index 1febc2b..e2b550c 100644
|
||||
--- a/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
|
||||
+++ b/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
|
||||
@@ -240,7 +240,7 @@ This is accessible through btGeneric6DofConstraint.getLimitMotor method,
|
||||
This brings support for limit parameters and motors. </li>
|
||||
|
||||
<li> Angulars limits have these possible ranges:
|
||||
-<table border=1 >
|
||||
+<table border="1" >
|
||||
<tr>
|
||||
<td><b>AXIS</b></td>
|
||||
<td><b>MIN ANGLE</b></td>
|
||||
diff --git a/src/LinearMath/btMatrix3x3.h b/src/LinearMath/btMatrix3x3.h
|
||||
index 4391a52..d43d51c 100644
|
||||
--- a/src/LinearMath/btMatrix3x3.h
|
||||
+++ b/src/LinearMath/btMatrix3x3.h
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
* @param rot stores the rotation from the coordinate system in which the matrix is diagonal to the original
|
||||
* coordinate system, i.e., old_this = rot * new_this * rot^T.
|
||||
* @param threshold See iteration
|
||||
- * @param iteration The iteration stops when all off-diagonal elements are less than the threshold multiplied
|
||||
+ * @param maxSteps The iteration stops when all off-diagonal elements are less than the threshold multiplied
|
||||
* by the sum of the absolute values of the diagonal, or when maxSteps have been executed.
|
||||
*
|
||||
* Note that this matrix is assumed to be symmetric.
|
||||
@@ -794,8 +794,8 @@ public:
|
||||
/**@brief Calculate the matrix cofactor
|
||||
* @param r1 The first row to use for calculating the cofactor
|
||||
* @param c1 The first column to use for calculating the cofactor
|
||||
- * @param r1 The second row to use for calculating the cofactor
|
||||
- * @param c1 The second column to use for calculating the cofactor
|
||||
+ * @param r2 The second row to use for calculating the cofactor
|
||||
+ * @param c2 The second column to use for calculating the cofactor
|
||||
* See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more details
|
||||
*/
|
||||
btScalar cofac(int r1, int c1, int r2, int c2) const
|
||||
diff --git a/src/LinearMath/btQuadWord.h b/src/LinearMath/btQuadWord.h
|
||||
index 851596b..682a13c 100644
|
||||
--- a/src/LinearMath/btQuadWord.h
|
||||
+++ b/src/LinearMath/btQuadWord.h
|
||||
@@ -142,9 +142,9 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Set x,y,z and zero w
|
||||
- * @param x Value of x
|
||||
- * @param y Value of y
|
||||
- * @param z Value of z
|
||||
+ * @param _x Value of x
|
||||
+ * @param _y Value of y
|
||||
+ * @param _z Value of z
|
||||
*/
|
||||
SIMD_FORCE_INLINE void setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z)
|
||||
{
|
||||
@@ -162,10 +162,10 @@ public:
|
||||
}
|
||||
*/
|
||||
/**@brief Set the values
|
||||
- * @param x Value of x
|
||||
- * @param y Value of y
|
||||
- * @param z Value of z
|
||||
- * @param w Value of w
|
||||
+ * @param _x Value of x
|
||||
+ * @param _y Value of y
|
||||
+ * @param _z Value of z
|
||||
+ * @param _w Value of w
|
||||
*/
|
||||
SIMD_FORCE_INLINE void setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z, const btScalar& _w)
|
||||
{
|
||||
@@ -181,9 +181,9 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Three argument constructor (zeros w)
|
||||
- * @param x Value of x
|
||||
- * @param y Value of y
|
||||
- * @param z Value of z
|
||||
+ * @param _x Value of x
|
||||
+ * @param _y Value of y
|
||||
+ * @param _z Value of z
|
||||
*/
|
||||
SIMD_FORCE_INLINE btQuadWord(const btScalar& _x, const btScalar& _y, const btScalar& _z)
|
||||
{
|
||||
@@ -191,10 +191,10 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Initializing constructor
|
||||
- * @param x Value of x
|
||||
- * @param y Value of y
|
||||
- * @param z Value of z
|
||||
- * @param w Value of w
|
||||
+ * @param _x Value of x
|
||||
+ * @param _y Value of y
|
||||
+ * @param _z Value of z
|
||||
+ * @param _w Value of w
|
||||
*/
|
||||
SIMD_FORCE_INLINE btQuadWord(const btScalar& _x, const btScalar& _y, const btScalar& _z, const btScalar& _w)
|
||||
{
|
||||
diff --git a/src/LinearMath/btQuaternion.h b/src/LinearMath/btQuaternion.h
|
||||
index 40d6e14..6c68fae 100644
|
||||
--- a/src/LinearMath/btQuaternion.h
|
||||
+++ b/src/LinearMath/btQuaternion.h
|
||||
@@ -84,8 +84,8 @@ public:
|
||||
{
|
||||
}
|
||||
/**@brief Axis angle Constructor
|
||||
- * @param axis The axis which the rotation is around
|
||||
- * @param angle The magnitude of the rotation around the angle (Radians) */
|
||||
+ * @param _axis The axis which the rotation is around
|
||||
+ * @param _angle The magnitude of the rotation around the angle (Radians) */
|
||||
btQuaternion(const btVector3& _axis, const btScalar& _angle)
|
||||
{
|
||||
setRotation(_axis, _angle);
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
}
|
||||
/**@brief Set the rotation using axis angle notation
|
||||
* @param axis The axis around which to rotate
|
||||
- * @param angle The magnitude of the rotation in Radians */
|
||||
+ * @param _angle The magnitude of the rotation in Radians */
|
||||
void setRotation(const btVector3& axis, const btScalar& _angle)
|
||||
{
|
||||
btScalar d = axis.length();
|
||||
@@ -134,9 +134,9 @@ public:
|
||||
cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
|
||||
}
|
||||
/**@brief Set the quaternion using euler angles
|
||||
- * @param yaw Angle around Z
|
||||
- * @param pitch Angle around Y
|
||||
- * @param roll Angle around X */
|
||||
+ * @param yawZ Angle around Z
|
||||
+ * @param pitchY Angle around Y
|
||||
+ * @param rollX Angle around X */
|
||||
void setEulerZYX(const btScalar& yawZ, const btScalar& pitchY, const btScalar& rollX)
|
||||
{
|
||||
btScalar halfYaw = btScalar(yawZ) * btScalar(0.5);
|
||||
@@ -155,9 +155,9 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Get the euler angles from this quaternion
|
||||
- * @param yaw Angle around Z
|
||||
- * @param pitch Angle around Y
|
||||
- * @param roll Angle around X */
|
||||
+ * @param yawZ Angle around Z
|
||||
+ * @param pitchY Angle around Y
|
||||
+ * @param rollX Angle around X */
|
||||
void getEulerZYX(btScalar& yawZ, btScalar& pitchY, btScalar& rollX) const
|
||||
{
|
||||
btScalar squ;
|
||||
diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h
|
||||
index 9da1627..942f1a0 100644
|
||||
--- a/src/LinearMath/btVector3.h
|
||||
+++ b/src/LinearMath/btVector3.h
|
||||
@@ -119,9 +119,9 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Constructor from scalars
|
||||
- * @param x X value
|
||||
- * @param y Y value
|
||||
- * @param z Z value
|
||||
+ * @param _x X value
|
||||
+ * @param _y Y value
|
||||
+ * @param _z Z value
|
||||
*/
|
||||
SIMD_FORCE_INLINE btVector3(const btScalar& _x, const btScalar& _y, const btScalar& _z)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
#endif // #if defined (BT_USE_SSE_IN_API) || defined (BT_USE_NEON)
|
||||
|
||||
/**@brief Add a vector to this one
|
||||
- * @param The vector to add to this one */
|
||||
+ * @param v The vector to add to this one */
|
||||
SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v)
|
||||
{
|
||||
#if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
}
|
||||
|
||||
/**@brief Subtract a vector from this one
|
||||
- * @param The vector to subtract */
|
||||
+ * @param v The vector to subtract */
|
||||
SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v)
|
||||
{
|
||||
#if defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE)
|
||||
@@ -1190,10 +1190,10 @@ public:
|
||||
}
|
||||
*/
|
||||
/**@brief Set the values
|
||||
- * @param x Value of x
|
||||
- * @param y Value of y
|
||||
- * @param z Value of z
|
||||
- * @param w Value of w
|
||||
+ * @param _x Value of x
|
||||
+ * @param _y Value of y
|
||||
+ * @param _z Value of z
|
||||
+ * @param _w Value of w
|
||||
*/
|
||||
SIMD_FORCE_INLINE void setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z, const btScalar& _w)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
# Decide if we're using clipper2
|
||||
cad_enable(CLIPPER2 "librt")
|
||||
cad_enable(CLIPPER2 "libbg;librt")
|
||||
|
||||
bext_enable(CLIPPER2)
|
||||
|
||||
@@ -7,14 +7,14 @@ bext_enable(CLIPPER2)
|
||||
|
||||
if (ENABLE_CLIPPER2)
|
||||
|
||||
git_submodule_init(Clipper2 readme.md)
|
||||
git_submodule_init(Clipper2 README.md)
|
||||
|
||||
RegisterDeps(CLIPPER2)
|
||||
|
||||
ExternalProject_Add(CLIPPER2_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/Clipper2/CPP"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
#PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/clipper2.patch
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/clipper2.patch
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DCLIPPER2_UTILS=OFF
|
||||
@@ -25,6 +25,7 @@ if (ENABLE_CLIPPER2)
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
||||
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
|
||||
+1
-1
Submodule clipper2/Clipper2 updated: 736ddb0b53...ef88ee97c0
@@ -0,0 +1,80 @@
|
||||
diff -Naur CLIPPER2_BLD/CMakeLists.txt CLIPPER2/CMakeLists.txt
|
||||
--- CLIPPER2_BLD/CMakeLists.txt 2026-04-30 12:34:52.299493949 -0400
|
||||
+++ CLIPPER2/CMakeLists.txt 2026-04-30 12:38:11.412869621 -0400
|
||||
@@ -18,6 +18,7 @@
|
||||
option(USE_EXTERNAL_GTEST "Use system-wide installed GoogleTest" OFF)
|
||||
option(USE_EXTERNAL_GBENCHMARK "Use the googlebenchmark" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared libs" OFF)
|
||||
+option(BUILD_STATIC_LIBS "Also build static library archives (Clipper2-static / Clipper2Z-static) alongside the primary libraries" OFF)
|
||||
set(CLIPPER2_USINGZ "ON" CACHE STRING "Build Clipper2Z, either \"ON\" or \"OFF\" or \"ONLY\"")
|
||||
|
||||
# CLIPPER2_MAX_DECIMAL_PRECISION: maximum decimal precision when scaling PathsD to Paths64.
|
||||
@@ -78,6 +79,68 @@
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+# -----------------------------------------------------------------------
|
||||
+# Optional static library targets (meaningful when BUILD_SHARED_LIBS=ON)
|
||||
+# -----------------------------------------------------------------------
|
||||
+if(BUILD_STATIC_LIBS)
|
||||
+ set(CLIPPER2_STATIC_LIBS "")
|
||||
+
|
||||
+ if (NOT (CLIPPER2_USINGZ STREQUAL "ONLY"))
|
||||
+ list(APPEND CLIPPER2_STATIC_LIBS Clipper2_static)
|
||||
+ add_library(Clipper2_static STATIC ${CLIPPER2_INC} ${CLIPPER2_SRC})
|
||||
+
|
||||
+ set_target_properties(Clipper2_static PROPERTIES
|
||||
+ OUTPUT_NAME Clipper2-static
|
||||
+ EXPORT_NAME Clipper2-static
|
||||
+ )
|
||||
+
|
||||
+ target_compile_definitions(Clipper2_static PUBLIC
|
||||
+ CLIPPER2_MAX_DECIMAL_PRECISION=${CLIPPER2_MAX_DECIMAL_PRECISION}
|
||||
+ $<$<BOOL:${CLIPPER2_HI_PRECISION}>:CLIPPER2_HI_PRECISION>
|
||||
+ )
|
||||
+
|
||||
+ target_include_directories(Clipper2_static PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clipper2Lib/include>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
+ )
|
||||
+
|
||||
+ if (NOT MSVC)
|
||||
+ target_link_libraries(Clipper2_static PUBLIC m)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if (NOT (CLIPPER2_USINGZ STREQUAL "OFF"))
|
||||
+ list(APPEND CLIPPER2_STATIC_LIBS Clipper2Z_static)
|
||||
+ add_library(Clipper2Z_static STATIC ${CLIPPER2_INC} ${CLIPPER2_SRC})
|
||||
+
|
||||
+ set_target_properties(Clipper2Z_static PROPERTIES
|
||||
+ OUTPUT_NAME Clipper2Z-static
|
||||
+ EXPORT_NAME Clipper2Z-static
|
||||
+ )
|
||||
+
|
||||
+ target_compile_definitions(Clipper2Z_static PUBLIC
|
||||
+ USINGZ
|
||||
+ CLIPPER2_MAX_DECIMAL_PRECISION=${CLIPPER2_MAX_DECIMAL_PRECISION}
|
||||
+ $<$<BOOL:${CLIPPER2_HI_PRECISION}>:CLIPPER2_HI_PRECISION>
|
||||
+ )
|
||||
+
|
||||
+ target_include_directories(Clipper2Z_static PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clipper2Lib/include>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
+ )
|
||||
+
|
||||
+ if (NOT MSVC)
|
||||
+ target_link_libraries(Clipper2Z_static PUBLIC m)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ install(TARGETS ${CLIPPER2_STATIC_LIBS} EXPORT Clipper2-targets
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
# secondary Clipper2 library with USINGZ defined (if required)
|
||||
if (NOT (CLIPPER2_USINGZ STREQUAL "OFF"))
|
||||
list(APPEND CLIPPER2_LIBS Clipper2Z)
|
||||
@@ -1,307 +0,0 @@
|
||||
###############################################################################
|
||||
# Applying patch files cross platform is a challenging problem due to the
|
||||
# shortage of portable tools and issues with LF vs CRLF files - see
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/16854 for more background on
|
||||
# this. We need to address the patch build tool first thing, since any of the
|
||||
# other ExternalProject_Add builds that follow may depend on it.
|
||||
###############################################################################
|
||||
add_project(patch)
|
||||
|
||||
###############################################################################
|
||||
# Although we have bundled flex and bison programs, they can be problematic to
|
||||
# build - they require working Autotools tool chains (except on Windows where
|
||||
# we have winflexbison). We therefore attempt these builds only if we need to.
|
||||
# This check must come after the patch subdirectory, since if we DO add_project
|
||||
# the flexbison directory it will need the patch executable.
|
||||
###############################################################################
|
||||
if (USE_APPLESEED OR USE_OSPRAY)
|
||||
|
||||
find_package(FLEX)
|
||||
|
||||
if (NOT FLEX_FOUND)
|
||||
set(ENABLE_FLEX ON)
|
||||
endif (NOT FLEX_FOUND)
|
||||
find_package(BISON)
|
||||
|
||||
if (NOT BISON_FOUND)
|
||||
set(ENABLE_BISON ON)
|
||||
endif (NOT BISON_FOUND)
|
||||
|
||||
if (ENABLE_FLEX OR ENABLE_BISON)
|
||||
add_project(flexbison GROUPS "APPLESEED;OSPRAY")
|
||||
endif (ENABLE_FLEX OR ENABLE_BISON)
|
||||
|
||||
# Whether or not we actually added the subdirectories, let subsequent targets
|
||||
# know we have handled the FLEX and BISON dependencies. Some will list these
|
||||
# as potential build targets, since we may try to compile them, but as the
|
||||
# default orientation for these is "build only if we have to" the find
|
||||
# process itself needs to satisfy the check.
|
||||
set(FLEX_ADDED 1)
|
||||
set(BISON_ADDED 1)
|
||||
|
||||
endif (USE_APPLESEED OR USE_OSPRAY)
|
||||
|
||||
###############################################################################
|
||||
# Build tools are used during compilation, but are not bundled or distributed
|
||||
# with binary packages. We group these tools here for convenience. Unlike the
|
||||
# build targets intended for distribution, these outputs are all
|
||||
# targeted to the noinstall subdirectory.
|
||||
###############################################################################
|
||||
add_project(astyle GROUPS "BRLCAD")
|
||||
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
|
||||
# either patchelf or plief into our upstream workflows.
|
||||
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
|
||||
# to use our bundled zlib if it is enabled.) Developers adding, reordering or
|
||||
# removing dependencies here need to make sure they are aware of impact they
|
||||
# may be having on other external projects in other files.
|
||||
###############################################################################
|
||||
|
||||
# zlib compression/decompression library
|
||||
# https://zlib.net
|
||||
add_project(zlib GROUPS "APPLESEED;BRLCAD;OSPRAY")
|
||||
|
||||
# zstd - fast lossless compression library
|
||||
# https://github.com/facebook/zstd
|
||||
add_project(zstd GROUPS "APPLESEED;OSPRAY")
|
||||
|
||||
# minizip-ng - zip manipulation library written in C
|
||||
# https://github.com/zlib-ng/minizip-ng
|
||||
add_project(minizip-ng GROUPS "APPLESEED")
|
||||
|
||||
# LZ4 - lossless compression algorithm
|
||||
# https://github.com/lz4/lz4
|
||||
add_project(lz4 GROUPS "APPLESEED")
|
||||
|
||||
# libdeflate fast, whole-buffer DEFLATE-based compression
|
||||
# https://github.com/ebiggers/libdeflate
|
||||
add_project(deflate GROUPS "APPLESEED")
|
||||
|
||||
# fmt - formatting library providing an alternative to C++ iostreams
|
||||
# https://github.com/fmtlib/fmt
|
||||
add_project(fmt GROUPS "APPLESEED")
|
||||
|
||||
# yaml-cpp - YAML parser and emitter in C++ matching the YAML 1.2 spec
|
||||
# https://github.com/jbeder/yaml-cpp
|
||||
add_project(yaml-cpp GROUPS "APPLESEED")
|
||||
|
||||
# pystring - collection of C++ functions which match the interface and behavior
|
||||
# of python's string class methods
|
||||
# https://github.com/imageworks/pystring
|
||||
add_project(pystring GROUPS "APPLESEED")
|
||||
|
||||
# Henry Spencer's regular expression matching library
|
||||
# https://github.com/BRL-CAD/regex
|
||||
add_project(regex GROUPS "BRLCAD")
|
||||
|
||||
# expat - library for parsing XML 1.0 Fourth Edition
|
||||
# https://github.com/libexpat/libexpat
|
||||
add_project(expat GROUPS "APPLESEED")
|
||||
|
||||
# International Components for Unicode
|
||||
# https://github.com/unicode-org/icu
|
||||
add_project(icu GROUPS "APPLESEED")
|
||||
|
||||
# Xerces-C++ - a validating XML parser
|
||||
# https://xerces.apache.org/xerces-c/
|
||||
add_project(xerces-c GROUPS "APPLESEED")
|
||||
|
||||
# Boost - C++ libraries
|
||||
# https://www.boost.org
|
||||
# https://github.com/boostorg/boost
|
||||
add_project(boost GROUPS "APPLESEED")
|
||||
|
||||
# netpbm library - support for pnm,ppm,pbm, etc. image files
|
||||
# http://netpbm.sourceforge.net/
|
||||
add_project(netpbm GROUPS "BRLCAD")
|
||||
|
||||
# libjpeg-turbo - JPEG image codec
|
||||
# https://github.com/libjpeg-turbo/libjpeg-turbo
|
||||
add_project(jpeg GROUPS "APPLESEED;GDAL")
|
||||
|
||||
# libpng - Portable Network Graphics image file support
|
||||
# http://www.libpng.org/pub/png/libpng.html
|
||||
add_project(png GROUPS "APPLESEED;BRLCAD")
|
||||
|
||||
# libtiff - Tag Image File Format (TIFF) support
|
||||
# https://libtiff.gitlab.io/libtiff/
|
||||
# https://gitlab.com/libtiff/libtiff
|
||||
add_project(tiff GROUPS "APPLESEED;GDAL")
|
||||
|
||||
# OpenEXR - EXR image storage format
|
||||
# https://openexr.com/
|
||||
# https://github.com/AcademySoftwareFoundation/openexr
|
||||
add_project(openexr GROUPS "APPLESEED")
|
||||
|
||||
# UtahRLE - Raster Image library
|
||||
# https://github.com/BRL-CAD/utahrle
|
||||
add_project(utahrle GROUPS "BRLCAD")
|
||||
|
||||
# OpenColorIO - color management
|
||||
# https://opencolorio.org
|
||||
# https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||
# Note - the VFX Reference Platform (https://vfxplatform.com/)
|
||||
# is a useful reference for what versions to expect elements
|
||||
# of the rendering pipeline software stack to use/require
|
||||
add_project(opencolorio GROUPS "APPLESEED")
|
||||
|
||||
# OpenImageIO - reading and writing images, aimed at VFX studios
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
add_project(openimageio GROUPS "APPLESEED")
|
||||
|
||||
# ncurses - text-based user interfaces library
|
||||
# https://invisible-island.net/ncurses/
|
||||
add_project(ncurses GROUPS "OSPRAY")
|
||||
|
||||
# Lightning Memory-Mapped Database
|
||||
# https://github.com/LMDB/lmdb
|
||||
add_project(lmdb GROUPS "BRLCAD")
|
||||
|
||||
# Eigen - linear algebra library
|
||||
# https://eigen.tuxfamily.org
|
||||
add_project(eigen GROUPS "BRLCAD;APPLESEED")
|
||||
|
||||
# oneTBB - Threading Building Blocks
|
||||
# https://github.com/oneapi-src/oneTBB
|
||||
add_project(onetbb GROUPS "APPLESEED;OSPRAY")
|
||||
|
||||
# rkcommon - C++ infrastructure and CMake utilities
|
||||
# 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
|
||||
add_project(ispc GROUPS "OSPRAY")
|
||||
|
||||
# STEPcode - support for reading and writing STEP files
|
||||
# https://github.com/stepcode/stepcode
|
||||
add_project(stepcode GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# SQLITE3 - embeddable database
|
||||
# https://www.sqlite.org
|
||||
add_project(sqlite3 GROUPS "GDAL")
|
||||
|
||||
# PROJ - generic coordinate transformation
|
||||
# https://proj.org
|
||||
add_project(proj GROUPS "GDAL")
|
||||
|
||||
# GDAL - translator library for raster and vector geospatial data formats
|
||||
# https://gdal.org
|
||||
add_project(gdal GROUPS "GDAL")
|
||||
|
||||
# tinygltf - tiny glTF library(loader/saver)
|
||||
# https://github.com/syoyo/tinygltf
|
||||
add_project(tinygltf GROUPS "BRLCAD")
|
||||
|
||||
# pugixml - a light-weight C++ XML processing library
|
||||
# https://pugixml.org/
|
||||
add_project(pugixml GROUPS "BRLCAD;APPLESEED")
|
||||
|
||||
# Open Asset Import Library - library for supporting I/O for a number of
|
||||
# Geometry file formats
|
||||
# https://github.com/assimp/assimp
|
||||
add_project(assetimport GROUPS "BRLCAD")
|
||||
|
||||
# OpenCV - Open Source Computer Vision Library
|
||||
# http://opencv.org
|
||||
add_project(opencv GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# Clipper2 - A Polygon Clipping and Offsetting library
|
||||
# https://github.com/AngusJohnson/Clipper2
|
||||
add_project(clipper2 GROUPS "BRLCAD")
|
||||
|
||||
# GeometricTools - a collection of geometry algorithms.
|
||||
# https://github.com/davideberly/GeometricTools
|
||||
add_project(gte GROUPS "BRLCAD")
|
||||
|
||||
# Adaptive Multigrid Solvers - Poisson Surface Reconstruction code.
|
||||
# https://github.com/mkazhdan/PoissonRecon
|
||||
#add_project(poissonrecon GROUPS "BRLCAD")
|
||||
|
||||
# mmesh - mesh decimation and processing library.
|
||||
# https://github.com/BRL-CAD/mmesh
|
||||
add_project(mmesh GROUPS "BRLCAD")
|
||||
|
||||
# OpenMesh Library - library for representing and manipulating polygonal meshes
|
||||
# https://www.graphics.rwth-aachen.de/software/openmesh/
|
||||
add_project(openmesh GROUPS "BRLCAD_EXTRA")
|
||||
|
||||
# Manifold Library - used for performing boolean ops on meshes
|
||||
# https://github.com/elalish/manifold
|
||||
add_project(manifold GROUPS "BRLCAD")
|
||||
|
||||
# openNURBS - Non-Uniform Rational BSpline library
|
||||
# https://github.com/mcneel/opennurbs
|
||||
add_project(opennurbs GROUPS "BRLCAD")
|
||||
|
||||
# OSMesa - Off Screen Mesa Rendering Library
|
||||
# https://github.com/starseeker/osmesa
|
||||
add_project(osmesa GROUPS "BRLCAD")
|
||||
|
||||
# Geogram - a programming library with geometric algorithms
|
||||
# https://github.com/BrunoLevy/geogram
|
||||
add_project(geogram GROUPS "BRLCAD")
|
||||
|
||||
# Open Shading Language (OSL) - language for programmable shading
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
#
|
||||
# TODO - need to check if https://github.com/lexxmark/winflexbison will
|
||||
# work for Windows for OSL's usage of flex/bison...
|
||||
add_project(osl GROUPS "APPLESEED")
|
||||
|
||||
# Embree raytracing kernel
|
||||
# https://github.com/embree/embree
|
||||
add_project(embree GROUPS "APPLESEED;OSPRAY")
|
||||
|
||||
# TCL - scripting language. For Tcl/Tk builds we want
|
||||
# static lib building on so we get the stub libraries.
|
||||
# https://www.tcl.tk
|
||||
set(TCL_ENABLE_TK ON CACHE BOOL "enable tk")
|
||||
add_project(tcl GROUPS "TCL")
|
||||
add_project(tk GROUPS "TCL")
|
||||
add_project(itcl GROUPS "TCL")
|
||||
add_project(itk GROUPS "TCL")
|
||||
add_project(iwidgets GROUPS "TCL")
|
||||
add_project(tkhtml GROUPS "TCL")
|
||||
add_project(tktable GROUPS "TCL")
|
||||
|
||||
# Qt - cross-platform user interface/application development toolkit
|
||||
# https://download.qt.io/archive/qt
|
||||
add_project(qt GROUPS "QT")
|
||||
|
||||
# Appleseed - global illumination rendering engine
|
||||
# https://github.com/appleseedhq/appleseed
|
||||
add_project(appleseed GROUPS "APPLESEED")
|
||||
|
||||
# OSPRay - ray tracing engine
|
||||
# https://github.com/ospray/OSPRay
|
||||
add_project(ospray GROUPS "OSPRAY")
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
/* D E P E N D E N C I E S . D O T
|
||||
*
|
||||
* Copyright (c) 2023 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* Redistribution and use in source (Graphviz format) and 'compiled'
|
||||
* forms (PDF, PostScript, HTML, RTF, etc.), with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code (DOT format) must retain the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2. Redistributions in compiled form (transformed to other DTDs,
|
||||
* converted to PDF, PostScript, HTML, RTF, and other formats) must
|
||||
* reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this documentation without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* To generate a PDF from this input, use dot:
|
||||
*
|
||||
* dot -Tpdf -o bext.pdf bext.dot
|
||||
*
|
||||
* The checked-in dependencies.dot file is a prefix - most of the relationships
|
||||
* between components come from the dependency information in the bext CMake
|
||||
* build system. The build directory should hold a bext.dot file with that
|
||||
* information populated.
|
||||
*
|
||||
* To generated the most complete DOT file, enable all build options in CMake -
|
||||
* for example: -DENABLE_ALL=ON -DUSE_APPLESEED=ON -DUSE_OSPRAY=ON
|
||||
*/
|
||||
|
||||
digraph Deps{
|
||||
|
||||
// Top level BRL-CAD node
|
||||
brlcad [color = "black", style = bold, shape = box, URL="https://github.com/BRL-CAD/brlcad", label = "BRL-CAD"];
|
||||
|
||||
// Dependency Nodes
|
||||
appleseed [color = "blue", style = bold, shape = box, URL="https://github.com/appleseedhq/appleseed", label = "Appleseed"];
|
||||
assetimport [color = "black", style = bold, shape = box, URL="https://github.com/assimp/assimp", label = "ASSIMP"];
|
||||
astyle [color = "orange", style = bold, shape = box, URL="https://astyle.sourceforge.net/", label = "AStyle"];
|
||||
bison [color = "orange", style = bold, shape = box, URL="https://www.gnu.org/software/bison", label = "Bison"];
|
||||
boost [color = "blue", style = bold, shape = box, URL="https://github.com/boostorg/boost", label = "Boost"];
|
||||
deflate [color = "blue", style = bold, shape = box, URL="https://github.com/ebiggers/libdeflate", label = "libdeflate"];
|
||||
eigen [color = "black", style = bold, shape = box, URL="https://eigen.tuxfamily.org", label = "Eigen"];
|
||||
embree [color = "blue", style = bold, shape = box, URL="https://github.com/embree/embree", label = "Embree"];
|
||||
expat [color = "blue", style = bold, shape = box, URL="https://github.com/libexpat/libexpat", label = "expat"];
|
||||
flex [color = "orange", style = bold, shape = box, URL="https://github.com/westes/flex", label = "Flex"];
|
||||
flexbison [color = "orange", style = bold, shape = box, URL="https://github.com/lexxmark/winflexbison", label = "winflexbison"];
|
||||
fmt [color = "blue", style = bold, shape = box, URL="https://github.com/fmtlib/fmt", label = "fmt"];
|
||||
gdal [color = "black", style = bold, shape = box, URL="https://gdal.org", label = "GDAL"];
|
||||
icu [color = "blue", style = bold, shape = box, URL="https://github.com/unicode-org/icu", label = "ICU"];
|
||||
ispc [color = "blue", style = bold, shape = box, URL="https://github.com/ispc/ispc", label = "ISPC"];
|
||||
itcl [color = "black", style = bold, shape = box, URL="https://core.tcl-lang.org/itcl", label = "ITcl"];
|
||||
itk [color = "black", style = bold, shape = box, URL="https://core.tcl-lang.org/itk", label = "ITk"];
|
||||
iwidgets [color = "black", style = bold, shape = box, URL="https://incrtcl.sourceforge.net/iwidgets/iwidgets.html", label = "Iwidgets"];
|
||||
jpeg [color = "blue", style = bold, shape = box, URL="https://github.com/libjpeg-turbo/libjpeg-turbo", label = "libjpeg"];
|
||||
lemon [color = "orange", style = bold, shape = box, URL="https://www.sqlite.org/src/file/tool", label = "Lemon"];
|
||||
lief [color = "orange", style = bold, shape = box, URL="https://github.com/lief-project/LIEF", label = "LIEF"];
|
||||
linenoise [color = "black", style = bold, shape = box, URL="https://github.com/msteveb/linenoise", label = "Linenoise"];
|
||||
llvm [color = "blue", style = bold, shape = box, URL="https://llvm.org", label = "LLVM"];
|
||||
lmdb [color = "black", style = bold, shape = box, URL="https://github.com/LMDB/lmdb", label = "LMDB"];
|
||||
lz4 [color = "blue", style = bold, shape = box, URL="https://github.com/lz4/lz4", label = "LZ4"];
|
||||
minizip_ng [color = "blue", style = bold, shape = box, URL="https://github.com/zlib-ng/minizip-ng", label = "minizip-ng"];
|
||||
ncurses [color = "blue", style = bold, shape = box, URL="https://invisible-island.net/ncurses", label = "ncurses"];
|
||||
netpbm [color = "black", style = bold, shape = box, URL="http://netpbm.sourceforge.net", label = "netpbm"];
|
||||
onetbb [color = "blue", style = bold, shape = box, URL="https://github.com/oneapi-src/oneTBB", label = "oneTBB"];
|
||||
opencolorio [color = "blue", style = bold, shape = box, URL="https://github.com/AcademySoftwareFoundation/OpenColorIO", label = "OpenColorIO"];
|
||||
opencv [color = "black", style = bold, shape = box, URL="http://opencv.org", label = "OpenCV"];
|
||||
openexr [color = "blue", style = bold, shape = box, URL="https://github.com/AcademySoftwareFoundation/openexr", label = "OpenEXR"];
|
||||
openimageio [color = "blue", style = bold, shape = box, URL="https://github.com/OpenImageIO/oiio", label = "OpenImageIO"];
|
||||
openmesh [color = "black", style = bold, shape = box, URL="https://www.graphics.rwth-aachen.de/software/openmesh", label = "OpenMesh"];
|
||||
opennurbs [color = "black", style = bold, shape = box, URL="https://github.com/mcneel/opennurbs", label = "openNURBS"];
|
||||
osl [color = "blue", style = bold, shape = box, URL="https://github.com/AcademySoftwareFoundation/OpenShadingLanguage", label = "OSL"];
|
||||
osmesa [color = "black", style = bold, shape = box, URL="https://github.com/starseeker/osmesa", label = "OSMesa"];
|
||||
ospray [color = "blue", style = bold, shape = box, URL="https://github.com/ospray/OSPRay", label = "OSPRay"];
|
||||
//patch [color = "orange", style = bold, shape = box, URL="https://github.com/shannonbooth/patch", label = "Patch"];
|
||||
patchelf [color = "orange", style = bold, shape = box, URL="https://github.com/NixOS/patchelf", label = "patchelf"];
|
||||
perplex [color = "orange", style = bold, shape = box, URL="https://github.com/BRL-CAD/perplex", label = "perplex"];
|
||||
plief [color = "orange", style = bold, shape = box, URL="https://github.com/BRL-CAD/plief", label = "plief"];
|
||||
png [color = "black", style = bold, shape = box, URL="http://www.libpng.org/pub/png/libpng.html", label = "libpng"];
|
||||
poly2tri [color = "black", style = bold, shape = box, URL="https://github.com/jhasse/poly2tri", label = "Poly2Tri"];
|
||||
proj [color = "black", style = bold, shape = box, URL="https://proj.org", label = "PROJ"];
|
||||
pugixml [color = "black", style = bold, shape = box, URL="https://pugixml.org", label = "pugixml"];
|
||||
pystring [color = "blue", style = bold, shape = box, URL="https://github.com/imageworks/pystring", label = "pystring"];
|
||||
qt [color = "black", style = bold, shape = box, URL="https://download.qt.io/archive/qt", label = "Qt"];
|
||||
re2c [color = "orange", style = bold, shape = box, URL="https://github.com/skvadrik/re2c", label = "re2c"];
|
||||
regex [color = "black", style = bold, shape = box, URL="https://github.com/BRL-CAD/regex", label = "regex"];
|
||||
rkcommon [color = "blue", style = bold, shape = box, URL="https://github.com/ospray/rkcommon", label = "rkcommon"];
|
||||
sqlite3 [color = "black", style = bold, shape = box, URL="https://www.sqlite.org", label = "SQLite3"];
|
||||
stepcode [color = "black", style = bold, shape = box, URL="https://github.com/stepcode/stepcode", label = "STEPcode"];
|
||||
strclear [color = "orange", style = bold, shape = box, URL="https://github.com/BRL-CAD/strclear", label = "strclear"];
|
||||
tcl [color = "black", style = bold, shape = box, URL="https://www.tcl.tk", label = "Tcl"];
|
||||
tiff [color = "blue", style = bold, shape = box, URL="https://gitlab.com/libtiff/libtiff", label = "libtiff"];
|
||||
tk [color = "black", style = bold, shape = box, URL="https://www.tcl.tk", label = "Tk"];
|
||||
tkhtml [color = "black", style = bold, shape = box, URL="https://github.com/BRL-CAD/tkhtml", label = "Tkhtml"];
|
||||
tktable [color = "black", style = bold, shape = box, URL="https://tktable.sourceforge.net", label = "Tktable"];
|
||||
utahrle [color = "black", style = bold, shape = box, URL="https://github.com/BRL-CAD/utahrle", label = "UtahRLE"];
|
||||
xerces_c [color = "blue", style = bold, shape = box, URL="https://xerces.apache.org/xerces-c", label = "Xerces-C++"];
|
||||
xmltools [color = "orange", style = bold, shape = box, URL="https://github.com/GNOME/libxml2", label = "xmltools"];
|
||||
yaml_cpp [color = "blue", style = bold, shape = box, URL="https://github.com/jbeder/yaml-cpp", label = "yaml-cpp"];
|
||||
zlib [color = "black", style = bold, shape = box, URL="https://zlib.net", label = "Zlib"];
|
||||
zstd [color = "blue", style = bold, shape = box, URL="https://github.com/facebook/zstd", label = "Zstd"];
|
||||
|
||||
iwidgets -> itk;
|
||||
itk -> itcl;
|
||||
itk -> tk;
|
||||
tk -> tcl;
|
||||
tkhtml -> tk;
|
||||
tktable -> tk;
|
||||
|
||||
ispc -> flexbison;
|
||||
osl -> flexbison;
|
||||
|
||||
brlcad -> assetimport;
|
||||
brlcad -> astyle;
|
||||
brlcad -> eigen;
|
||||
brlcad -> gdal;
|
||||
brlcad -> itcl;
|
||||
brlcad -> itk;
|
||||
brlcad -> tcl;
|
||||
brlcad -> tk;
|
||||
brlcad -> iwidgets;
|
||||
brlcad -> lemon;
|
||||
brlcad -> linenoise;
|
||||
brlcad -> lmdb;
|
||||
brlcad -> netpbm;
|
||||
brlcad -> opencv;
|
||||
brlcad -> openmesh;
|
||||
brlcad -> opennurbs;
|
||||
brlcad -> osmesa;
|
||||
brlcad -> patchelf;
|
||||
brlcad -> perplex;
|
||||
brlcad -> plief;
|
||||
brlcad -> png;
|
||||
brlcad -> poly2tri;
|
||||
brlcad -> qt;
|
||||
brlcad -> re2c;
|
||||
brlcad -> regex;
|
||||
brlcad -> stepcode;
|
||||
brlcad -> strclear;
|
||||
brlcad -> tkhtml;
|
||||
brlcad -> tktable;
|
||||
brlcad -> utahrle;
|
||||
brlcad -> xmltools;
|
||||
brlcad -> zlib;
|
||||
brlcad -> appleseed;
|
||||
brlcad -> ospray;
|
||||
|
||||
+28
-3
@@ -1,7 +1,7 @@
|
||||
# Decide if we're using Eigen
|
||||
cad_enable(EIGEN "libbg;libbn;librt")
|
||||
|
||||
unset(ENGEN_BUNDLED CACHE)
|
||||
unset(EIGEN_BUNDLED CACHE)
|
||||
|
||||
if (NOT ENABLE_EIGEN AND NOT DISABLE_EIGEN)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-1
Submodule eigen/eigen updated: 3147391d94...bc3b39870e
@@ -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
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -15,10 +15,11 @@ if (ENABLE_EMBREE)
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/embree.patch
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
|
||||
-DTBB_ROOT=$<$<BOOL:${TBB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
$<$<BOOL:${ONETBB_TARGET}>:-DTBB_ROOT=${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DISPC_ROOT=$<$<BOOL:${ISPC_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DEMBREE_TUTORIALS=OFF
|
||||
@@ -59,4 +60,3 @@ endif (ENABLE_EMBREE)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
+1
-1
Submodule embree/embree updated: 800794931f...f590db83ef
@@ -3,7 +3,7 @@ bext_enable(EXPAT)
|
||||
|
||||
if (ENABLE_EXPAT)
|
||||
|
||||
git_submodule_init(libexpat CMakeLists.txt)
|
||||
git_submodule_init(libexpat expat/CMakeLists.txt)
|
||||
|
||||
RegisterDeps(EXPAT)
|
||||
|
||||
|
||||
+23
-11
@@ -57,8 +57,8 @@ if (NOT WIN32)
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/flex.patch
|
||||
CONFIGURE_COMMAND ${FLEX_SRC_DIR}/autogen.sh
|
||||
COMMAND ${FLEX_SRC_DIR}/configure --prefix=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
|
||||
BUILD_COMMAND make -j${pcnt}
|
||||
INSTALL_COMMAND make -j1 install
|
||||
BUILD_COMMAND ${BEXT_MAKE_COMMAND} -j${pcnt}
|
||||
INSTALL_COMMAND ${BEXT_MAKE_COMMAND} -j1 install
|
||||
DEPENDS ${ZLIB_TARGET}
|
||||
LOG_CONFIGURE ${EXT_BUILD_QUIET}
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
@@ -74,21 +74,35 @@ if (NOT WIN32)
|
||||
|
||||
git_submodule_init(bison configure)
|
||||
|
||||
set(BISON_DEPENDS PATCH)
|
||||
set(BISON_DEPENDS)
|
||||
TargetVars(BISON_DEPENDS)
|
||||
|
||||
set(BISON_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/BISON_BLD-prefix/src/BISON_BLD")
|
||||
set(BISON_CONFIGURE_ENV MAKEINFO=true)
|
||||
if (APPLE)
|
||||
# macOS 26 declares posix_spawn_file_actions_addchdir, but the symbol is
|
||||
# unavailable when targeting older macOS releases. Bison 3.8.2's older
|
||||
# gnulib consequently fails its link check and then redeclares the SDK
|
||||
# function with an incompatible replacement type. The positive cache
|
||||
# result makes gnulib select its rpl_ wrapper around the available _np
|
||||
# function, avoiding both the new symbol and the conflicting declaration.
|
||||
list(APPEND BISON_CONFIGURE_ENV ac_cv_func_posix_spawn_file_actions_addchdir=yes)
|
||||
endif (APPLE)
|
||||
|
||||
ExternalProject_Add(BISON_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/bison"
|
||||
BUILD_IN_SOURCE ON
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/bison.patch
|
||||
CONFIGURE_COMMAND chmod +x ${BISON_SRC_DIR}/autogen.sh
|
||||
COMMAND ${BISON_SRC_DIR}/autogen.sh
|
||||
COMMAND ${BISON_SRC_DIR}/configure --prefix=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
|
||||
BUILD_COMMAND make -j${pcnt}
|
||||
INSTALL_COMMAND make -j1 install
|
||||
# Preserve the shipped Autotools outputs when ExternalProject copies the
|
||||
# source tree. This prevents make from requiring Autoconf, Autoheader,
|
||||
# or Automake from the host.
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND};-E;touch_nocreate;${BISON_SRC_DIR}/configure;${BISON_SRC_DIR}/lib/config.in.h;${BISON_SRC_DIR}/Makefile.in
|
||||
# The release checkout includes generated Info documentation. Do not
|
||||
# require host Texinfo when staging changes file timestamp ordering.
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${BISON_CONFIGURE_ENV} ${BISON_SRC_DIR}/configure --prefix=${CMAKE_NOBUNDLE_INSTALL_PREFIX}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${BISON_SRC_DIR}/doc/bison.info
|
||||
BUILD_COMMAND ${BEXT_MAKE_COMMAND} -j${pcnt}
|
||||
INSTALL_COMMAND ${BEXT_MAKE_COMMAND} -j1 install
|
||||
DEPENDS ${ZLIB_TARGET}
|
||||
LOG_CONFIGURE ${EXT_BUILD_QUIET}
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
@@ -109,5 +123,3 @@ endif (NOT WIN32)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
diff -Naur bison-3.8/autogen.sh bison/autogen.sh
|
||||
--- bison-3.8/autogen.sh 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ bison/autogen.sh 2023-09-14 10:59:17.620985283 -0400
|
||||
@@ -0,0 +1,51 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# This file is part of flex.
|
||||
+
|
||||
+# Redistribution and use in source and binary forms, with or without
|
||||
+# modification, are permitted provided that the following conditions
|
||||
+# are met:
|
||||
+
|
||||
+# 1. Redistributions of source code must retain the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer.
|
||||
+# 2. Redistributions in binary form must reproduce the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer in the
|
||||
+# documentation and/or other materials provided with the distribution.
|
||||
+
|
||||
+# Neither the name of the University nor the names of its contributors
|
||||
+# may be used to endorse or promote products derived from this software
|
||||
+# without specific prior written permission.
|
||||
+
|
||||
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
+# PURPOSE.
|
||||
+
|
||||
+# If you see no configure script, then run ./autogen.sh to create it
|
||||
+# and procede with the "normal" build procedures.
|
||||
+
|
||||
+# use LIBTOOLIZE, if set
|
||||
+LIBTOOLIZE_ORIG="$LIBTOOLIZE";
|
||||
+if test "x$LIBTOOLIZE" = "x"; then LIBTOOLIZE=libtoolize; fi
|
||||
+
|
||||
+# test libtoolize
|
||||
+$LIBTOOLIZE --version 2>/dev/null
|
||||
+if test "$?" -ne 0; then
|
||||
+ LIBTOOLIZE=glibtoolize
|
||||
+ $LIBTOOLIZE --version 2>/dev/null
|
||||
+ if test "$?" -ne 0; then
|
||||
+ echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize"
|
||||
+ echo " LIBTOOLIZE is currently \"$LIBTOOLIZE_ORIG\""
|
||||
+ exit 1
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+#if we pretend to have a ChangeLog, then automake is less
|
||||
+#worried. (Don't worry, we *do* have a ChangeLog, we just need the
|
||||
+#Makefile first.)
|
||||
+
|
||||
+if ! test -f ChangeLog; then
|
||||
+ touch ChangeLog
|
||||
+fi
|
||||
+"$LIBTOOLIZE" --install --force
|
||||
+autoreconf --install --force
|
||||
diff -Naur bison-3.8/lib/gnulib.mk bison/lib/gnulib.mk
|
||||
--- bison-3.8/lib/gnulib.mk 2021-09-07 06:54:09.000000000 -0400
|
||||
+++ bison/lib/gnulib.mk 2023-09-14 11:00:31.903736511 -0400
|
||||
@@ -1223,7 +1223,7 @@
|
||||
mv $(top_srcdir)/lib/iconv_open-zos.h-t $(top_srcdir)/lib/iconv_open-zos.h
|
||||
BUILT_SOURCES += lib/iconv_open-aix.h lib/iconv_open-hpux.h lib/iconv_open-irix.h lib/iconv_open-osf.h lib/iconv_open-solaris.h lib/iconv_open-zos.h
|
||||
MOSTLYCLEANFILES += lib/iconv_open-aix.h-t lib/iconv_open-hpux.h-t lib/iconv_open-irix.h-t lib/iconv_open-osf.h-t lib/iconv_open-solaris.h-t lib/iconv_open-zos.h-t
|
||||
-MAINTAINERCLEANFILES += lib/iconv_open-aix.h lib/iconv_open-hpux.h lib/iconv_open-irix.h lib/iconv_open-osf.h lib/iconv_open-solaris.h lib/iconv_open-zos.h
|
||||
+MAINTAINERCLEANFILES = lib/iconv_open-aix.h lib/iconv_open-hpux.h lib/iconv_open-irix.h lib/iconv_open-osf.h lib/iconv_open-solaris.h lib/iconv_open-zos.h
|
||||
EXTRA_DIST += lib/iconv_open-aix.h lib/iconv_open-hpux.h lib/iconv_open-irix.h lib/iconv_open-osf.h lib/iconv_open-solaris.h lib/iconv_open-zos.h
|
||||
|
||||
EXTRA_DIST += lib/iconv.c lib/iconv_close.c lib/iconv_open-aix.gperf lib/iconv_open-hpux.gperf lib/iconv_open-irix.gperf lib/iconv_open-osf.gperf lib/iconv_open-solaris.gperf lib/iconv_open-zos.gperf lib/iconv_open.c
|
||||
diff -Naur bison-3.8/Makefile.am bison/Makefile.am
|
||||
--- bison-3.8/Makefile.am 2021-06-23 00:48:48.000000000 -0400
|
||||
+++ bison/Makefile.am 2023-09-14 10:57:47.586496865 -0400
|
||||
@@ -66,12 +66,8 @@
|
||||
|
||||
include build-aux/local.mk
|
||||
include data/local.mk
|
||||
-include doc/local.mk
|
||||
-include etc/local.mk
|
||||
-include examples/local.mk
|
||||
include lib/local.mk
|
||||
include src/local.mk
|
||||
-include tests/local.mk
|
||||
|
||||
clean-local:
|
||||
rm -rf $(CLEANDIRS)
|
||||
@@ -18,6 +18,9 @@ if (ENABLE_GDAL)
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/gdal"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/gdal.patch
|
||||
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/gdal_setjmp.patch
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindZLIB.cmake;<SOURCE_DIR>/cmake/modules/packages/FindZLIB.cmake
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindPNG.cmake;<SOURCE_DIR>/cmake/modules/packages/FindPNG.cmake
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
|
||||
+1
-1
Submodule gdal/gdal updated: 2ca3becf70...c8b4c45fca
+19
-314
@@ -1,329 +1,35 @@
|
||||
diff -Naurw gdal-3.6.3/cmake/modules/FindPNG.cmake gdal/cmake/modules/FindPNG.cmake
|
||||
--- gdal-3.6.3/cmake/modules/FindPNG.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdal/cmake/modules/FindPNG.cmake 2023-08-17 10:20:09.862683802 -0400
|
||||
@@ -0,0 +1,161 @@
|
||||
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
+# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
+
|
||||
+#[=======================================================================[.rst:
|
||||
+FindPNG
|
||||
+-------
|
||||
+
|
||||
+Find libpng, the official reference library for the PNG image format.
|
||||
+
|
||||
+Imported targets
|
||||
+^^^^^^^^^^^^^^^^
|
||||
+
|
||||
+.. versionadded:: 3.5
|
||||
+
|
||||
+This module defines the following :prop_tgt:`IMPORTED` target:
|
||||
+
|
||||
+``PNG::PNG``
|
||||
+ The libpng library, if found.
|
||||
+
|
||||
+Result variables
|
||||
+^^^^^^^^^^^^^^^^
|
||||
+
|
||||
+This module will set the following variables in your project:
|
||||
+
|
||||
+``PNG_INCLUDE_DIRS``
|
||||
+ where to find png.h, etc.
|
||||
+``PNG_LIBRARIES``
|
||||
+ the libraries to link against to use PNG.
|
||||
+``PNG_DEFINITIONS``
|
||||
+ You should add_definitions(${PNG_DEFINITIONS}) before compiling code
|
||||
+ that includes png library files.
|
||||
+``PNG_FOUND``
|
||||
+ If false, do not try to use PNG.
|
||||
+``PNG_VERSION_STRING``
|
||||
+ the version of the PNG library found (since CMake 2.8.8)
|
||||
+
|
||||
+Obsolete variables
|
||||
+^^^^^^^^^^^^^^^^^^
|
||||
+
|
||||
+The following variables may also be set, for backwards compatibility:
|
||||
+
|
||||
+``PNG_LIBRARY``
|
||||
+ where to find the PNG library.
|
||||
+``PNG_INCLUDE_DIR``
|
||||
+ where to find the PNG headers (same as PNG_INCLUDE_DIRS)
|
||||
+
|
||||
+Since PNG depends on the ZLib compression library, none of the above
|
||||
+will be defined unless ZLib can be found.
|
||||
+#]=======================================================================]
|
||||
+
|
||||
+if(PNG_FIND_QUIETLY)
|
||||
+ set(_FIND_ZLIB_ARG QUIET)
|
||||
+endif()
|
||||
+find_package(ZLIB ${_FIND_ZLIB_ARG})
|
||||
+
|
||||
+if(ZLIB_FOUND)
|
||||
+ find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)
|
||||
+ mark_as_advanced(PNG_PNG_INCLUDE_DIR)
|
||||
+
|
||||
+ list(APPEND PNG_NAMES png_brl libpng_brl png libpng)
|
||||
+ unset(PNG_NAMES_DEBUG)
|
||||
+ set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
|
||||
+ if (PNG_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)(\\..*)?$")
|
||||
+ set(_PNG_VERSION_SUFFIX_MIN "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
|
||||
+ if (PNG_FIND_VERSION_EXACT)
|
||||
+ set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN})
|
||||
+ else ()
|
||||
+ string(REGEX REPLACE
|
||||
+ "${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}"
|
||||
+ _PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}")
|
||||
+ endif ()
|
||||
+ unset(_PNG_VERSION_SUFFIX_MIN)
|
||||
+ endif ()
|
||||
+ foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
|
||||
+ list(APPEND PNG_NAMES png_brl${v} libpng_brl${v} png${v} libpng${v} libpng${v}_static)
|
||||
+ list(APPEND PNG_NAMES_DEBUG png_brl${v}d libpng_brl${v}d png${v}d libpng${v}d libpng${v}_staticd)
|
||||
+ endforeach()
|
||||
+ unset(_PNG_VERSION_SUFFIXES)
|
||||
+ # For compatibility with versions prior to this multi-config search, honor
|
||||
+ # any PNG_LIBRARY that is already specified and skip the search.
|
||||
+ if(NOT PNG_LIBRARY)
|
||||
+ find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES} NAMES_PER_DIR)
|
||||
+ find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG} NAMES_PER_DIR)
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ select_library_configurations(PNG)
|
||||
+ mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
|
||||
+ endif()
|
||||
+ unset(PNG_NAMES)
|
||||
+ unset(PNG_NAMES_DEBUG)
|
||||
+
|
||||
+ # Set by select_library_configurations(), but we want the one from
|
||||
+ # find_package_handle_standard_args() below.
|
||||
+ unset(PNG_FOUND)
|
||||
+
|
||||
+ if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
|
||||
+ # png.h includes zlib.h. Sigh.
|
||||
+ set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
|
||||
+ set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatibility
|
||||
+ set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
||||
+ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND
|
||||
+ ("${PNG_LIBRARY}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$"))
|
||||
+ list(APPEND PNG_LIBRARIES m)
|
||||
+ endif()
|
||||
+
|
||||
+ if (CYGWIN)
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
+ # No need to define PNG_USE_DLL here, because it's default for Cygwin.
|
||||
+ else()
|
||||
+ set (PNG_DEFINITIONS -DPNG_STATIC)
|
||||
+ set(_PNG_COMPILE_DEFINITIONS PNG_STATIC)
|
||||
+ endif()
|
||||
+ endif ()
|
||||
+
|
||||
+ if(NOT TARGET PNG::PNG)
|
||||
+ add_library(PNG::PNG UNKNOWN IMPORTED)
|
||||
+ set_target_properties(PNG::PNG PROPERTIES
|
||||
+ INTERFACE_COMPILE_DEFINITIONS "${_PNG_COMPILE_DEFINITIONS}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${PNG_INCLUDE_DIRS}"
|
||||
+ INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
||||
+ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND
|
||||
+ ("${PNG_LIBRARY}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$"))
|
||||
+ set_property(TARGET PNG::PNG APPEND PROPERTY
|
||||
+ INTERFACE_LINK_LIBRARIES m)
|
||||
+ endif()
|
||||
+
|
||||
+ if(EXISTS "${PNG_LIBRARY}")
|
||||
+ set_target_properties(PNG::PNG PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
+ IMPORTED_LOCATION "${PNG_LIBRARY}")
|
||||
+ endif()
|
||||
+ if(EXISTS "${PNG_LIBRARY_RELEASE}")
|
||||
+ set_property(TARGET PNG::PNG APPEND PROPERTY
|
||||
+ IMPORTED_CONFIGURATIONS RELEASE)
|
||||
+ set_target_properties(PNG::PNG PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
|
||||
+ IMPORTED_LOCATION_RELEASE "${PNG_LIBRARY_RELEASE}")
|
||||
+ endif()
|
||||
+ if(EXISTS "${PNG_LIBRARY_DEBUG}")
|
||||
+ set_property(TARGET PNG::PNG APPEND PROPERTY
|
||||
+ IMPORTED_CONFIGURATIONS DEBUG)
|
||||
+ set_target_properties(PNG::PNG PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
|
||||
+ IMPORTED_LOCATION_DEBUG "${PNG_LIBRARY_DEBUG}")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ unset(_PNG_COMPILE_DEFINITIONS)
|
||||
+ endif ()
|
||||
+
|
||||
+ if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
|
||||
+ file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")
|
||||
+
|
||||
+ string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
|
||||
+ unset(png_version_str)
|
||||
+ endif ()
|
||||
+endif()
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+find_package_handle_standard_args(PNG
|
||||
+ REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
|
||||
+ VERSION_VAR PNG_VERSION_STRING)
|
||||
diff -Naur gdal/cmake/modules/packages/FindSQLite3.cmake GDAL_BLD/cmake/modules/packages/FindSQLite3.cmake
|
||||
--- gdal/cmake/modules/packages/FindSQLite3.cmake 2024-06-25 09:56:45.835498631 -0400
|
||||
+++ GDAL_BLD/cmake/modules/packages/FindSQLite3.cmake 2024-06-25 09:59:46.365399374 -0400
|
||||
--- a/cmake/modules/packages/FindSQLite3.cmake
|
||||
+++ b/cmake/modules/packages/FindSQLite3.cmake
|
||||
@@ -57,7 +57,7 @@
|
||||
NAMES sqlite3.h
|
||||
HINTS ${PC_SQLITE3_INCLUDE_DIRS})
|
||||
find_library(SQLite3_LIBRARY
|
||||
- NAMES sqlite3 sqlite3_i
|
||||
+ NAMES sqlite3 sqlite3_i libsqlite3 libsqlite libsqlite3_i
|
||||
NAMES_PER_DIR
|
||||
HINTS ${PC_SQLITE3_LIBRARY_DIRS})
|
||||
endif()
|
||||
--- a/gcore/gdal_multidomainmetadata.h
|
||||
+++ b/gcore/gdal_multidomainmetadata.h
|
||||
@@ -18,6 +18,15 @@
|
||||
#include "cpl_port.h"
|
||||
#include "cpl_string.h"
|
||||
|
||||
# Extract version information from the header file
|
||||
diff -Naurw gdal-3.6.3/cmake/modules/packages/FindZLIB.cmake gdal/cmake/modules/packages/FindZLIB.cmake
|
||||
--- gdal-3.6.3/cmake/modules/packages/FindZLIB.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ gdal/cmake/modules/packages/FindZLIB.cmake 2023-08-17 10:20:09.866683737 -0400
|
||||
@@ -0,0 +1,123 @@
|
||||
+#.rst:
|
||||
+# FindZLIB
|
||||
+# --------
|
||||
+#
|
||||
+# Find the native ZLIB includes and library.
|
||||
+#
|
||||
+# IMPORTED Targets
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
+# ZLIB has been found.
|
||||
+#
|
||||
+# Result Variables
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines the following variables:
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
+# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
+# ZLIB_FOUND - True if zlib found.
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
+# ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
+# ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
+# ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
+# ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
+#
|
||||
+# Backward Compatibility
|
||||
+# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# The following variable are provided for backward compatibility
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
+# ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
+# ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
+#
|
||||
+# Hints
|
||||
+# ^^^^^
|
||||
+#
|
||||
+# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
+# module where to look.
|
||||
+
|
||||
+#=============================================================================
|
||||
+# Copyright 2001-2011 Kitware, Inc.
|
||||
+#
|
||||
+# Distributed under the OSI-approved BSD License (the "License");
|
||||
+# see accompanying file Copyright.txt for details.
|
||||
+#
|
||||
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+# See the License for more information.
|
||||
+#=============================================================================
|
||||
+# (To distribute this file outside of CMake, substitute the full
|
||||
+# License text for the above reference.)
|
||||
+
|
||||
+set(_ZLIB_SEARCHES)
|
||||
+
|
||||
+# Search ZLIB_ROOT first if it is set.
|
||||
+if(ZLIB_ROOT)
|
||||
+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
+endif()
|
||||
+
|
||||
+# Normal search.
|
||||
+set(_ZLIB_SEARCH_NORMAL
|
||||
+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
+ "$ENV{PROGRAMFILES}/zlib"
|
||||
+ )
|
||||
+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
+
|
||||
+set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1)
|
||||
+
|
||||
+# Try each search configuration.
|
||||
+foreach(search ${_ZLIB_SEARCHES})
|
||||
+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
|
||||
+endforeach()
|
||||
+
|
||||
+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
+
|
||||
+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
+
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
+
|
||||
+ # only append a TWEAK version if it exists:
|
||||
+ set(ZLIB_VERSION_TWEAK "")
|
||||
+ if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
+endif()
|
||||
+
|
||||
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
+# all listed variables are TRUE
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
+ VERSION_VAR ZLIB_VERSION_STRING)
|
||||
+
|
||||
+if(ZLIB_FOUND)
|
||||
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
+
|
||||
+ if(NOT TARGET ZLIB::ZLIB)
|
||||
+ add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
+ set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
+ IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
+ endif()
|
||||
+endif()
|
||||
diff -Naur gdal/gcore/gdal_priv.h GDAL_BLD/gcore/gdal_priv.h
|
||||
--- gdal/gcore/gdal_priv.h 2024-06-26 17:01:06.199711566 -0400
|
||||
+++ GDAL_BLD/gcore/gdal_priv.h 2024-06-26 17:00:48.433037793 -0400
|
||||
@@ -96,6 +96,13 @@
|
||||
/* GDALMultiDomainMetadata */
|
||||
/************************************************************************/
|
||||
|
||||
+#ifndef STRCASECMP
|
||||
+#if defined(_WIN32)
|
||||
+#define STRCASECMP(a, b) (_stricmp(a, b))
|
||||
+#else
|
||||
+/** Alias for strcasecmp() */
|
||||
+#define STRCASECMP(a, b) (strcasecmp(a, b))
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
//! @cond Doxygen_Suppress
|
||||
class CPL_DLL GDALMultiDomainMetadata
|
||||
{
|
||||
diff -Naur gdal/gdal.cmake GDAL_BLD/gdal.cmake
|
||||
--- gdal/gdal.cmake 2024-06-25 09:56:45.660500506 -0400
|
||||
+++ GDAL_BLD/gdal.cmake 2024-06-25 09:55:37.834206511 -0400
|
||||
@@ -379,12 +379,6 @@
|
||||
#include <map>
|
||||
|
||||
/*! @cond Doxygen_Suppress */
|
||||
--- 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")
|
||||
|
||||
@@ -336,10 +42,9 @@ 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 2024-06-25 09:56:45.954497348 -0400
|
||||
+++ GDAL_BLD/port/cpl_port.h 2024-06-25 09:55:37.836206491 -0400
|
||||
@@ -1123,7 +1123,7 @@
|
||||
--- a/port/cpl_port.h
|
||||
+++ b/port/cpl_port.h
|
||||
@@ -1019,7 +1019,7 @@
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/frmts/png/pngdataset.cpp
|
||||
+++ b/frmts/png/pngdataset.cpp
|
||||
@@ -42,7 +42,9 @@
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
-#include <csetjmp>
|
||||
+extern "C" {
|
||||
+#include <setjmp.h>
|
||||
+}
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
--- a/frmts/png/pngdataset.h
|
||||
+++ b/frmts/png/pngdataset.h
|
||||
@@ -40,7 +40,9 @@
|
||||
|
||||
#include "png.h"
|
||||
|
||||
-#include <csetjmp>
|
||||
+extern "C" {
|
||||
+#include <setjmp.h>
|
||||
+}
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -1,61 +0,0 @@
|
||||
# Decide if we're using Geogram
|
||||
cad_enable(GEOGRAM "librt")
|
||||
|
||||
bext_enable(Geogram)
|
||||
|
||||
# Decision made, start processing if we are enabled
|
||||
|
||||
if (ENABLE_GEOGRAM)
|
||||
|
||||
git_submodule_init(geogram CMakeLists.txt)
|
||||
|
||||
RegisterDeps(GEOGRAM)
|
||||
|
||||
ExternalProject_Add(GEOGRAM_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/geogram"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_cmake.patch
|
||||
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_win32.patch
|
||||
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_freebsd.patch
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DBIN_DIR=${BIN_DIR}
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
||||
-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}
|
||||
-DGEOGRAM_LIB_ONLY=ON
|
||||
-DGEOGRAM_WITH_GRAPHICS=OFF
|
||||
-DGEOGRAM_WITH_LUA=OFF
|
||||
-DGEOGRAM_WITH_HLBFGS=OFF
|
||||
-DGEOGRAM_WITH_TETGEN=OFF
|
||||
-DGEOGRAM_WITH_TRIANGLE=OFF
|
||||
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
|
||||
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
|
||||
)
|
||||
|
||||
TargetInstallDeps(GEOGRAM GEOGRAM_DEPENDS)
|
||||
|
||||
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/geogram/LICENSE
|
||||
${DOC_LICENSE_DIR}/geogram.txt
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
endif (ENABLE_GEOGRAM)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
Submodule geogram/geogram deleted from 888172e37e
@@ -1,41 +0,0 @@
|
||||
diff -Naur geogram/CMakeLists.txt GEOGRAM_BLD/CMakeLists.txt
|
||||
--- geogram/CMakeLists.txt 2024-04-19 18:18:32.084173009 -0400
|
||||
+++ GEOGRAM_BLD/CMakeLists.txt 2024-04-19 18:19:29.107021784 -0400
|
||||
@@ -88,18 +88,6 @@
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
-# RPATH (where executables find the .so / DLLs)
|
||||
-# - Enables RPATH support for MACOSX
|
||||
-# - Makes RPATH of dynamic libraries and executable point to the directory
|
||||
-# where libraries are installed.
|
||||
-
|
||||
-if(VORPALINE_BUILD_DYNAMIC)
|
||||
- set(CMAKE_MACOSX_RPATH 1)
|
||||
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
-endif()
|
||||
-
|
||||
-set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
-
|
||||
# uninstall target
|
||||
# Needs to be created before add_subdirectory() because GLFw has
|
||||
# also an uninstall target that will be inhibited if there is
|
||||
diff -Naur geogram/src/lib/geogram/CMakeLists.txt GEOGRAM_BLD/src/lib/geogram/CMakeLists.txt
|
||||
--- geogram/src/lib/geogram/CMakeLists.txt 2024-04-19 18:18:32.092172847 -0400
|
||||
+++ GEOGRAM_BLD/src/lib/geogram/CMakeLists.txt 2024-04-19 18:18:42.479961704 -0400
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
include_directories(${PROJECT_BINARY_DIR}/src/lib)
|
||||
|
||||
-add_library(geogram ${SOURCES} $<TARGET_OBJECTS:geogram_third_party>)
|
||||
+add_library(geogram SHARED ${SOURCES} $<TARGET_OBJECTS:geogram_third_party>)
|
||||
|
||||
target_include_directories(geogram PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/lib/geogram/third_party/amgcl
|
||||
--- geogram/cmake/platforms/Linux-clang.cmake 2024-07-12 20:43:59.314646694 -0400
|
||||
+++ GEOGRAM_BLD/cmake/platforms/Linux-clang.cmake 2024-07-12 20:42:45.974952959 -0400
|
||||
@@ -147,3 +147,4 @@
|
||||
|
||||
endmacro()
|
||||
|
||||
+add_link_options(-latomic)
|
||||
@@ -1,298 +0,0 @@
|
||||
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD/config.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/config.cmake
|
||||
--- GEOGRAM_BLD/cmake/platforms/FreeBSD/config.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/config.cmake 2025-01-10 12:46:26.972144880 -0500
|
||||
@@ -0,0 +1,5 @@
|
||||
+set(VORPALINE_ARCH_64 true)
|
||||
+include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/FreeBSD-clang.cmake)
|
||||
+#add_flags(CMAKE_CXX_FLAGS -m64)
|
||||
+#add_flags(CMAKE_C_FLAGS -m64)
|
||||
+
|
||||
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD/setvars.sh GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/setvars.sh
|
||||
--- GEOGRAM_BLD/cmake/platforms/FreeBSD/setvars.sh 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/setvars.sh 2025-01-10 12:46:26.972144880 -0500
|
||||
@@ -0,0 +1,2 @@
|
||||
+#export CC=clang
|
||||
+#export CXX=clang++
|
||||
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD-clang.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD-clang.cmake
|
||||
--- GEOGRAM_BLD/cmake/platforms/FreeBSD-clang.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD-clang.cmake 2025-01-10 12:46:26.972144880 -0500
|
||||
@@ -0,0 +1,153 @@
|
||||
+###
|
||||
+### Adopted from cmake/platforms/Linux-clang.cmake
|
||||
+###
|
||||
+
|
||||
+#-------------------------------------------------------------------
|
||||
+# Flags common to all FreeBSD based platforms with Clang compiler
|
||||
+#-------------------------------------------------------------------
|
||||
+
|
||||
+include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/FreeBSD.cmake)
|
||||
+
|
||||
+# Warning flags
|
||||
+set(NORMAL_WARNINGS -Wall -Wextra)
|
||||
+
|
||||
+set(FULL_WARNINGS
|
||||
+ -Weverything
|
||||
+ -Wno-padded # Disable generating a message each time padding is used
|
||||
+ -Wno-float-equal # Sometimes we compare floats (against 0.0 or 1.0 mainly)
|
||||
+ -Wno-global-constructors
|
||||
+ -Wno-exit-time-destructors
|
||||
+ -Wno-old-style-cast # Yes, old-style cast is sometime more legible...
|
||||
+ -Wno-format-nonliteral # Todo: use Laurent Alonso's trick
|
||||
+ -Wno-disabled-macro-expansion # Else it complains with stderr
|
||||
+)
|
||||
+
|
||||
+# Compile with full warnings by default
|
||||
+add_definitions(${FULL_WARNINGS})
|
||||
+
|
||||
+# Run the static analyzer
|
||||
+if(VORPALINE_WITH_CLANGSA)
|
||||
+ add_definitions(--analyze)
|
||||
+endif()
|
||||
+
|
||||
+# I do not know where this -Wno-maybe-uninitialized comes from
|
||||
+# (but clang does not understand it), silence the warning for
|
||||
+# now...
|
||||
+add_flags(CMAKE_CXX_FLAGS -Wno-unknown-warning-option)
|
||||
+add_flags(CMAKE_C_FLAGS -Wno-unknown-warning-option)
|
||||
+
|
||||
+# Add static and dynamic bounds checks (optimization required)
|
||||
+#add_flags(CMAKE_CXX_FLAGS_RELEASE -D_FORTIFY_SOURCE=2)
|
||||
+#add_flags(CMAKE_C_FLAGS_RELEASE -D_FORTIFY_SOURCE=2)
|
||||
+
|
||||
+# Enable SSE3 instruction set
|
||||
+add_flags(CMAKE_CXX_FLAGS -msse3)
|
||||
+add_flags(CMAKE_C_FLAGS -msse3)
|
||||
+
|
||||
+# C++11 standard
|
||||
+add_flags(CMAKE_CXX_FLAGS -Qunused-arguments -std=c++11 -Wno-c++98-compat)
|
||||
+
|
||||
+# Enable glibc parallel mode
|
||||
+#add_flags(CMAKE_CXX_FLAGS -D_GLIBCXX_PARALLEL)
|
||||
+
|
||||
+
|
||||
+# Generate debug information even in release mode
|
||||
+#add_flags(CMAKE_CXX_FLAGS_RELEASE -g)
|
||||
+#add_flags(CMAKE_C_FLAGS_RELEASE -g)
|
||||
+
|
||||
+
|
||||
+# Additional debug flags
|
||||
+# deactivated for now: I added bound checking in VOR::vector<>.
|
||||
+#add_flags(CMAKE_CXX_FLAGS_DEBUG -D_GLIBCXX_DEBUG)
|
||||
+
|
||||
+
|
||||
+# Compile and link with OpenMP ** NOT YET SUPPORTED in clang 3 **
|
||||
+#add_flags(CMAKE_CXX_FLAGS -fopenmp)
|
||||
+#add_flags(CMAKE_C_FLAGS -fopenmp)
|
||||
+
|
||||
+
|
||||
+# Profiler compilation flags
|
||||
+if(VORPALINE_WITH_GPROF)
|
||||
+ message(FATAL_ERROR "Profiling is not (yet) available with clang")
|
||||
+ message(STATUS "Building for code profiling")
|
||||
+ #add_flags(CMAKE_CXX_FLAGS -pg -DPROFILER)
|
||||
+ #add_flags(CMAKE_C_FLAGS -pg -DPROFILER)
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
+# Code coverage compilation flags
|
||||
+if(VORPALINE_WITH_GCOV)
|
||||
+ message(STATUS "Building for coverage analysis")
|
||||
+ add_flags(CMAKE_CXX_FLAGS --coverage)
|
||||
+ add_flags(CMAKE_C_FLAGS --coverage)
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
+# Compilation flags for Google's AddressSanitizer
|
||||
+# These flags can only be specified for dynamic builds
|
||||
+if(VORPALINE_WITH_ASAN)
|
||||
+ if(VORPALINE_BUILD_DYNAMIC)
|
||||
+ message(STATUS "Building with AddressSanitizer (debug only)")
|
||||
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fsanitize=address -fno-omit-frame-pointer)
|
||||
+ add_flags(CMAKE_C_FLAGS_DEBUG -fsanitize=address -fno-omit-frame-pointer)
|
||||
+ else()
|
||||
+ message(WARNING "AddressSanitizer can be used with dynamic builds only")
|
||||
+ set(VORPALINE_WITH_ASAN false)
|
||||
+ endif()
|
||||
+endif()
|
||||
+if(NOT VORPALINE_WITH_ASAN)
|
||||
+ # Use native GCC stack smash Protection and buffer overflow detection (debug only)
|
||||
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fstack-protector-all)
|
||||
+ add_flags(CMAKE_C_FLAGS_DEBUG -fstack-protector-all)
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
+# Compilation flags for Google's ThreadSanitizer
|
||||
+# Does not work for the moment: cannot figure out how to link with library libtsan
|
||||
+if(VORPALINE_WITH_TSAN)
|
||||
+ message(STATUS "Building with ThreadSanitizer (debug only)")
|
||||
+ message(FATAL_ERROR "ThreadSanitizer is not available: cannot figure out how to link with library libtsan")
|
||||
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fsanitize=thread)
|
||||
+ add_flags(CMAKE_C_FLAGS_DEBUG -fsanitize=thread)
|
||||
+ if(NOT VORPALINE_BUILD_DYNAMIC)
|
||||
+ add_flags(CMAKE_EXE_LINKER_FLAGS -static-libtsan)
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
+# Reset the warning level for third parties
|
||||
+function(vor_reset_warning_level)
|
||||
+ remove_definitions(${FULL_WARNINGS})
|
||||
+ add_definitions(${NORMAL_WARNINGS})
|
||||
+endfunction()
|
||||
+
|
||||
+macro(vor_add_executable)
|
||||
+ if(NOT VORPALINE_BUILD_DYNAMIC)
|
||||
+ # Create a statically linked executable
|
||||
+ # Link with static libraries
|
||||
+ add_flags(CMAKE_CXX_FLAGS -static)
|
||||
+ add_flags(CMAKE_C_FLAGS -static)
|
||||
+ endif()
|
||||
+
|
||||
+ add_executable(${ARGN})
|
||||
+
|
||||
+ if(NOT VORPALINE_BUILD_DYNAMIC AND DEFINED VORPALINE_WITH_DDT)
|
||||
+ # Static builds running with Allinea's DDT must be linked with a
|
||||
+ # special malloc library which replaces the malloc primitives of
|
||||
+ # the Glibc (We must allow multiple definitions)
|
||||
+ add_flags(CMAKE_EXE_LINKER_FLAGS -Wl,--allow-multiple-definition)
|
||||
+
|
||||
+ if(VORPALINE_ARCH_64)
|
||||
+ link_directories(${VORPALINE_WITH_DDT}/lib/64)
|
||||
+ else()
|
||||
+ link_directories(${VORPALINE_WITH_DDT}/lib/32)
|
||||
+ endif()
|
||||
+ target_link_libraries(${ARGV0} dmallocthcxx)
|
||||
+ endif()
|
||||
+
|
||||
+ if(UNIX)
|
||||
+ target_link_libraries(${ARGV0} m pthread)
|
||||
+ endif()
|
||||
+
|
||||
+endmacro()
|
||||
+
|
||||
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD.cmake
|
||||
--- GEOGRAM_BLD/cmake/platforms/FreeBSD.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD.cmake 2025-01-10 12:46:26.972144880 -0500
|
||||
@@ -0,0 +1,23 @@
|
||||
+###
|
||||
+### Adopted from cmake/platforms/Linux.cmake
|
||||
+###
|
||||
+
|
||||
+#-------------------------------------------------------------------
|
||||
+# Flags common to all Linux based platforms
|
||||
+#-------------------------------------------------------------------
|
||||
+
|
||||
+# Shell script extension
|
||||
+set(SHELL_SUFFIX "sh")
|
||||
+
|
||||
+# This flag MUST be added to solve a bug related to shared lib dynamic loading
|
||||
+# (std::type_infos representing the same template type do not compare equal,
|
||||
+# introducing subtle bugs)
|
||||
+# IMPORTANT: DO NOT ADD THIS FLAG WITH STATIC LINKING
|
||||
+#add_flags(CMAKE_EXE_LINKER_FLAGS "-Wl,-E")
|
||||
+
|
||||
+# Forbid undefined symbols at link time (shared libraries and executables)
|
||||
+add_flags(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
||||
+add_flags(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-undefined")
|
||||
+
|
||||
+# Link with the loader library
|
||||
+list(APPEND SYSLIBS ${CMAKE_DL_LIBS})
|
||||
diff -Naur GEOGRAM_BLD/CMakeLists.txt GEOGRAM_BLD_bsd/CMakeLists.txt
|
||||
--- GEOGRAM_BLD/CMakeLists.txt 2025-01-10 12:45:04.545610329 -0500
|
||||
+++ GEOGRAM_BLD_bsd/CMakeLists.txt 2025-01-10 12:46:50.785730894 -0500
|
||||
@@ -129,7 +129,7 @@
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
-add_subdirectory(doc)
|
||||
+#add_subdirectory(doc)
|
||||
|
||||
##############################################################################
|
||||
# Cleanup from previous builds
|
||||
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/algorithm.h GEOGRAM_BLD_bsd/src/lib/geogram/basic/algorithm.h
|
||||
--- GEOGRAM_BLD/src/lib/geogram/basic/algorithm.h 2025-01-10 12:45:04.472611652 -0500
|
||||
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/algorithm.h 2025-01-10 12:46:26.972144880 -0500
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <geogram/basic/common.h>
|
||||
|
||||
-#if defined(GEO_OS_LINUX) && defined(GEO_OPENMP)
|
||||
+#if (defined(GEO_OS_LINUX) || defined(GEO_OS_FREEBSD)) && defined(GEO_OPENMP)
|
||||
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4) && !defined(GEO_OS_ANDROID)
|
||||
#include <parallel/algorithm>
|
||||
#define GEO_USE_GCC_PARALLEL_STL
|
||||
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/command_line.cpp GEOGRAM_BLD_bsd/src/lib/geogram/basic/command_line.cpp
|
||||
--- GEOGRAM_BLD/src/lib/geogram/basic/command_line.cpp 2025-01-10 12:45:04.473611634 -0500
|
||||
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/command_line.cpp 2025-01-10 12:46:26.973144862 -0500
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
-#if defined(GEO_OS_LINUX) || defined(GEO_OS_APPLE)
|
||||
+#if defined(GEO_OS_LINUX) || defined(GEO_OS_FREEBSD) || defined(GEO_OS_APPLE)
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/common.h GEOGRAM_BLD_bsd/src/lib/geogram/basic/common.h
|
||||
--- GEOGRAM_BLD/src/lib/geogram/basic/common.h 2025-01-10 12:45:04.473611634 -0500
|
||||
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/common.h 2025-01-10 12:46:26.973144862 -0500
|
||||
@@ -216,6 +216,35 @@
|
||||
# define GEO_ARCH_32
|
||||
#endif
|
||||
|
||||
+// =============================== FreeBSD defines =========================
|
||||
+
|
||||
+#elif defined(__FreeBSD__)
|
||||
+
|
||||
+#define GEO_OS_FREEBSD
|
||||
+#define GEO_OS_UNIX
|
||||
+
|
||||
+#if defined(_OPENMP)
|
||||
+# define GEO_OPENMP
|
||||
+#endif
|
||||
+
|
||||
+#if defined(__INTEL_COMPILER)
|
||||
+# define GEO_COMPILER_INTEL
|
||||
+#elif defined(__clang__)
|
||||
+# define GEO_COMPILER_CLANG
|
||||
+#elif defined(__GNUC__)
|
||||
+# define GEO_COMPILER_GCC
|
||||
+#else
|
||||
+# error "Unsupported compiler"
|
||||
+#endif
|
||||
+
|
||||
+// The following works on GCC and ICC
|
||||
+#if defined(__x86_64)
|
||||
+# define GEO_ARCH_64
|
||||
+#else
|
||||
+# define GEO_ARCH_32
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
// =============================== WINDOWS defines =========================
|
||||
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
diff -Naur GEOGRAM_BLD/src/lib/geogram/lua/lua_io.cpp GEOGRAM_BLD_bsd/src/lib/geogram/lua/lua_io.cpp
|
||||
--- GEOGRAM_BLD/src/lib/geogram/lua/lua_io.cpp 2025-01-10 12:45:04.497611199 -0500
|
||||
+++ GEOGRAM_BLD_bsd/src/lib/geogram/lua/lua_io.cpp 2025-01-10 12:46:26.973144862 -0500
|
||||
@@ -237,6 +237,8 @@
|
||||
const char* result = "unknown";
|
||||
#if defined(GEO_OS_LINUX)
|
||||
result = "Linux";
|
||||
+#elif defined(GEO_OS_FREEBSD)
|
||||
+ result = "FreeBSD";
|
||||
#elif defined(GEO_OS_APPLE)
|
||||
result = "Apple";
|
||||
#elif defined(GEO_OS_WINDOWS)
|
||||
diff -Naur GEOGRAM_BLD/src/lib/geogram/NL/nl_private.h GEOGRAM_BLD_bsd/src/lib/geogram/NL/nl_private.h
|
||||
--- GEOGRAM_BLD/src/lib/geogram/NL/nl_private.h 2025-01-10 12:45:04.501611127 -0500
|
||||
+++ GEOGRAM_BLD_bsd/src/lib/geogram/NL/nl_private.h 2025-01-10 12:46:26.973144862 -0500
|
||||
@@ -62,7 +62,7 @@
|
||||
#define NL_OS_APPLE
|
||||
#endif
|
||||
|
||||
-#if defined(__linux__) || defined(__ANDROID__) || defined(NL_OS_APPLE)
|
||||
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(NL_OS_APPLE)
|
||||
/**
|
||||
* \brief Defined if compiled on a Unix-like platform.
|
||||
*/
|
||||
@@ -1,217 +0,0 @@
|
||||
diff -Naur geogram/cmake/FindGeogram.cmake GEOGRAM_BLD/cmake/FindGeogram.cmake
|
||||
--- geogram/cmake/FindGeogram.cmake 2024-05-16 19:12:42.296106646 -0400
|
||||
+++ GEOGRAM_BLD/cmake/FindGeogram.cmake 2024-05-16 19:13:05.295717740 -0400
|
||||
@@ -109,36 +109,3 @@
|
||||
# Hide variables from the default CMake-Gui options
|
||||
mark_as_advanced (GEOGRAM_LIBRARY GEOGRAM_GFX_LIBRARY GEOGRAM_INCLUDE_DIR)
|
||||
|
||||
-# Some specific settings for Windows
|
||||
-
|
||||
-if(WIN32)
|
||||
-
|
||||
- # Default mode for Windows uses static libraries. Use this variable to
|
||||
- # link with geogram compiled as DLLs.
|
||||
- set(VORPALINE_BUILD_DYNAMIC FALSE CACHE BOOL "Installed Geogram uses DLLs")
|
||||
-
|
||||
- # remove warning for multiply defined symbols (caused by multiple
|
||||
- # instanciations of STL templates)
|
||||
- add_definitions(/wd4251)
|
||||
-
|
||||
- # remove all unused stuff from windows.h
|
||||
- add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
- add_definitions(-DVC_EXTRALEAN)
|
||||
-
|
||||
- # do not define a min() and a max() macro, breaks
|
||||
- # std::min() and std::max() !!
|
||||
- add_definitions(-DNOMINMAX )
|
||||
-
|
||||
- # we want M_PI etc...
|
||||
- add_definitions(-D_USE_MATH_DEFINES)
|
||||
-
|
||||
- if(NOT VORPALINE_BUILD_DYNAMIC)
|
||||
- # If we use static library, we link with the static C++ runtime.
|
||||
- foreach(config ${CMAKE_CONFIGURATION_TYPES})
|
||||
- string(TOUPPER ${config} config)
|
||||
- string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
|
||||
- string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
|
||||
- endforeach()
|
||||
- endif()
|
||||
-
|
||||
-endif()
|
||||
diff -Naur geogram/cmake/platforms/Windows-vs.cmake GEOGRAM_BLD/cmake/platforms/Windows-vs.cmake
|
||||
--- geogram/cmake/platforms/Windows-vs.cmake 2024-05-16 19:12:42.300106579 -0400
|
||||
+++ GEOGRAM_BLD/cmake/platforms/Windows-vs.cmake 2024-05-16 19:13:46.791015211 -0400
|
||||
@@ -64,18 +64,9 @@
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
|
||||
endif()
|
||||
|
||||
-# Change flags for static link
|
||||
-if(VORPALINE_BUILD_DYNAMIC)
|
||||
# remove warning for multiply defined symbols (caused by multiple
|
||||
# instanciations of STL templates)
|
||||
- add_definitions(/wd4251)
|
||||
-else()
|
||||
- foreach(config ${CMAKE_CONFIGURATION_TYPES})
|
||||
- string(TOUPPER ${config} config)
|
||||
- string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
|
||||
- string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
|
||||
- endforeach()
|
||||
-endif()
|
||||
+add_definitions(/wd4251)
|
||||
|
||||
# Additional release flags
|
||||
foreach(config RELEASE RELWITHDEBINFO MINSIZEREL)
|
||||
diff -Naur geogram/src/tutorial/01_basics/hello_geogram/FindGeogram.cmake GEOGRAM_BLD/src/tutorial/01_basics/hello_geogram/FindGeogram.cmake
|
||||
--- geogram/src/tutorial/01_basics/hello_geogram/FindGeogram.cmake 2024-05-16 19:12:42.376105295 -0400
|
||||
+++ GEOGRAM_BLD/src/tutorial/01_basics/hello_geogram/FindGeogram.cmake 2024-05-16 19:14:56.457833524 -0400
|
||||
@@ -5,8 +5,9 @@
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
-# Geogram_FOUND - True if geogram has been found.
|
||||
-# Geogram::geogram - Imported target for the main Geogram library.
|
||||
+# Geogram_FOUND - True if geogram has been found.
|
||||
+# Geogram::geogram - Imported target for the main Geogram library.
|
||||
+# Geogram::geogram_gfx - Imported target for Geogram graphics library.
|
||||
#
|
||||
# This module reads hints about the Geogram location from the following
|
||||
# environment variables:
|
||||
@@ -52,20 +53,20 @@
|
||||
# system search path since it may be already installed
|
||||
# in the system
|
||||
find_library (GEOGRAM_GLFW3_LIBRARY
|
||||
- NAMES glfw3 glfw geogram_glfw3
|
||||
+ NAMES glfw3 glfw geogram_glfw3 glfw3dll glfwdll
|
||||
PATHS ${GEOGRAM_SEARCH_PATHS} ${GEOGRAM_SEARCH_PATHS_SYSTEM}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
- Geogram DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
|
||||
+ GEOGRAM DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# Create an imported target for Geogram
|
||||
-If (Geogram_FOUND)
|
||||
+If (GEOGRAM_FOUND)
|
||||
|
||||
- set(GEOGRAM_INSTALL_PREFIX ${GEOGRAM_INCLUDE_DIR}/..)
|
||||
+ set(GEOGRAM_INSTALL_PREFIX ${GEOGRAM_INCLUDE_DIR}/../..)
|
||||
|
||||
if (NOT TARGET Geogram::geogram)
|
||||
add_library (Geogram::geogram UNKNOWN IMPORTED)
|
||||
@@ -108,36 +109,3 @@
|
||||
# Hide variables from the default CMake-Gui options
|
||||
mark_as_advanced (GEOGRAM_LIBRARY GEOGRAM_GFX_LIBRARY GEOGRAM_INCLUDE_DIR)
|
||||
|
||||
-# Some specific settings for Windows
|
||||
-
|
||||
-if(WIN32)
|
||||
-
|
||||
- # Default mode for Windows uses static libraries. Use this variable to
|
||||
- # link with geogram compiled as DLLs.
|
||||
- set(VORPALINE_BUILD_DYNAMIC FALSE CACHE BOOL "Installed Geogram uses DLLs")
|
||||
-
|
||||
- # remove warning for multiply defined symbols (caused by multiple
|
||||
- # instanciations of STL templates)
|
||||
- add_definitions(/wd4251)
|
||||
-
|
||||
- # remove all unused stuff from windows.h
|
||||
- add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
- add_definitions(-DVC_EXTRALEAN)
|
||||
-
|
||||
- # do not define a min() and a max() macro, breaks
|
||||
- # std::min() and std::max() !!
|
||||
- add_definitions(-DNOMINMAX )
|
||||
-
|
||||
- # we want M_PI etc...
|
||||
- add_definitions(-D_USE_MATH_DEFINES)
|
||||
-
|
||||
- if(NOT VORPALINE_BUILD_DYNAMIC)
|
||||
- # If we use static library, we link with the static C++ runtime.
|
||||
- foreach(config ${CMAKE_CONFIGURATION_TYPES})
|
||||
- string(TOUPPER ${config} config)
|
||||
- string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
|
||||
- string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
|
||||
- endforeach()
|
||||
- endif()
|
||||
-
|
||||
-endif()
|
||||
diff -Naur geogram/src/tutorial/01_basics/hello_GLUP_app/FindGeogram.cmake GEOGRAM_BLD/src/tutorial/01_basics/hello_GLUP_app/FindGeogram.cmake
|
||||
--- geogram/src/tutorial/01_basics/hello_GLUP_app/FindGeogram.cmake 2024-05-16 19:12:42.376105295 -0400
|
||||
+++ GEOGRAM_BLD/src/tutorial/01_basics/hello_GLUP_app/FindGeogram.cmake 2024-05-16 19:14:16.402513268 -0400
|
||||
@@ -5,8 +5,9 @@
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
-# Geogram_FOUND - True if geogram has been found.
|
||||
-# Geogram::geogram - Imported target for the main Geogram library.
|
||||
+# Geogram_FOUND - True if geogram has been found.
|
||||
+# Geogram::geogram - Imported target for the main Geogram library.
|
||||
+# Geogram::geogram_gfx - Imported target for Geogram graphics library.
|
||||
#
|
||||
# This module reads hints about the Geogram location from the following
|
||||
# environment variables:
|
||||
@@ -52,20 +53,20 @@
|
||||
# system search path since it may be already installed
|
||||
# in the system
|
||||
find_library (GEOGRAM_GLFW3_LIBRARY
|
||||
- NAMES glfw3 glfw geogram_glfw3
|
||||
+ NAMES glfw3 glfw geogram_glfw3 glfw3dll glfwdll
|
||||
PATHS ${GEOGRAM_SEARCH_PATHS} ${GEOGRAM_SEARCH_PATHS_SYSTEM}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
- Geogram DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
|
||||
+ GEOGRAM DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# Create an imported target for Geogram
|
||||
-If (Geogram_FOUND)
|
||||
+If (GEOGRAM_FOUND)
|
||||
|
||||
- set(GEOGRAM_INSTALL_PREFIX ${GEOGRAM_INCLUDE_DIR}/..)
|
||||
+ set(GEOGRAM_INSTALL_PREFIX ${GEOGRAM_INCLUDE_DIR}/../..)
|
||||
|
||||
if (NOT TARGET Geogram::geogram)
|
||||
add_library (Geogram::geogram UNKNOWN IMPORTED)
|
||||
@@ -108,36 +109,3 @@
|
||||
# Hide variables from the default CMake-Gui options
|
||||
mark_as_advanced (GEOGRAM_LIBRARY GEOGRAM_GFX_LIBRARY GEOGRAM_INCLUDE_DIR)
|
||||
|
||||
-# Some specific settings for Windows
|
||||
-
|
||||
-if(WIN32)
|
||||
-
|
||||
- # Default mode for Windows uses static libraries. Use this variable to
|
||||
- # link with geogram compiled as DLLs.
|
||||
- set(VORPALINE_BUILD_DYNAMIC FALSE CACHE BOOL "Installed Geogram uses DLLs")
|
||||
-
|
||||
- # remove warning for multiply defined symbols (caused by multiple
|
||||
- # instanciations of STL templates)
|
||||
- add_definitions(/wd4251)
|
||||
-
|
||||
- # remove all unused stuff from windows.h
|
||||
- add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
- add_definitions(-DVC_EXTRALEAN)
|
||||
-
|
||||
- # do not define a min() and a max() macro, breaks
|
||||
- # std::min() and std::max() !!
|
||||
- add_definitions(-DNOMINMAX )
|
||||
-
|
||||
- # we want M_PI etc...
|
||||
- add_definitions(-D_USE_MATH_DEFINES)
|
||||
-
|
||||
- if(NOT VORPALINE_BUILD_DYNAMIC)
|
||||
- # If we use static library, we link with the static C++ runtime.
|
||||
- foreach(config ${CMAKE_CONFIGURATION_TYPES})
|
||||
- string(TOUPPER ${config} config)
|
||||
- string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
|
||||
- string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
|
||||
- endforeach()
|
||||
- endif()
|
||||
-
|
||||
-endif()
|
||||
+1
-1
Submodule gte/GeometricTools updated: 7adae93f85...e095b84018
+1
-1
@@ -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)
|
||||
|
||||
+2
-3
@@ -15,8 +15,8 @@ if (NOT WIN32 AND NOT APPLE)
|
||||
BUILD_IN_SOURCE ON
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/<SOURCE_SUBDIR>/configure --disable-extras --disable-tools --disable-tests --disable-samples --prefix=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
BUILD_COMMAND make -j${pcnt}
|
||||
INSTALL_COMMAND make -j1 install
|
||||
BUILD_COMMAND ${BEXT_MAKE_COMMAND} -j${pcnt}
|
||||
INSTALL_COMMAND ${BEXT_MAKE_COMMAND} -j1 install
|
||||
LOG_CONFIGURE ${EXT_BUILD_QUIET}
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
LOG_INSTALL ${EXT_BUILD_QUIET}
|
||||
@@ -43,4 +43,3 @@ endif (NOT WIN32 AND NOT APPLE)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
+86
-11
@@ -15,37 +15,113 @@ if (ENABLE_ISPC)
|
||||
if (TARGET ZLIB_BLD)
|
||||
set(Z_PREFIX_STR "brl_")
|
||||
endif (TARGET ZLIB_BLD)
|
||||
set(ISPC_PROGRAM_PATH_ARGS)
|
||||
if (FLEX_TARGET OR BISON_TARGET)
|
||||
list(APPEND ISPC_PROGRAM_PATH_ARGS
|
||||
-DCMAKE_PROGRAM_PATH=${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}
|
||||
)
|
||||
endif ()
|
||||
if (M4_EXECUTABLE)
|
||||
# Normalize to forward slashes. M4_EXECUTABLE may arrive with native
|
||||
# backslashes (e.g. set in CMakePresets as C:\...\m4.exe); passed verbatim
|
||||
# through ExternalProject_Add's CMAKE_ARGS those backslashes are consumed as
|
||||
# escapes and the ISPC sub-build sees a mangled, non-existent path.
|
||||
file(TO_CMAKE_PATH "${M4_EXECUTABLE}" M4_EXECUTABLE_CMAKE)
|
||||
list(APPEND ISPC_PROGRAM_PATH_ARGS
|
||||
-DM4_EXECUTABLE=${M4_EXECUTABLE_CMAKE}
|
||||
)
|
||||
endif ()
|
||||
|
||||
# ispc depends on the clang compiler - its build will switch the compiler if
|
||||
# not already using clang. Need to pass in the bundled LLVM clang compiler
|
||||
# location, if we have it.
|
||||
# winflexbison installs its binaries as win_flex.exe / win_bison.exe on
|
||||
# Windows; the portable names are plain flex / bison elsewhere.
|
||||
if (WIN32)
|
||||
set(ISPC_FLEX_NAME win_flex.exe)
|
||||
set(ISPC_BISON_NAME win_bison.exe)
|
||||
else ()
|
||||
set(ISPC_FLEX_NAME flex)
|
||||
set(ISPC_BISON_NAME bison)
|
||||
endif ()
|
||||
|
||||
set(ISPC_FLEXBISON_ARGS)
|
||||
if (BISON_TARGET)
|
||||
list(APPEND ISPC_FLEXBISON_ARGS
|
||||
-DBISON_EXECUTABLE=${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}/${ISPC_BISON_NAME}
|
||||
)
|
||||
endif (BISON_TARGET)
|
||||
if (FLEX_TARGET)
|
||||
list(APPEND ISPC_FLEXBISON_ARGS
|
||||
-DFLEX_EXECUTABLE=${CMAKE_NOBUNDLE_INSTALL_PREFIX}/${BIN_DIR}/${ISPC_FLEX_NAME}
|
||||
)
|
||||
endif (FLEX_TARGET)
|
||||
|
||||
# Select the compiler used to build ispc itself. ispc only forces clang on
|
||||
# UNIX (see its CMakeLists.txt); on Windows it happily builds with MSVC, which
|
||||
# is in fact the conventional Windows toolchain for ispc. We therefore switch
|
||||
# to the bundled LLVM clang only where the platform SDK is expected to be
|
||||
# compatible with that bundled compiler.
|
||||
if (LLVM_TARGET AND NOT WIN32 AND NOT APPLE)
|
||||
set(ISPC_C_COMPILER "${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
set(ISPC_CXX_COMPILER "${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
else ()
|
||||
set(ISPC_C_COMPILER "${CMAKE_C_COMPILER}")
|
||||
set(ISPC_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
|
||||
endif ()
|
||||
|
||||
set(ISPC_DEBUG_ARGS)
|
||||
if (WIN32)
|
||||
# ispc is a build-time codegen tool we never need to debug, and (like LLVM)
|
||||
# it statically links the large bundled LLVM. In a Debug config MSVC links
|
||||
# ispc.exe with the default "/debug /INCREMENTAL" and tries to emit a full
|
||||
# PDB, which fails with LNK1201 (error writing to program database). Suppress
|
||||
# debug-info generation for the Debug config so ispc links cleanly; the CRT
|
||||
# selection (and thus Debug/Release compatibility) is unaffected. The quotes
|
||||
# must wrap the whole -D argument, not just the value -- see llvm/CMakeLists.txt.
|
||||
list(APPEND ISPC_DEBUG_ARGS
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=$<$<CONFIG:Debug>:/DEBUG:NONE>"
|
||||
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=$<$<CONFIG:Debug>:/DEBUG:NONE /INCREMENTAL:NO>"
|
||||
)
|
||||
endif ()
|
||||
|
||||
# ispc links against the bundled LLVM. Pass the bundled LLVM clang compiler
|
||||
# location when we are switching to it (non-Windows); otherwise ispc is built
|
||||
# with the native compiler above.
|
||||
ExternalProject_Add(ISPC_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/ispc"
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/ispc.patch
|
||||
COMMAND ${CMAKE_COMMAND};-E;copy;${PROJECT_SOURCE_DIR}/CMake/FindZLIB.cmake;<SOURCE_DIR>/cmake/FindZLIB.cmake
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
|
||||
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
|
||||
-DFLEX_ROOT=$<$<BOOL:${FLEX_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DBISON_ROOT=$<$<BOOL:${BISON_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
# On Windows ispc links itself with /DEPENDENTLOADFLAG:0x800, which limits
|
||||
# the loader to %SystemRoot%\system32 when resolving the exe's imports. The
|
||||
# bundled zlib ships as z_brl.dll in the install tree (not system32), so a
|
||||
# dynamically-linked ispc-slim.exe cannot start (exit 0xC0000135,
|
||||
# STATUS_DLL_NOT_FOUND) either during the build (when it generates the stdlib
|
||||
# bitcode) or once installed. Link zlib statically so ispc-slim.exe has no
|
||||
# non-system DLL dependency and satisfies its own hardening flag. This is
|
||||
# honored by our FindZLIB.cmake, including the find_package(ZLIB) that the
|
||||
# bundled LLVM's config re-runs (LLVM is what pulls in the zlib dependency).
|
||||
$<$<AND:$<BOOL:${WIN32}>,$<BOOL:${ZLIB_TARGET}>>:-DZLIB_USE_STATIC_LIBS=ON>
|
||||
${ISPC_PROGRAM_PATH_ARGS}
|
||||
${ISPC_FLEXBISON_ARGS}
|
||||
-DCurses_ROOT=$<$<BOOL:${NCURSES_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DLLVM_ROOT=$<$<BOOL:${LLVM_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
$<$<BOOL:${LLVM_TARGET}>:-DLLVM_CONFIG_EXECUTABLE=${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/llvm-config>
|
||||
$<$<BOOL:${LLVM_TARGET}>:-DLLVM_CONFIG_EXECUTABLE=${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/llvm-config${CMAKE_EXECUTABLE_SUFFIX}>
|
||||
-DISPC_INCLUDE_EXAMPLES=OFF
|
||||
-DISPC_INCLUDE_DPCPP_EXAMPLES=OFF
|
||||
-DISPC_INCLUDE_TESTS=OFF
|
||||
-DBIN_DIR=${BIN_DIR}
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
||||
-DCMAKE_CXX_COMPILER=$<IF:${LLVM_TARGET},${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/clang++,${CMAKE_CXX_COMPILER}>
|
||||
-DCMAKE_C_COMPILER=$<IF:${LLVM_TARGET},${CMAKE_BUNDLE_INSTALL_PREFIX}/bin/clang,${CMAKE_C_COMPILER}>
|
||||
#-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
#-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${ISPC_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${ISPC_C_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=${LIB_DIR}
|
||||
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}
|
||||
${ISPC_DEBUG_ARGS}
|
||||
LOG_CONFIGURE ${EXT_BUILD_QUIET}
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
LOG_INSTALL ${EXT_BUILD_QUIET}
|
||||
@@ -70,4 +146,3 @@ endif (ENABLE_ISPC)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
+1
-1
Submodule ispc/ispc updated: d394222aef...3fc6d50cf2
+50
-148
@@ -1,142 +1,36 @@
|
||||
diff -Naur ispc/cmake/FindZLIB.cmake ISPC_BLD/cmake/FindZLIB.cmake
|
||||
--- ispc/cmake/FindZLIB.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ ISPC_BLD/cmake/FindZLIB.cmake 2023-12-21 14:04:49.612387610 -0500
|
||||
@@ -0,0 +1,123 @@
|
||||
+#.rst:
|
||||
+# FindZLIB
|
||||
+# --------
|
||||
+#
|
||||
+# Find the native ZLIB includes and library.
|
||||
+#
|
||||
+# IMPORTED Targets
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if
|
||||
+# ZLIB has been found.
|
||||
+#
|
||||
+# Result Variables
|
||||
+# ^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# This module defines the following variables:
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
+# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
+# ZLIB_FOUND - True if zlib found.
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
|
||||
+# ZLIB_VERSION_MAJOR - The major version of zlib
|
||||
+# ZLIB_VERSION_MINOR - The minor version of zlib
|
||||
+# ZLIB_VERSION_PATCH - The patch version of zlib
|
||||
+# ZLIB_VERSION_TWEAK - The tweak version of zlib
|
||||
+#
|
||||
+# Backward Compatibility
|
||||
+# ^^^^^^^^^^^^^^^^^^^^^^
|
||||
+#
|
||||
+# The following variable are provided for backward compatibility
|
||||
+#
|
||||
+# ::
|
||||
+#
|
||||
+# ZLIB_MAJOR_VERSION - The major version of zlib
|
||||
+# ZLIB_MINOR_VERSION - The minor version of zlib
|
||||
+# ZLIB_PATCH_VERSION - The patch version of zlib
|
||||
+#
|
||||
+# Hints
|
||||
+# ^^^^^
|
||||
+#
|
||||
+# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
|
||||
+# module where to look.
|
||||
+
|
||||
+#=============================================================================
|
||||
+# Copyright 2001-2011 Kitware, Inc.
|
||||
+#
|
||||
+# Distributed under the OSI-approved BSD License (the "License");
|
||||
+# see accompanying file Copyright.txt for details.
|
||||
+#
|
||||
+# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+# See the License for more information.
|
||||
+#=============================================================================
|
||||
+# (To distribute this file outside of CMake, substitute the full
|
||||
+# License text for the above reference.)
|
||||
+
|
||||
+set(_ZLIB_SEARCHES)
|
||||
+
|
||||
+# Search ZLIB_ROOT first if it is set.
|
||||
+if(ZLIB_ROOT)
|
||||
+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
|
||||
+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
|
||||
+endif()
|
||||
+
|
||||
+# Normal search.
|
||||
+set(_ZLIB_SEARCH_NORMAL
|
||||
+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
|
||||
+ "$ENV{PROGRAMFILES}/zlib"
|
||||
+ )
|
||||
+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
|
||||
+
|
||||
+set(ZLIB_NAMES z_brl z zlib zdll zlib1 zlibd zlibd1)
|
||||
+
|
||||
+# Try each search configuration.
|
||||
+foreach(search ${_ZLIB_SEARCHES})
|
||||
+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
|
||||
+endforeach()
|
||||
+
|
||||
+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
||||
+
|
||||
+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
|
||||
+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
|
||||
+
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
|
||||
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
|
||||
+
|
||||
+ # only append a TWEAK version if it exists:
|
||||
+ set(ZLIB_VERSION_TWEAK "")
|
||||
+ if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
|
||||
+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
|
||||
+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
|
||||
+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
|
||||
+endif()
|
||||
+
|
||||
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
+# all listed variables are TRUE
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
|
||||
+ VERSION_VAR ZLIB_VERSION_STRING)
|
||||
+
|
||||
+if(ZLIB_FOUND)
|
||||
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
+
|
||||
+ if(NOT TARGET ZLIB::ZLIB)
|
||||
+ add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
|
||||
+ set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
+ IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
||||
+ endif()
|
||||
+endif()
|
||||
diff -Naur ispc/CMakeLists.txt ISPC_BLD/CMakeLists.txt
|
||||
--- ispc/CMakeLists.txt 2024-06-26 20:46:06.003030179 -0400
|
||||
+++ ISPC_BLD/CMakeLists.txt 2024-06-26 20:52:51.978011242 -0400
|
||||
@@ -265,6 +265,7 @@
|
||||
endif()
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 042e6dd..0d3a2ca 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -312,6 +312,7 @@ endif()
|
||||
|
||||
set(BITCODE2CPP "${CMAKE_CURRENT_SOURCE_DIR}/scripts/bitcode2cpp.py")
|
||||
|
||||
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/ispcrt/cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FixWindowsPath.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLLVM.cmake)
|
||||
@@ -712,6 +713,10 @@
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Git.cmake)
|
||||
@@ -805,9 +806,18 @@
|
||||
list(APPEND LINK_OPTIONS_PRIVATE /DYNAMICBASE)
|
||||
# Control flow guard
|
||||
list(APPEND LINK_OPTIONS_PRIVATE /GUARD:CF)
|
||||
# When resolving statically linked import dependencies of the module, limit
|
||||
# the module search path to %windows%\system32 directory only.
|
||||
- list(APPEND LINK_OPTIONS_PRIVATE /DEPENDENTLOADFLAG:0x800)
|
||||
+ # bext: apply this loader hardening only to non-Debug builds. A Debug ispc
|
||||
+ # depends on the debug CRT DLLs (ucrtbased/msvcp140d/vcruntime140d/
|
||||
+ # vcruntime140_1d), which are never present in system32. Under
|
||||
+ # /DEPENDENTLOADFLAG:0x800 the loader searches only system32 and cannot find
|
||||
+ # them, so ispc-slim.exe fails to start (exit 0xC0000135) when it is run
|
||||
+ # during the build to generate the stdlib bitcode.
|
||||
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" ISPC_BEXT_BUILD_TYPE_UC)
|
||||
+ if (NOT ISPC_BEXT_BUILD_TYPE_UC STREQUAL "DEBUG")
|
||||
+ list(APPEND LINK_OPTIONS_PRIVATE /DEPENDENTLOADFLAG:0x800)
|
||||
+ endif()
|
||||
if (MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
|
||||
list(APPEND LINK_OPTIONS_PUBLIC /OPT:REF /OPT:ICF)
|
||||
endif()
|
||||
@@ -846,6 +847,10 @@ if (NOT WIN32 AND NOT APPLE)
|
||||
list(APPEND LINK_LIBRARIES "-Wl,--start-group")
|
||||
endif()
|
||||
|
||||
@@ -147,17 +41,25 @@ diff -Naur ispc/CMakeLists.txt ISPC_BLD/CMakeLists.txt
|
||||
# Link against Clang libraries
|
||||
foreach(clangLib ${CLANG_LIBRARY_LIST})
|
||||
# Preferred way to build ISPC is to link it with individual clang static
|
||||
@@ -762,7 +767,12 @@
|
||||
# but it contains both libform.so and libcurses.so.
|
||||
# We need libcurses.so only, so exclude libform.so from the list.
|
||||
list(FILTER CURSES_LIBRARIES EXCLUDE REGEX ".*libform.*")
|
||||
- list(APPEND LINK_LIBRARIES pthread ${CURSES_LIBRARIES})
|
||||
+ list(APPEND LINK_LIBRARIES pthread)
|
||||
+ if (CURSES_NCURSES_LIBRARY)
|
||||
+ list(APPEND LINK_LIBRARIES ${CURSES_NCURSES_LIBRARY})
|
||||
+ elseif (CURSES_NCURSES_LIBRARY)
|
||||
+ list(APPEND LINK_LIBRARIES ${CURSES_LIBRARIES})
|
||||
+ endif ()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
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}
|
||||
)
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
if (USE_BRLCAD)
|
||||
|
||||
# Decide if we're using ITcl
|
||||
cad_enable(ITCL "archer;mged;bwish;rtwizard;brlman")
|
||||
|
||||
else (USE_BRLCAD)
|
||||
|
||||
if (ENABLE_TCL AND NOT DEFINED ENABLE_ITCL)
|
||||
set(ENABLE_ITCL ON)
|
||||
endif (ENABLE_TCL AND NOT DEFINED ENABLE_ITCL)
|
||||
|
||||
endif (USE_BRLCAD)
|
||||
|
||||
if (NOT ENABLE_ITCL AND NOT DEFINED DISABLE_ITCL)
|
||||
|
||||
find_package(ITCL)
|
||||
|
||||
if (NOT ITCL_FOUND AND NOT DEFINED ENABLE_ITCL)
|
||||
set(ENABLE_ITCL "ON" CACHE BOOL "Enable itcl build")
|
||||
endif (NOT ITCL_FOUND AND NOT DEFINED ENABLE_ITCL)
|
||||
|
||||
endif (NOT ENABLE_ITCL AND NOT DEFINED DISABLE_ITCL)
|
||||
set(ENABLE_ITCL "${ENABLE_ITCL}" CACHE BOOL "Enable itcl build")
|
||||
|
||||
if (ENABLE_ITCL)
|
||||
|
||||
git_submodule_init(itcl configure.in)
|
||||
|
||||
RegisterDeps(ITCL)
|
||||
|
||||
# Itcl3 has a problem in that it requires internal Tcl headers.
|
||||
# Occasionally (but not always) we can get these headers from
|
||||
# a system include path.
|
||||
|
||||
if (NOT TARGET TCL_BLD)
|
||||
# If we're not building the bundled Tcl, see if the system
|
||||
# Tcl gives us the private headers.
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
find_package(TCL)
|
||||
set(HDRS_CANDIDATE_DIR ${TCL_INCLUDE_PATH}8.6/tcl-private)
|
||||
if (EXISTS ${HDRS_CANDIDATE_DIR})
|
||||
set(TCL_PRIVATE_HDRS ${HDRS_CANDIDATE_DIR}/generic)
|
||||
if(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/unix)
|
||||
else(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/win)
|
||||
endif(NOT WIN32)
|
||||
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
|
||||
if (NOT TCL_PRIVATE_HDRS AND EXISTS ${CMAKE_SOURCE_DIR}/tcl/tcl)
|
||||
set(TCL_SOURCE_DIR ${CMAKE_SOURCE_DIR}/tcl/tcl)
|
||||
set(TCL_PRIVATE_HDRS ${TCL_SOURCE_DIR}/generic)
|
||||
if(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${TCL_SOURCE_DIR}/unix)
|
||||
else(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${TCL_SOURCE_DIR}/win)
|
||||
endif(NOT WIN32)
|
||||
endif (NOT TCL_PRIVATE_HDRS AND EXISTS ${CMAKE_SOURCE_DIR}/tcl/tcl)
|
||||
|
||||
# message("TCL HEADERS2: ${TCL_PRIVATE_HDRS}")
|
||||
|
||||
# If we STILL don't have anything, patch the Itcl sources to add
|
||||
# the headers in question
|
||||
set(TCL_HDRS_PATCH_CMD)
|
||||
if (NOT TCL_PRIVATE_HDRS)
|
||||
set(TCL_HDRS_PATCH_CMD ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/tcl_priv_hdrs.patch)
|
||||
set(TCL_PRIVATE_HDRS "${CMAKE_CURRENT_BINARY_DIR}/ITCL_BLD-prefix/src/ITCL_BLD/tcl_hdrs")
|
||||
if(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${TCL_PRIVATE_HDRS}/unix)
|
||||
else(NOT WIN32)
|
||||
set(TCL_PRIVATE_HDRS_OS ${TCL_PRIVATE_HDRS}/win)
|
||||
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.
|
||||
set(RPATH_SUFFIX itcl3.4)
|
||||
|
||||
ExternalProject_Add(ITCL_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/itcl"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/itcl.patch
|
||||
COMMAND ${TCL_HDRS_PATCH_CMD}
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DBIN_DIR=$<IF:$<BOOL:${WIN32}>,${LIB_DIR},${BIN_DIR}>
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}/${RPATH_SUFFIX}
|
||||
-DINCLUDE_DIR=${INCLUDE_DIR}
|
||||
-DSHARED_DIR=${LIB_DIR}
|
||||
-DTCL_ENABLE_TK=ON
|
||||
-DTCL_ROOT=$<$<BOOL:${TCL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DTCL_PRIVATE_HDRS=${TCL_PRIVATE_HDRS}
|
||||
-DTCL_PRIVATE_HDRS_OS=${TCL_PRIVATE_HDRS_OS}
|
||||
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
|
||||
)
|
||||
|
||||
TargetInstallDeps(ITCL ITCL_DEPENDS)
|
||||
|
||||
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/itcl/license.terms
|
||||
${DOC_LICENSE_DIR}/itcl3.txt
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
endif (ENABLE_ITCL)
|
||||
|
||||
mark_as_advanced(ITCL_LIBRARY)
|
||||
mark_as_advanced(ITCL_LIBRARIES)
|
||||
mark_as_advanced(ITCL_VERSION)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
-1
Submodule itcl/itcl deleted from 33cea588fa
@@ -1,3 +0,0 @@
|
||||
PATCH
|
||||
TCL
|
||||
|
||||
-930
@@ -1,930 +0,0 @@
|
||||
diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
|
||||
--- itcl/CMake/FindTCL.cmake 1969-12-31 19:00:00
|
||||
+++ ITCL_BLD/CMake/FindTCL.cmake 2025-03-19 02:30:04
|
||||
@@ -0,0 +1,554 @@
|
||||
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
+# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
+
|
||||
+#[=======================================================================[.rst:
|
||||
+FindTCL
|
||||
+-------
|
||||
+
|
||||
+This module finds if Tcl 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:
|
||||
+
|
||||
+::
|
||||
+
|
||||
+TCL_FOUND = Tcl was found
|
||||
+TCLSH_FOUND = TRUE if tclsh has been found
|
||||
+TCL_LIBRARY = path to Tcl library (tcl tcl80)
|
||||
+TCL_INCLUDE_PATH = path to where tcl.h can be found
|
||||
+TCL_TCLSH = path to tclsh binary (tcl tcl80)
|
||||
+
|
||||
+
|
||||
+
|
||||
+If TCL_ENABLE_TK is set, the following are also set:
|
||||
+
|
||||
+::
|
||||
+
|
||||
+TK_FOUND = Tk was found
|
||||
+TCLTK_FOUND = Tcl and Tk were found
|
||||
+TK_LIBRARY = path to Tk library (tk tk80 etc)
|
||||
+TK_INCLUDE_PATH = path to where tk.h can be found
|
||||
+TK_WISH = full path to the wish executable
|
||||
+TCL_STUB_LIBRARY = path to Tcl stub library
|
||||
+TK_STUB_LIBRARY = path to Tk stub library
|
||||
+TTK_STUB_LIBRARY = path to ttk stub library
|
||||
+
|
||||
+#]=======================================================================]
|
||||
+
|
||||
+
|
||||
+set(_TCL_SEARCHES)
|
||||
+
|
||||
+# Search TCL_ROOT first if it is set.
|
||||
+if(TCL_ROOT)
|
||||
+ set(_TCL_SEARCH_ROOT PATHS ${TCL_ROOT} NO_DEFAULT_PATH)
|
||||
+ list(APPEND _TCL_SEARCHES _TCL_SEARCH_ROOT)
|
||||
+endif()
|
||||
+
|
||||
+if(WIN32)
|
||||
+ get_filename_component(
|
||||
+ ActiveTcl_CurrentVersion
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
|
||||
+ NAME
|
||||
+ )
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_BIN_PATHS
|
||||
+ ${TCLTK_POSSIBLE_BIN_PATHS}
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
|
||||
+ )
|
||||
+
|
||||
+ get_filename_component(
|
||||
+ ActiveTcl_CurrentVersion
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
|
||||
+ NAME
|
||||
+ )
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_LIB_PATHS
|
||||
+ ${TCLTK_POSSIBLE_LIB_PATHS}
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib"
|
||||
+ "$ENV{ProgramFiles}/Tcl/Lib"
|
||||
+ "C:/Program Files/Tcl/lib"
|
||||
+ "C:/Tcl/lib"
|
||||
+ )
|
||||
+
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_INCLUDE_PATHS
|
||||
+ ${TCLTK_POSSIBLE_INCLUDE_PATHS}
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include"
|
||||
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include"
|
||||
+ "$ENV{ProgramFiles}/Tcl/include"
|
||||
+ "C:/Program Files/Tcl/include"
|
||||
+ "C:/Tcl/include"
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
+set(
|
||||
+ TCL_TCLSH_NAMES
|
||||
+ tclsh
|
||||
+ tclsh${TCL_LIBRARY_VERSION}
|
||||
+ tclsh${TK_LIBRARY_VERSION}
|
||||
+ tclsh${TK_WISH_VERSION}
|
||||
+ tclsh87
|
||||
+ tclsh8.7
|
||||
+ tclsh86
|
||||
+ tclsh8.6
|
||||
+ tclsh85
|
||||
+ tclsh8.5
|
||||
+ tclsh84
|
||||
+ tclsh8.4
|
||||
+ tclsh83
|
||||
+ tclsh8.3
|
||||
+ tclsh82
|
||||
+ tclsh8.2
|
||||
+ tclsh80
|
||||
+ tclsh8.0
|
||||
+)
|
||||
+if(CYGWIN)
|
||||
+ set(TCL_TCLSH_NAMES ${TCL_TCLSH_NAMES} cygtclsh83 cygtclsh80)
|
||||
+endif(CYGWIN)
|
||||
+
|
||||
+foreach(search ${_TCL_SEARCHES})
|
||||
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} ${${search}} PATH_SUFFIXES bin)
|
||||
+endforeach()
|
||||
+if(NOT TCL_TCLSH)
|
||||
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
|
||||
+endif(NOT TCL_TCLSH)
|
||||
+
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TK_WISH_NAMES
|
||||
+ wish
|
||||
+ wish${TCL_LIBRARY_VERSION}
|
||||
+ wish${TK_LIBRARY_VERSION}
|
||||
+ wish${TCL_TCLSH_VERSION}
|
||||
+ wish86
|
||||
+ wish8.6
|
||||
+ wish85
|
||||
+ wish8.5
|
||||
+ wish84
|
||||
+ wish8.4
|
||||
+ wish83
|
||||
+ wish8.3
|
||||
+ wish82
|
||||
+ wish8.2
|
||||
+ wish80
|
||||
+ wish8.0
|
||||
+ )
|
||||
+
|
||||
+ if(CYGWIN)
|
||||
+ set(TK_WISH_NAMES ${TK_WISH_NAMES} cygwish80)
|
||||
+ endif()
|
||||
+
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_program(TK_WISH NAMES ${TK_WISH_NAMES} ${${search}} PATH_SUFFIXES bin)
|
||||
+ endforeach()
|
||||
+ if(NOT TK_WISH)
|
||||
+ find_program(TK_WISH NAMES ${TK_WISH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
|
||||
+ endif(NOT TK_WISH)
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+if(TCLSH_VERSION_STRING)
|
||||
+ set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
|
||||
+else()
|
||||
+ get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
|
||||
+ get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
|
||||
+ string(REGEX REPLACE "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
|
||||
+endif()
|
||||
+
|
||||
+set(TCLTK_POSSIBLE_LIB_PATHS "${TCL_INCLUDE_PATH_PARENT}/lib" "${TCL_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib")
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_LIB_PATHS
|
||||
+ ${TCLTK_POSSIBLE_LIB_PATHS}
|
||||
+ "${TK_INCLUDE_PATH_PARENT}/lib"
|
||||
+ "${TK_LIBRARY_PATH}"
|
||||
+ "${TK_WISH_PATH_PARENT}/lib"
|
||||
+ )
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+set(
|
||||
+ TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
|
||||
+ lib
|
||||
+ lib/tcl
|
||||
+ lib/tcl/tcl8.7
|
||||
+ lib/tcl/tcl8.6
|
||||
+ lib/tcl/tcl8.5
|
||||
+ lib/tcl/tcl8.4
|
||||
+)
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
|
||||
+ ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ lib/tcl/tk8.7
|
||||
+ lib/tcl/tk8.6
|
||||
+ lib/tcl/tk8.5
|
||||
+ lib/tcl/tk8.4
|
||||
+ )
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+set(
|
||||
+ TCL_POSSIBLE_LIB_NAMES
|
||||
+ tcl
|
||||
+ tcl${TCL_LIBRARY_VERSION}
|
||||
+ tcl${TCL_TCLSH_VERSION}
|
||||
+ tcl${TK_WISH_VERSION}
|
||||
+ tcl87
|
||||
+ tcl8.7
|
||||
+ tcl87t
|
||||
+ tcl8.7t
|
||||
+ tcl86
|
||||
+ tcl8.6
|
||||
+ tcl86t
|
||||
+ tcl8.6t
|
||||
+ tcl85
|
||||
+ tcl8.5
|
||||
+ tcl84
|
||||
+ tcl8.4
|
||||
+ tcl83
|
||||
+ tcl8.3
|
||||
+ tcl82
|
||||
+ tcl8.2
|
||||
+ tcl80
|
||||
+ tcl8.0
|
||||
+)
|
||||
+
|
||||
+if(NOT TCL_LIBRARY)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_library(
|
||||
+ TCL_LIBRARY
|
||||
+ NAMES ${TCL_POSSIBLE_LIB_NAMES}
|
||||
+ NAMES_PER_DIR
|
||||
+ ${${search}}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endforeach()
|
||||
+endif()
|
||||
+if(NOT TCL_LIBRARY)
|
||||
+ find_library(
|
||||
+ TCL_LIBRARY
|
||||
+ NAMES ${TCL_POSSIBLE_LIB_NAMES}
|
||||
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+endif(NOT TCL_LIBRARY)
|
||||
+
|
||||
+set(
|
||||
+ TCLSTUB_POSSIBLE_LIB_NAMES
|
||||
+ tclstub
|
||||
+ tclstub${TK_LIBRARY_VERSION}
|
||||
+ tclstub${TCL_TCLSH_VERSION}
|
||||
+ tclstub${TK_WISH_VERSION}
|
||||
+ tclstub87
|
||||
+ tclstub8.7
|
||||
+ tclstub86
|
||||
+ tclstub8.6
|
||||
+ tclstub85
|
||||
+ tclstub8.5
|
||||
+ tclstub84
|
||||
+ tclstub8.4
|
||||
+ tclstub83
|
||||
+ tclstub8.3
|
||||
+ tclstub82
|
||||
+ tclstub8.2
|
||||
+ tclstub80
|
||||
+ tclstub8.0
|
||||
+)
|
||||
+if(NOT TCL_STUB_LIBRARY)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_library(
|
||||
+ TCL_STUB_LIBRARY
|
||||
+ NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
|
||||
+ NAMES_PER_DIR
|
||||
+ ${${search}}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endforeach()
|
||||
+endif()
|
||||
+if(NOT TCL_STUB_LIBRARY)
|
||||
+ find_library(TCL_STUB_LIBRARY NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
|
||||
+endif()
|
||||
+
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TK_POSSIBLE_LIB_NAMES
|
||||
+ tk
|
||||
+ tk${TK_LIBRARY_VERSION}
|
||||
+ tk${TCL_TCLSH_VERSION}
|
||||
+ tk${TK_WISH_VERSION}
|
||||
+ tk87
|
||||
+ tk8.7
|
||||
+ tk87t
|
||||
+ tk8.7t
|
||||
+ tk86
|
||||
+ tk8.6
|
||||
+ tk86t
|
||||
+ tk8.6t
|
||||
+ tk85
|
||||
+ tk8.5
|
||||
+ tk84
|
||||
+ tk8.4
|
||||
+ tk83
|
||||
+ tk8.3
|
||||
+ tk82
|
||||
+ tk8.2
|
||||
+ tk80
|
||||
+ tk8.0
|
||||
+ )
|
||||
+
|
||||
+ if(NOT TK_LIBRARY)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_library(
|
||||
+ TK_LIBRARY
|
||||
+ NAMES ${TK_POSSIBLE_LIB_NAMES}
|
||||
+ NAMES_PER_DIR
|
||||
+ ${${search}}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ if(NOT TK_LIBRARY)
|
||||
+ find_library(
|
||||
+ TK_LIBRARY
|
||||
+ NAMES ${TK_POSSIBLE_LIB_NAMES}
|
||||
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endif(NOT TK_LIBRARY)
|
||||
+
|
||||
+ set(
|
||||
+ TK_STUB_POSSIBLE_LIB_NAMES
|
||||
+ tkstub
|
||||
+ tkstub${TCL_LIBRARY_VERSION}
|
||||
+ tkstub${TCL_TCLSH_VERSION}
|
||||
+ tkstub${TK_WISH_VERSION}
|
||||
+ tkstub87
|
||||
+ tkstub8.7
|
||||
+ tkstub86
|
||||
+ tkstub8.6
|
||||
+ tkstub85
|
||||
+ tkstub8.5
|
||||
+ tkstub84
|
||||
+ tkstub8.4
|
||||
+ tkstub83
|
||||
+ tkstub8.3
|
||||
+ tkstub82
|
||||
+ tkstub8.2
|
||||
+ tkstub80
|
||||
+ tkstub8.0
|
||||
+ )
|
||||
+
|
||||
+ if(NOT TK_STUB_LIBRARY)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_library(
|
||||
+ TK_STUB_LIBRARY
|
||||
+ NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
|
||||
+ NAMES_PER_DIR
|
||||
+ ${${search}}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ if(NOT TK_STUB_LIBRARY)
|
||||
+ find_library(TK_STUB_LIBRARY NAMES ${TK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
|
||||
+ endif()
|
||||
+
|
||||
+ set(
|
||||
+ TTK_STUB_POSSIBLE_LIB_NAMES
|
||||
+ ttkstub
|
||||
+ ttkstub${TCL_LIBRARY_VERSION}
|
||||
+ ttkstub${TCL_TCLSH_VERSION}
|
||||
+ ttkstub${TK_WISH_VERSION}
|
||||
+ ttkstub88
|
||||
+ ttkstub8.8
|
||||
+ ttkstub87
|
||||
+ ttkstub8.7
|
||||
+ ttkstub86
|
||||
+ ttkstub8.6
|
||||
+ ttkstub85
|
||||
+ ttkstub8.5
|
||||
+ )
|
||||
+
|
||||
+ if(NOT TTK_STUB_LIBRARY)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_library(
|
||||
+ TTK_STUB_LIBRARY
|
||||
+ NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
|
||||
+ NAMES_PER_DIR
|
||||
+ ${${search}}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ if(NOT TTK_STUB_LIBRARY)
|
||||
+ find_library(TTK_STUB_LIBRARY NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
|
||||
+ endif()
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+set(
|
||||
+ TCLTK_POSSIBLE_INCLUDE_PATHS
|
||||
+ "${TCL_LIBRARY_PATH_PARENT}/include"
|
||||
+ "${TCL_INCLUDE_PATH}"
|
||||
+ "${TCL_TCLSH_PATH_PARENT}/include"
|
||||
+)
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_INCLUDE_PATHS
|
||||
+ ${TCLTK_POSSIBLE_INCLUDE_PATHS}
|
||||
+ "${TCL_LIBRARY_PATH_PARENT}/include"
|
||||
+ "${TCL_INCLUDE_PATH}"
|
||||
+ "${TCL_TCLSH_PATH_PARENT}/include"
|
||||
+ )
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+set(
|
||||
+ TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
|
||||
+ include
|
||||
+ include/tcl${TCL_LIBRARY_VERSION}
|
||||
+ include/tcl8.7
|
||||
+ include/tcl8.6
|
||||
+ include/tcl8.5
|
||||
+ include/tcl8.4
|
||||
+ include/tcl8.3
|
||||
+ include/tcl8.2
|
||||
+ include/tcl8.0
|
||||
+)
|
||||
+
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(
|
||||
+ TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
|
||||
+ ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
|
||||
+ include/tcl${TK_LIBRARY_VERSION}
|
||||
+ include/tk8.7
|
||||
+ include/tk8.6
|
||||
+ include/tk8.5
|
||||
+ include/tk8.4
|
||||
+ )
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+foreach(search ${_TCL_SEARCHES})
|
||||
+ find_path(TCL_INCLUDE_PATH NAMES tcl.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
|
||||
+endforeach()
|
||||
+if(NOT TCL_INCLUDE_PATH)
|
||||
+ find_path(
|
||||
+ TCL_INCLUDE_PATH
|
||||
+ NAMES tcl.h
|
||||
+ HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ foreach(search ${_TCL_SEARCHES})
|
||||
+ find_path(TK_INCLUDE_PATH NAMES tk.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
|
||||
+ endforeach()
|
||||
+ if(NOT TK_INCLUDE_PATH)
|
||||
+ find_path(
|
||||
+ TK_INCLUDE_PATH
|
||||
+ NAMES tk.h
|
||||
+ HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
|
||||
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
|
||||
+ )
|
||||
+ endif()
|
||||
+
|
||||
+ # IFF we have TCL_TK_SYSTEM_GRAPHICS set and have a system TK_WISH, check that the
|
||||
+ # windowing system matches the specified type
|
||||
+ if(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
|
||||
+ set(
|
||||
+ tkwin_script
|
||||
+ "
|
||||
+ set filename \"${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM\"
|
||||
+ set fileId [open $filename \"w\"]
|
||||
+ set windowingsystem [tk windowingsystem]
|
||||
+ puts $fileId $windowingsystem
|
||||
+ close $fileId
|
||||
+ exit
|
||||
+ "
|
||||
+ )
|
||||
+ set(tkwin_scriptfile "${CMAKE_BINARY_DIR}/CMakeTmp/tk_windowingsystem.tcl")
|
||||
+ set(WSYS "wm-NOTFOUND")
|
||||
+ file(WRITE ${tkwin_scriptfile} ${tkwin_script})
|
||||
+ execute_process(COMMAND ${TK_WISH} ${tkwin_scriptfile} OUTPUT_VARIABLE EXECOUTPUT)
|
||||
+ if(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
|
||||
+ file(READ "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM" readresultvar)
|
||||
+ string(REGEX REPLACE "\n" "" WSYS "${readresultvar}")
|
||||
+ endif(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
|
||||
+
|
||||
+ # If we have no information about the windowing system or it does not match
|
||||
+ # a specified system, the find_package detection has failed
|
||||
+ if(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
|
||||
+ unset(TCL_LIBRARY CACHE)
|
||||
+ unset(TCL_STUB_LIBRARY CACHE)
|
||||
+ unset(TK_LIBRARY CACHE)
|
||||
+ unset(TK_STUB_LIBRARY CACHE)
|
||||
+ unset(TCL_FOUND CACHE)
|
||||
+ unset(TK_FOUND CACHE)
|
||||
+ unset(TCLTK_FOUND CACHE)
|
||||
+ unset(TCLSH_FOUND CACHE)
|
||||
+ unset(TCL_LIBRARY CACHE)
|
||||
+ unset(TCL_INCLUDE_PATH CACHE)
|
||||
+ unset(TCL_TCLSH CACHE)
|
||||
+ unset(TK_LIBRARY CACHE)
|
||||
+ unset(TK_INCLUDE_PATH CACHE)
|
||||
+ unset(TK_WISH CACHE)
|
||||
+ unset(TCL_STUB_LIBRARY CACHE)
|
||||
+ unset(TK_STUB_LIBRARY CACHE)
|
||||
+ unset(TTK_STUB_LIBRARY CACHE)
|
||||
+ endif(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
|
||||
+ endif(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+
|
||||
+find_package_handle_standard_args(
|
||||
+ TCL
|
||||
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
|
||||
+ VERSION_VAR TCLSH_VERSION_STRING
|
||||
+)
|
||||
+
|
||||
+if(TCL_ENABLE_TK)
|
||||
+ set(FPHSA_NAME_MISMATCHED 1)
|
||||
+ set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
|
||||
+ set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
|
||||
+ find_package_handle_standard_args(
|
||||
+ TCLTK
|
||||
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH
|
||||
+ )
|
||||
+ set(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
|
||||
+ set(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
|
||||
+ find_package_handle_standard_args(TK REQUIRED_VARS TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
|
||||
+ unset(FPHSA_NAME_MISMATCHED)
|
||||
+endif(TCL_ENABLE_TK)
|
||||
+
|
||||
+mark_as_advanced(
|
||||
+ TCL_INCLUDE_PATH
|
||||
+ TCL_LIBRARY
|
||||
+ TCL_STUB_LIBRARY
|
||||
+ TCL_TCLSH
|
||||
+ TK_INCLUDE_PATH
|
||||
+ TK_LIBRARY
|
||||
+ TK_STUB_LIBRARY
|
||||
+ TK_WISH
|
||||
+ TTK_STUB_LIBRARY
|
||||
+)
|
||||
+
|
||||
+# Local Variables:
|
||||
+# tab-width: 8
|
||||
+# mode: cmake
|
||||
+# indent-tabs-mode: t
|
||||
+# End:
|
||||
+# ex: shiftwidth=2 tabstop=8
|
||||
diff -Naur itcl/CMakeLists.txt ITCL_BLD/CMakeLists.txt
|
||||
--- itcl/CMakeLists.txt 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ ITCL_BLD/CMakeLists.txt 2024-08-06 13:14:14.013768111 -0400
|
||||
@@ -0,0 +1,223 @@
|
||||
+# C M A K E L I S T S . T X T
|
||||
+# ITCL
|
||||
+#
|
||||
+# Copyright (c) 2010 United States Government as represented by
|
||||
+# the U.S. Army Research Laboratory.
|
||||
+#
|
||||
+# Redistribution and use in source and binary forms, with or without
|
||||
+# modification, are permitted provided that the following conditions
|
||||
+# are met:
|
||||
+#
|
||||
+# 1. Redistributions of source code must retain the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer.
|
||||
+#
|
||||
+# 2. Redistributions in binary form must reproduce the above
|
||||
+# copyright notice, this list of conditions and the following
|
||||
+# disclaimer in the documentation and/or other materials provided
|
||||
+# with the distribution.
|
||||
+#
|
||||
+# 3. The name of the author may not be used to endorse or promote
|
||||
+# products derived from this software without specific prior written
|
||||
+# permission.
|
||||
+#
|
||||
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+
|
||||
+# *******************************************************************
|
||||
+# *** ITCL CMakeLists.txt ***
|
||||
+# *******************************************************************
|
||||
+
|
||||
+# Minimum required version of CMake
|
||||
+cmake_minimum_required(VERSION 3.18)
|
||||
+
|
||||
+# set CMake project name
|
||||
+project(ITCL)
|
||||
+
|
||||
+# install(CODE) uses generator expressions - requires 3.14 or newer.
|
||||
+# We want it to be on, but until we can bump our minimum requirement
|
||||
+# set it to OLD to make sure we don't break anything.
|
||||
+if (POLICY CMP0087)
|
||||
+ cmake_policy(SET CMP0087 OLD)
|
||||
+endif (POLICY CMP0087)
|
||||
+
|
||||
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
|
||||
+
|
||||
+set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
+find_package(TCL)
|
||||
+
|
||||
+# version numbers
|
||||
+set(ITCL_VERSION_MAJOR 3)
|
||||
+set(ITCL_VERSION_MINOR 4)
|
||||
+set(ITCL_PATCH_LEVEL 3)
|
||||
+
|
||||
+set(ITCL_VERSION "${ITCL_VERSION_MAJOR}.${ITCL_VERSION_MINOR}")
|
||||
+
|
||||
+#---------------------------------------------------------------------
|
||||
+# Initialize some relative variable names
|
||||
+if(NOT BIN_DIR)
|
||||
+ if (WIN32)
|
||||
+ set(BIN_DIR lib)
|
||||
+ else (WIN32)
|
||||
+ set(BIN_DIR bin)
|
||||
+ endif (WIN32)
|
||||
+endif(NOT BIN_DIR)
|
||||
+if(NOT SHARED_DIR)
|
||||
+ set(SHARED_DIR lib)
|
||||
+endif(NOT SHARED_DIR)
|
||||
+if(NOT LIB_DIR)
|
||||
+ set(LIB_DIR lib)
|
||||
+endif(NOT LIB_DIR)
|
||||
+if(NOT INCLUDE_DIR)
|
||||
+ set(INCLUDE_DIR include)
|
||||
+endif(NOT INCLUDE_DIR)
|
||||
+
|
||||
+#----------------------------------------------------------------------------
|
||||
+# First, get some standard options out of the way
|
||||
+add_definitions(-DSTDC_HEADERS=1)
|
||||
+
|
||||
+# We're building Itcl
|
||||
+add_definitions(-DBUILD_itcl)
|
||||
+
|
||||
+# Use fPIC if we have it
|
||||
+include(CheckCCompilerFlag)
|
||||
+check_c_compiler_flag(-fPIC HAVE_PIC_COMPILER_FLAG)
|
||||
+if(HAVE_PIC_COMPILER_FLAG)
|
||||
+ add_definitions(-fPIC)
|
||||
+endif(HAVE_PIC_COMPILER_FLAG)
|
||||
+
|
||||
+#--------------------------------------------------------------------
|
||||
+# Header checks.
|
||||
+#--------------------------------------------------------------------
|
||||
+
|
||||
+include(CMakeParseArguments)
|
||||
+include(CheckIncludeFiles)
|
||||
+include(CheckCSourceCompiles)
|
||||
+function(Tcl_Check_Include_File filename)
|
||||
+ cmake_parse_arguments(OPT "USE" "" "" ${ARGN})
|
||||
+ string(REPLACE "." "_" var "${filename}")
|
||||
+ string(REPLACE "/" "_" var "${var}")
|
||||
+ string(TOUPPER "${var}" var)
|
||||
+ check_include_files(${filename} HAVE_${var})
|
||||
+ if(HAVE_${var})
|
||||
+ set(CVAR HAVE_${var})
|
||||
+ if(OPT_USE)
|
||||
+ # Usability test requested - we're not done yet.
|
||||
+ check_c_source_compiles("#include <${filename}>\nint main() {return 0;}" ${var}_USABLE)
|
||||
+ if(${var}_USABLE)
|
||||
+ set(HAVE_${var} 1 PARENT_SCOPE)
|
||||
+ set(${CVAR} 1 PARENT_SCOPE)
|
||||
+ add_definitions(-D${CVAR}=1)
|
||||
+ endif(${var}_USABLE)
|
||||
+ else(OPT_USE)
|
||||
+ set(HAVE_${var} 1 PARENT_SCOPE)
|
||||
+ set(${CVAR} 1 PARENT_SCOPE)
|
||||
+ add_definitions(-D${CVAR}=1)
|
||||
+ endif(OPT_USE)
|
||||
+ endif(HAVE_${var})
|
||||
+endfunction(Tcl_Check_Include_File)
|
||||
+
|
||||
+Tcl_Check_Include_File(sys/types.h)
|
||||
+Tcl_Check_Include_File(sys/stat.h)
|
||||
+Tcl_Check_Include_File(stdlib.h)
|
||||
+Tcl_Check_Include_File(string.h)
|
||||
+Tcl_Check_Include_File(strings.h)
|
||||
+Tcl_Check_Include_File(memory.h)
|
||||
+Tcl_Check_Include_File(inttypes.h)
|
||||
+Tcl_Check_Include_File(stdint.h)
|
||||
+Tcl_Check_Include_File(unistd.h)
|
||||
+Tcl_Check_Include_File(net/errno.h)
|
||||
+Tcl_Check_Include_File(dirent.h)
|
||||
+Tcl_Check_Include_File(errno.h USE)
|
||||
+Tcl_Check_Include_File(float.h USE)
|
||||
+Tcl_Check_Include_File(values.h USE)
|
||||
+Tcl_Check_Include_File(limits.h USE)
|
||||
+Tcl_Check_Include_File(sys/wait.h USE)
|
||||
+Tcl_Check_Include_File(dlfcn.h USE)
|
||||
+Tcl_Check_Include_File(sys/param.h USE)
|
||||
+
|
||||
+set(ITCL_SRCS
|
||||
+ generic/itclStubInit.c
|
||||
+ generic/itclStubLib.c
|
||||
+ generic/itcl_bicmds.c
|
||||
+ generic/itcl_class.c
|
||||
+ generic/itcl_cmds.c
|
||||
+ generic/itcl_ensemble.c
|
||||
+ generic/itcl_linkage.c
|
||||
+ generic/itcl_methods.c
|
||||
+ generic/itcl_migrate.c
|
||||
+ generic/itcl_objects.c
|
||||
+ generic/itcl_parse.c
|
||||
+ generic/itcl_util.c
|
||||
+ )
|
||||
+
|
||||
+if(WIN32)
|
||||
+ set(ITCL_SRCS ${ITCL_SRCS} win/dllEntryPoint.c)
|
||||
+endif(WIN32)
|
||||
+
|
||||
+set(ITCL_STUB_SRCS generic/itclStubLib.c)
|
||||
+
|
||||
+set(ITCL_INCLUDE_PATH ${ITCL_SOURCE_DIR}/generic ${ITCL_BINARY_DIR}/include)
|
||||
+mark_as_advanced(ITCL_INCLUDE_PATH)
|
||||
+
|
||||
+# ITcl requires private Tcl headers, which we can't always assume from a system
|
||||
+# install of Tcl. Require the build to tell us where to look
|
||||
+if (NOT DEFINED TCL_PRIVATE_HDRS)
|
||||
+ message(FATAL_ERROR "Itcl3 needs to know where to find the Tcl private headers")
|
||||
+endif (NOT DEFINED TCL_PRIVATE_HDRS)
|
||||
+
|
||||
+include_directories(
|
||||
+ ${TCL_INCLUDE_PATH}
|
||||
+ ${ITCL_INCLUDE_PATH}
|
||||
+ ${TCL_PRIVATE_HDRS};${TCL_PRIVATE_HDRS_OS}
|
||||
+ )
|
||||
+
|
||||
+add_library(itcl${ITCL_VERSION} SHARED ${ITCL_SRCS})
|
||||
+target_link_libraries(itcl${ITCL_VERSION} ${M_LIBRARY} ${TCL_STUB_LIBRARY} )
|
||||
+set_property(TARGET itcl${ITCL_VERSION} APPEND PROPERTY COMPILE_DEFINITIONS USE_TCL_STUBS)
|
||||
+install(TARGETS itcl${ITCL_VERSION}
|
||||
+ RUNTIME DESTINATION ${BIN_DIR}/itcl${ITCL_VERSION}
|
||||
+ LIBRARY DESTINATION ${SHARED_DIR}/itcl${ITCL_VERSION}
|
||||
+ ARCHIVE DESTINATION ${LIB_DIR}/itcl${ITCL_VERSION})
|
||||
+
|
||||
+add_library(itclstub STATIC ${ITCL_STUB_SRCS})
|
||||
+install(TARGETS itclstub
|
||||
+ RUNTIME DESTINATION ${BIN_DIR}/itcl${ITCL_VERSION}
|
||||
+ LIBRARY DESTINATION ${LIB_DIR}/itcl${ITCL_VERSION}
|
||||
+ ARCHIVE DESTINATION ${LIB_DIR}/itcl${ITCL_VERSION})
|
||||
+set_property(TARGET itclstub APPEND PROPERTY COMPILE_DEFINITIONS USE_TCL_STUBS)
|
||||
+
|
||||
+# Create pkgIndex.tcl files
|
||||
+file(GENERATE
|
||||
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl"
|
||||
+ CONTENT "
|
||||
+if {![package vsatisfies [package provide Tcl] 8.5]} {return}
|
||||
+package ifneeded Itcl ${ITCL_VERSION} [list load [file join $dir ../../${SHARED_DIR}/itcl${ITCL_VERSION} $<TARGET_FILE_NAME:itcl${ITCL_VERSION}>] Itcl]
|
||||
+")
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl DESTINATION ${LIB_DIR}/itcl${ITCL_VERSION})
|
||||
+
|
||||
+install(FILES library/itcl.tcl DESTINATION ${LIB_DIR}/itcl${ITCL_VERSION})
|
||||
+
|
||||
+set(ITCL_HDRS
|
||||
+ generic/itcl.h
|
||||
+ generic/itclDecls.h
|
||||
+ generic/itclInt.h
|
||||
+ generic/itclIntDecls.h
|
||||
+ )
|
||||
+install(FILES ${ITCL_HDRS} DESTINATION ${INCLUDE_DIR})
|
||||
+
|
||||
+# Local Variables:
|
||||
+# tab-width: 8
|
||||
+# mode: cmake
|
||||
+# indent-tabs-mode: t
|
||||
+# End:
|
||||
+# ex: shiftwidth=2 tabstop=8
|
||||
+
|
||||
diff -Naur itcl/generic/itcl_cmds.c ITCL_BLD/generic/itcl_cmds.c
|
||||
--- itcl/generic/itcl_cmds.c 2024-08-06 13:13:08.429776852 -0400
|
||||
+++ ITCL_BLD/generic/itcl_cmds.c 2024-08-06 13:12:35.230286310 -0400
|
||||
@@ -53,9 +53,6 @@
|
||||
if {[info exists library]} {\n\
|
||||
lappend dirs $library\n\
|
||||
} else {\n\
|
||||
- if {[catch {uplevel #0 source -rsrc itcl}] == 0} {\n\
|
||||
- return\n\
|
||||
- }\n\
|
||||
set dirs {}\n\
|
||||
if {[info exists env(ITCL_LIBRARY)]} {\n\
|
||||
lappend dirs $env(ITCL_LIBRARY)\n\
|
||||
@@ -866,7 +863,7 @@
|
||||
int objc; /* number of arguments */
|
||||
Tcl_Obj *CONST objv[]; /* argument objects */
|
||||
{
|
||||
- int pLevel = (int)clientData;
|
||||
+ int pLevel = (int)(size_t)clientData;
|
||||
|
||||
int result;
|
||||
int oldLevel;
|
||||
@@ -1145,7 +1142,7 @@
|
||||
if (!entry) {
|
||||
Tcl_AppendResult(interp,
|
||||
"can't scope variable \"", token,
|
||||
- "\": missing object context\"",
|
||||
+ "\": missing object context",
|
||||
(char*)NULL);
|
||||
result = TCL_ERROR;
|
||||
goto scopeCmdDone;
|
||||
diff -Naur itcl/generic/itclInt.decls ITCL_BLD/generic/itclInt.decls
|
||||
--- itcl/generic/itclInt.decls 2024-08-06 13:13:08.429776852 -0400
|
||||
+++ ITCL_BLD/generic/itclInt.decls 2024-08-06 13:12:35.230286310 -0400
|
||||
@@ -252,7 +252,7 @@
|
||||
CONST char* arglist, CONST char* body, ItclMemberCode** mcodePtr)
|
||||
}
|
||||
declare 58 generic {
|
||||
- void Itcl_DeleteMemberCode (CONST char* cdata)
|
||||
+ void Itcl_DeleteMemberCode (char* cdata)
|
||||
}
|
||||
declare 59 generic {
|
||||
int Itcl_GetMemberCode (Tcl_Interp* interp, ItclMember* member)
|
||||
diff -Naur itcl/generic/itclIntDecls.h ITCL_BLD/generic/itclIntDecls.h
|
||||
--- itcl/generic/itclIntDecls.h 2024-08-06 13:13:08.429776852 -0400
|
||||
+++ ITCL_BLD/generic/itclIntDecls.h 2024-08-06 13:12:35.230286310 -0400
|
||||
@@ -410,7 +410,7 @@
|
||||
#ifndef Itcl_DeleteMemberCode_TCL_DECLARED
|
||||
#define Itcl_DeleteMemberCode_TCL_DECLARED
|
||||
/* 58 */
|
||||
-TCL_EXTERN(void) Itcl_DeleteMemberCode _ANSI_ARGS_((CONST char* cdata));
|
||||
+TCL_EXTERN(void) Itcl_DeleteMemberCode _ANSI_ARGS_((char* cdata));
|
||||
#endif
|
||||
#ifndef Itcl_GetMemberCode_TCL_DECLARED
|
||||
#define Itcl_GetMemberCode_TCL_DECLARED
|
||||
@@ -853,7 +853,7 @@
|
||||
int (*itcl_ChangeMemberFunc) _ANSI_ARGS_((Tcl_Interp* interp, ItclMemberFunc* mfunc, CONST char* arglist, CONST char* body)); /* 55 */
|
||||
void (*itcl_DeleteMemberFunc) _ANSI_ARGS_((CONST char* cdata)); /* 56 */
|
||||
int (*itcl_CreateMemberCode) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* arglist, CONST char* body, ItclMemberCode** mcodePtr)); /* 57 */
|
||||
- void (*itcl_DeleteMemberCode) _ANSI_ARGS_((CONST char* cdata)); /* 58 */
|
||||
+ void (*itcl_DeleteMemberCode) _ANSI_ARGS_((char* cdata)); /* 58 */
|
||||
int (*itcl_GetMemberCode) _ANSI_ARGS_((Tcl_Interp* interp, ItclMember* member)); /* 59 */
|
||||
void *reserved60;
|
||||
int (*itcl_EvalMemberCode) _ANSI_ARGS_((Tcl_Interp * interp, ItclMemberFunc * mfunc, ItclMember * member, ItclObject * contextObj, int objc, Tcl_Obj *CONST objv[])); /* 61 */
|
||||
diff -Naur itcl/generic/itcl_methods.c ITCL_BLD/generic/itcl_methods.c
|
||||
--- itcl/generic/itcl_methods.c 2024-08-06 13:13:08.429776852 -0400
|
||||
+++ ITCL_BLD/generic/itcl_methods.c 2024-08-06 13:12:35.230286310 -0400
|
||||
@@ -731,8 +731,7 @@
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
-Itcl_DeleteMemberCode(cdata)
|
||||
- CONST char* cdata; /* pointer to member function definition */
|
||||
+Itcl_DeleteMemberCode(char *cdata)
|
||||
{
|
||||
ItclMemberCode* mcode = (ItclMemberCode*)cdata;
|
||||
|
||||
@@ -1156,7 +1155,7 @@
|
||||
nameLen = strlen(name);
|
||||
|
||||
localPtr = (CompiledLocal*)ckalloc(
|
||||
- (unsigned)(sizeof(CompiledLocal)-sizeof(localPtr->name) + nameLen+1)
|
||||
+ TclOffset(CompiledLocal, name) + nameLen+1
|
||||
);
|
||||
|
||||
localPtr->nextPtr = NULL;
|
||||
diff -Naur itcl/win/itcl.rc ITCL_BLD/win/itcl.rc
|
||||
--- itcl/win/itcl.rc 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ ITCL_BLD/win/itcl.rc 2024-08-06 13:12:35.230286310 -0400
|
||||
@@ -0,0 +1,55 @@
|
||||
+//
|
||||
+// Version resource script.
|
||||
+//
|
||||
+
|
||||
+#include <winver.h>
|
||||
+#include <itcl.h>
|
||||
+
|
||||
+//
|
||||
+// build-up the name suffix that defines the type of build this is.
|
||||
+//
|
||||
+#if DEBUG && !UNCHECKED
|
||||
+#define SUFFIX_DEBUG "g"
|
||||
+#else
|
||||
+#define SUFFIX_DEBUG ""
|
||||
+#endif
|
||||
+
|
||||
+#define SUFFIX SUFFIX_DEBUG
|
||||
+
|
||||
+
|
||||
+VS_VERSION_INFO VERSIONINFO
|
||||
+ FILEVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
|
||||
+ PRODUCTVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
|
||||
+ FILEFLAGSMASK 0x3fL
|
||||
+#ifdef DEBUG
|
||||
+ FILEFLAGS VS_FF_DEBUG
|
||||
+#else
|
||||
+ FILEFLAGS 0x0L
|
||||
+#endif
|
||||
+ FILEOS VOS__WINDOWS32
|
||||
+ FILETYPE VFT_DLL
|
||||
+ FILESUBTYPE 0x0L
|
||||
+BEGIN
|
||||
+ BLOCK "StringFileInfo"
|
||||
+ BEGIN
|
||||
+ BLOCK "040904b0"
|
||||
+ BEGIN
|
||||
+ VALUE "FileDescription", "Itcl language extension for Tcl\0"
|
||||
+ VALUE "Authors", "Michael McLennan\0"
|
||||
+ VALUE "OriginalFilename", "itcl" STRINGIFY(ITCL_MAJOR_VERSION) STRINGIFY(ITCL_MINOR_VERSION) SUFFIX ".dll\0"
|
||||
+ VALUE "CompanyName", "Bell Labs Innovations for Lucent Technologies\0"
|
||||
+ VALUE "FileVersion", ITCL_PATCH_LEVEL
|
||||
+ VALUE "LegalCopyright", "Copyright \251 1993-2004\0"
|
||||
+ VALUE "ProductName", "[Incr Tcl] " ITCL_VERSION " for Windows\0"
|
||||
+ VALUE "ProductVersion", ITCL_PATCH_LEVEL
|
||||
+ END
|
||||
+ END
|
||||
+ BLOCK "VarFileInfo"
|
||||
+ BEGIN
|
||||
+ VALUE "Translation", 0x409, 1200
|
||||
+ END
|
||||
+END
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
File diff suppressed because it is too large
Load Diff
+85
-69
@@ -1,103 +1,119 @@
|
||||
# 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 uses private Tcl and Itcl interfaces plus Tk stubs. Build it only as
|
||||
# part of bext's internally consistent Tcl/Tk stack; system Tcl/Tk must supply
|
||||
# Itk.
|
||||
|
||||
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)
|
||||
|
||||
if (ENABLE_ITCL AND NOT DEFINED ENABLE_ITK AND NOT DISABLE_TCL)
|
||||
set(ENABLE_ITK ON)
|
||||
endif (ENABLE_ITCL AND NOT DEFINED ENABLE_ITK AND NOT DISABLE_TCL)
|
||||
bext_enable_all_default(ITK itk)
|
||||
|
||||
endif (USE_BRLCAD)
|
||||
|
||||
if (NOT ENABLE_ITK AND NOT DISABLE_ITCL AND NOT DISABLE_TCL)
|
||||
find_library(ITK_SYS_LIBRARY NAMES itk3)
|
||||
|
||||
if (NOT ITK_SYS_LIBRARY AND NOT DEFINED ENABLE_ITK)
|
||||
set(ENABLE_ITK "ON" CACHE BOOL "Enable itk build")
|
||||
endif (NOT ITK_SYS_LIBRARY AND NOT DEFINED ENABLE_ITK)
|
||||
|
||||
endif (NOT ENABLE_ITK AND NOT DISABLE_ITCL AND NOT DISABLE_TCL)
|
||||
if (TARGET TK_BLD AND NOT DEFINED ENABLE_ITK AND NOT DISABLE_ITK)
|
||||
set(ENABLE_ITK ON)
|
||||
endif ()
|
||||
set(ENABLE_ITK "${ENABLE_ITK}" CACHE BOOL "Enable itk build")
|
||||
|
||||
if (ENABLE_ITK)
|
||||
|
||||
git_submodule_init(itk configure.in)
|
||||
if (NOT TARGET TCL_BLD OR NOT TARGET TK_BLD)
|
||||
message(FATAL_ERROR
|
||||
"A local Itk build requires bext's bundled Tcl and Tk because Itk uses "
|
||||
"private Tcl and Itcl interfaces. A system Tcl/Tk stack must provide "
|
||||
"Itk ${BEXT_ITK_MIN_VERSION} or newer; otherwise configure with "
|
||||
"-DENABLE_TCL=ON."
|
||||
)
|
||||
endif ()
|
||||
|
||||
git_submodule_init(itk configure)
|
||||
|
||||
RegisterDeps(ITK)
|
||||
|
||||
# If we're building ITK, it's path setup must take into account the
|
||||
# subdirectory in which we are storing the library.
|
||||
set(RPATH_SUFFIX itk3.4)
|
||||
set(BEXT_ITK_VERSION "${BEXT_ITK_BUNDLED_VERSION}" CACHE INTERNAL "Bundled Itk version" FORCE)
|
||||
set(RPATH_SUFFIX "itk${BEXT_ITK_BUNDLED_VERSION}")
|
||||
set(ITK_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/ITK_BLD-prefix/src/ITK_BLD")
|
||||
set(ITK_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}/ITK_BLD-prefix/src/ITK_BLD-build")
|
||||
|
||||
ExternalProject_Add(ITK_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/itk"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/itk.patch
|
||||
CMAKE_ARGS
|
||||
${BUILD_TYPE_SPECIFIER}
|
||||
-DBIN_DIR=$<IF:$<BOOL:${WIN32}>,${LIB_DIR},${BIN_DIR}>
|
||||
-DLIB_DIR=${LIB_DIR}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-DCMAKE_INSTALL_RPATH=${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}/${RPATH_SUFFIX}
|
||||
-DINCLUDE_DIR=${INCLUDE_DIR}
|
||||
-DITCL_ROOT=$<$<BOOL:${ITCL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DSHARED_DIR=${LIB_DIR}
|
||||
-DTCL_ENABLE_TK=ON
|
||||
-DTCL_ROOT=$<$<BOOL:${TCL_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
|
||||
-DTCL_SOURCE_DIR=${CMAKE_SOURCE_DIR}/tcl/tcl
|
||||
-DTK_SOURCE_DIR=${CMAKE_SOURCE_DIR}/tk/tk
|
||||
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
|
||||
set(WITH_TCL_DIR "${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}")
|
||||
set(WITH_TCL_INCLUDE_DIR "${CMAKE_BUNDLE_INSTALL_PREFIX}/${INCLUDE_DIR}")
|
||||
set(TCL_SRC_DIR "${CMAKE_BINARY_DIR}/tcl/TCL_BLD-prefix/src/TCL_BLD")
|
||||
set(WITH_TK_DIR "${CMAKE_BUNDLE_INSTALL_PREFIX}/${LIB_DIR}")
|
||||
set(WITH_TK_INCLUDE_DIR "${CMAKE_BUNDLE_INSTALL_PREFIX}/${INCLUDE_DIR}")
|
||||
set(TK_SRC_DIR "${CMAKE_BINARY_DIR}/tk/TK_BLD-prefix/src/TK_BLD")
|
||||
set(WITH_ITCL_DIR "${BEXT_ITCL_CONFIG_DIR}")
|
||||
set(ITCL_SRC_DIR "${BEXT_ITCL_SOURCE_DIR}")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/itk_configure.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/itk_configure.cmake @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/itk_build.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/itk_build.cmake @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/itk_install.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/itk_install.cmake @ONLY)
|
||||
|
||||
set(ITK_PATCH_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
"-DITK_SOURCE_DIR=<SOURCE_DIR>"
|
||||
"-DITK_PATCH_EXECUTABLE=${PATCH_NATIVE_EXECUTABLE}"
|
||||
"-DITK_PATCH_CHECK_OPTION=${PATCH_CHECK_OPTION}"
|
||||
"-DITK_PATCH_REJECT_DIR=${PATCH_REJECT_DIR}"
|
||||
"-DITK_PATCH_FILE=${CMAKE_CURRENT_SOURCE_DIR}/itk.patch"
|
||||
"-DITK_INSTALL_PATCH_FILE=${CMAKE_CURRENT_SOURCE_DIR}/itk_install.patch"
|
||||
-P "${CMAKE_CURRENT_SOURCE_DIR}/itk_apply_patch.cmake"
|
||||
)
|
||||
|
||||
if (NOT MSVC)
|
||||
ExternalProject_Add(ITK_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/itk"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${ITK_PATCH_COMMAND}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/manifest.uuid <SOURCE_DIR>/manifest.uuid
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>/tclconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BEXT_ITCL_BUNDLED_SOURCE_DIR}/tclconfig/install-sh <SOURCE_DIR>/tclconfig/install-sh
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/itk_configure.cmake
|
||||
BUILD_COMMAND ${BEXT_MAKE_COMMAND} -j${pcnt}
|
||||
INSTALL_COMMAND ${BEXT_MAKE_COMMAND} -j1 INSTALL_OPTIONS=-C install
|
||||
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
|
||||
)
|
||||
else (NOT MSVC)
|
||||
# Itk's rules.vc is newer than Tcl 8.6's, so rules-ext.vc selects the
|
||||
# local nmake support files. Upstream omits the matching targets.vc;
|
||||
# supply the complete file rather than patching one into existence.
|
||||
ExternalProject_Add(ITK_BLD
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/itk"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${ITK_PATCH_COMMAND}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/manifest.uuid <SOURCE_DIR>/manifest.uuid
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/targets.vc <SOURCE_DIR>/win/targets.vc
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>/tclconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BEXT_ITCL_BUNDLED_SOURCE_DIR}/tclconfig/install-sh <SOURCE_DIR>/tclconfig/install-sh
|
||||
CONFIGURE_COMMAND ""
|
||||
BINARY_DIR ${ITK_SRC_DIR}/win
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/itk_build.cmake
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/itk_install.cmake
|
||||
LOG_BUILD ${EXT_BUILD_QUIET}
|
||||
LOG_INSTALL ${EXT_BUILD_QUIET}
|
||||
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
|
||||
STEP_TARGETS install
|
||||
)
|
||||
endif (NOT MSVC)
|
||||
|
||||
TargetInstallDeps(ITK ITK_DEPENDS)
|
||||
|
||||
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/itk/license.terms
|
||||
${DOC_LICENSE_DIR}/itk3.txt
|
||||
${DOC_LICENSE_DIR}/itk.txt
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
endif (ENABLE_ITK)
|
||||
|
||||
mark_as_advanced(ITK_LIBRARY)
|
||||
mark_as_advanced(ITK_LIBRARIES)
|
||||
mark_as_advanced(ITK_VERSION)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
Itk in bext
|
||||
===========
|
||||
|
||||
Tcl 8.6.18 already bundles Itcl 4.3.7, so bext deliberately has no separate
|
||||
Itcl project. Itk is not part of either source distribution, so the bundled
|
||||
stack builds Itk from its own upstream repository after Tcl and Tk. A system
|
||||
Tcl/Tk stack must already provide Itcl and Itk; bext never builds Itk against
|
||||
system Tcl/Tk.
|
||||
|
||||
Itk cannot be built from installed public headers alone. Its implementation
|
||||
includes Tcl's private tclInt.h and Itcl's private itclInt.h and directly uses
|
||||
the corresponding internal structures and entry points. The Itk build must
|
||||
therefore use the private headers and stubs from the exact Tcl/Itcl sources it
|
||||
accompanies. Bext supplies the standard install-sh helper omitted from the Itk
|
||||
repository. On Windows, explicit Tcl, Tk, and Itcl source directories are
|
||||
passed to nmake. On Unix-like platforms, upstream's generated TEA configure
|
||||
logic gets the corresponding source locations from the bundled configuration.
|
||||
|
||||
Upstream's generic Windows TEA install target copies only ``*.tcl`` library
|
||||
files. Itk also needs its ``*.itk`` class definitions and ``tclIndex`` at
|
||||
runtime, so bext extends the nmake install target to copy them and verifies the
|
||||
complete script set before accepting the install.
|
||||
|
||||
Itk itself makes no direct Xlib calls: all of its window-system interaction
|
||||
goes through Tk stubs. Upstream's TEA configuration nevertheless adds the
|
||||
host X library to Itk. Bext suppresses that unnecessary dependency so Itk
|
||||
uses the X implementation selected by its matching Tk build and does not mix
|
||||
two incompatible X ABIs in builds such as the Xmin test configuration.
|
||||
|
||||
Itk's own nominal Itcl 4.1 requirement is not sufficient: its upstream suite
|
||||
has seven failures with Itcl 4.1.0, involving private/protected components and
|
||||
destroyed-component cleanup, while all 100 tests pass with Itcl 4.1.1. Bext
|
||||
therefore retains 4.1.1 as Itk's stub and package-index floor.
|
||||
|
||||
BRL-CAD has a stronger system-stack requirement. With Tcl/Tk 8.6.18, Itcl
|
||||
4.1.1, 4.1.2, and 4.2.3 fail the Tk-first Iwidgets baseline because they lack
|
||||
Itcl 4.3.0's workaround for Tcl 8.6.15's `Tcl_NewObjectInstance` behavior.
|
||||
The complete baseline passes with Itcl 4.3.0 and Itk 4.2.3, so bext requires
|
||||
Itcl 4.3.0 or newer before accepting a system stack.
|
||||
|
||||
System selection is all-or-nothing: Tcl must load Itcl 4.3.0 or newer, and its
|
||||
package path must advertise Itk 4.2.3 or newer before bext accepts the matching
|
||||
system Tk. Itk detection asks Tcl's package handler to index available versions
|
||||
without executing the selected package's load script, enforcing the floor on
|
||||
headless builders without trying to create a Tk window. If either extension is
|
||||
missing or too old, bext selects the complete bundled stack.
|
||||
|
||||
The bundled Itk revision reports version 4.2.7 and includes the upstream August
|
||||
2024 release plus subsequent Windows, Tcl/Tk 9, warning, and TEA maintenance.
|
||||
The complete upstream suite and BRL-CAD GUI baseline pass with the bundled
|
||||
Itcl under Xmin using the Xmin-compatible Tk build.
|
||||
+1
-1
Submodule itk/itk updated: 0d1dc9780c...e697407849
@@ -1,5 +1,4 @@
|
||||
PATCH
|
||||
TCL
|
||||
TK
|
||||
ITCL
|
||||
|
||||
|
||||
+105
-3554
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
if (NOT ITK_SOURCE_DIR OR NOT ITK_PATCH_EXECUTABLE OR
|
||||
NOT ITK_PATCH_CHECK_OPTION OR NOT ITK_PATCH_REJECT_DIR OR
|
||||
NOT ITK_PATCH_FILE OR NOT ITK_INSTALL_PATCH_FILE)
|
||||
message(FATAL_ERROR
|
||||
"Itk patching requires source, patch tool, check option, reject "
|
||||
"directory, and patch file paths")
|
||||
endif ()
|
||||
|
||||
# Upstream stores this Windows makefile with CRLF line endings. The BSD patch
|
||||
# utility used on some Unix hosts does not normalize them, so normalize the
|
||||
# staged copy before applying the cross-platform source patches.
|
||||
set(ITK_WINDOWS_MAKEFILE "${ITK_SOURCE_DIR}/win/makefile.vc")
|
||||
file(READ "${ITK_WINDOWS_MAKEFILE}" ITK_WINDOWS_MAKEFILE_CONTENTS)
|
||||
string(REPLACE "\r\n" "\n" ITK_WINDOWS_MAKEFILE_CONTENTS "${ITK_WINDOWS_MAKEFILE_CONTENTS}")
|
||||
file(WRITE "${ITK_WINDOWS_MAKEFILE}" "${ITK_WINDOWS_MAKEFILE_CONTENTS}")
|
||||
|
||||
set(ITK_PATCH_WRAPPER "${CMAKE_CURRENT_LIST_DIR}/../CMake/PatchWrapper.cmake")
|
||||
set(ITK_PATCH_FILES
|
||||
"${ITK_PATCH_FILE}"
|
||||
"${ITK_INSTALL_PATCH_FILE}"
|
||||
)
|
||||
foreach (ITK_CURRENT_PATCH_FILE IN LISTS ITK_PATCH_FILES)
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DBEXT_PATCH_NATIVE_EXECUTABLE=${ITK_PATCH_EXECUTABLE}"
|
||||
"-DBEXT_PATCH_CHECK_OPTION=${ITK_PATCH_CHECK_OPTION}"
|
||||
"-DBEXT_PATCH_REJECT_DIR=${ITK_PATCH_REJECT_DIR}"
|
||||
-P "${ITK_PATCH_WRAPPER}" -- -E -p1 -N -i "${ITK_CURRENT_PATCH_FILE}"
|
||||
WORKING_DIRECTORY "${ITK_SOURCE_DIR}"
|
||||
RESULT_VARIABLE ITK_PATCH_RESULT
|
||||
OUTPUT_VARIABLE ITK_PATCH_OUTPUT
|
||||
ERROR_VARIABLE ITK_PATCH_ERROR
|
||||
)
|
||||
|
||||
if (ITK_PATCH_RESULT)
|
||||
message(FATAL_ERROR
|
||||
"Itk source patch failed for ${ITK_CURRENT_PATCH_FILE}:\n"
|
||||
"${ITK_PATCH_OUTPUT}${ITK_PATCH_ERROR}"
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -0,0 +1,37 @@
|
||||
message("Itk build begins\n")
|
||||
|
||||
set(BUILD_SCRIPT "${CMAKE_BINARY_DIR}/build_itk.bat")
|
||||
file(WRITE "${BUILD_SCRIPT}"
|
||||
"@echo off\n"
|
||||
"set VSCMD_DEBUG=0\n"
|
||||
"set \"NoDefaultCurrentDirectoryInExePath=\"\n"
|
||||
"call \"@VCVARS_BAT@\"\n"
|
||||
"if errorlevel 1 exit /b %ERRORLEVEL%\n"
|
||||
"set \"PATH=@BEXT_MSVC_COMPILER_BIN_DIR@;%PATH%\"\n"
|
||||
"cd /D \"@ITK_SRC_DIR@/win\"\n"
|
||||
"set CC=\n"
|
||||
"set RC=\n"
|
||||
"nmake -f makefile.vc TCLDIR=@TCL_SRC_DIR@ TKDIR=@TK_SRC_DIR@ ITCLDIR=@ITCL_SRC_DIR@ INSTALLDIR=@CMAKE_BUNDLE_INSTALL_PREFIX@ SUFX=\n"
|
||||
"exit /b %ERRORLEVEL%\n"
|
||||
)
|
||||
|
||||
execute_process(
|
||||
WORKING_DIRECTORY "@ITK_SRC_DIR@/win"
|
||||
COMMAND cmd /c "${BUILD_SCRIPT}"
|
||||
RESULT_VARIABLE ITK_RET
|
||||
OUTPUT_VARIABLE CMD_OUT
|
||||
ERROR_VARIABLE CMD_OUT
|
||||
)
|
||||
|
||||
if (ITK_RET)
|
||||
message(FATAL_ERROR "Itk build failed:\n${CMD_OUT}\n")
|
||||
endif (ITK_RET)
|
||||
|
||||
message("Itk build succeeded:\n${CMD_OUT}\n")
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -0,0 +1,41 @@
|
||||
if (APPLE)
|
||||
execute_process(
|
||||
COMMAND xcrun --show-sdk-path
|
||||
OUTPUT_VARIABLE SDK_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(ENV{LDFLAGS} "-isysroot ${SDK_PATH} -L${SDK_PATH}/usr/lib -L@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@ -F${SDK_PATH}/System/Library/Frameworks -framework CoreFoundation")
|
||||
set(ENV{CFLAGS} "-isysroot ${SDK_PATH} -L${SDK_PATH}/usr/lib -L@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@ -F${SDK_PATH}/System/Library/Frameworks")
|
||||
set(ENV{CPPFLAGS} "-isystem ${SDK_PATH}/usr/include -F${SDK_PATH}/System/Library/Frameworks -I@CMAKE_BUNDLE_INSTALL_PREFIX@/@INCLUDE_DIR@")
|
||||
else ()
|
||||
set(ENV{LD_LIBRARY_PATH} "@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
|
||||
set(ENV{LDFLAGS} "-L@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@")
|
||||
set(ENV{CPPFLAGS} "-I@CMAKE_BUNDLE_INSTALL_PREFIX@/@INCLUDE_DIR@")
|
||||
endif (APPLE)
|
||||
|
||||
execute_process(
|
||||
COMMAND "@ITK_SRC_DIR@/configure"
|
||||
--prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@
|
||||
--with-tcl=@WITH_TCL_DIR@
|
||||
--with-tk=@WITH_TK_DIR@
|
||||
--with-itcl=@WITH_ITCL_DIR@
|
||||
--with-tclinclude=@WITH_TCL_INCLUDE_DIR@
|
||||
--with-tkinclude=@WITH_TK_INCLUDE_DIR@
|
||||
RESULT_VARIABLE ITK_RET
|
||||
WORKING_DIRECTORY "@ITK_BIN_DIR@"
|
||||
OUTPUT_VARIABLE MSG
|
||||
ERROR_VARIABLE MSG
|
||||
)
|
||||
|
||||
if (ITK_RET)
|
||||
message(FATAL_ERROR "Itk configure failed:\n${MSG}\n")
|
||||
endif (ITK_RET)
|
||||
|
||||
message("${MSG}\nItk configure succeeded.\n")
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -0,0 +1,62 @@
|
||||
set(INSTALL_SCRIPT "${CMAKE_BINARY_DIR}/install_itk.bat")
|
||||
file(WRITE "${INSTALL_SCRIPT}"
|
||||
"@echo off\n"
|
||||
"set VSCMD_DEBUG=0\n"
|
||||
"set \"NoDefaultCurrentDirectoryInExePath=\"\n"
|
||||
"call \"@VCVARS_BAT@\"\n"
|
||||
"if errorlevel 1 exit /b %ERRORLEVEL%\n"
|
||||
"set \"PATH=@BEXT_MSVC_COMPILER_BIN_DIR@;%PATH%\"\n"
|
||||
"cd /D \"@ITK_SRC_DIR@/win\"\n"
|
||||
"set CC=\n"
|
||||
"set RC=\n"
|
||||
"nmake -f makefile.vc install TCLDIR=@TCL_SRC_DIR@ TKDIR=@TK_SRC_DIR@ ITCLDIR=@ITCL_SRC_DIR@ INSTALLDIR=@CMAKE_BUNDLE_INSTALL_PREFIX@ SUFX=\n"
|
||||
"exit /b %ERRORLEVEL%\n"
|
||||
)
|
||||
|
||||
execute_process(
|
||||
WORKING_DIRECTORY "@ITK_SRC_DIR@/win"
|
||||
COMMAND cmd /c "${INSTALL_SCRIPT}"
|
||||
RESULT_VARIABLE ITK_RET
|
||||
OUTPUT_VARIABLE CMD_OUT
|
||||
ERROR_VARIABLE CMD_OUT
|
||||
)
|
||||
|
||||
if (ITK_RET)
|
||||
message(FATAL_ERROR "Itk install failed:\n${CMD_OUT}\n")
|
||||
endif (ITK_RET)
|
||||
|
||||
set(ITK_SCRIPT_INSTALL_DIR
|
||||
"@CMAKE_BUNDLE_INSTALL_PREFIX@/@LIB_DIR@/itk@BEXT_ITK_BUNDLED_VERSION@"
|
||||
)
|
||||
set(ITK_REQUIRED_SCRIPT_FILES
|
||||
Archetype.itk
|
||||
Toplevel.itk
|
||||
Widget.itk
|
||||
itk.tcl
|
||||
pkgIndex.tcl
|
||||
tclIndex
|
||||
)
|
||||
set(ITK_MISSING_SCRIPT_FILES)
|
||||
foreach (ITK_REQUIRED_SCRIPT_FILE ${ITK_REQUIRED_SCRIPT_FILES})
|
||||
if (NOT EXISTS "${ITK_SCRIPT_INSTALL_DIR}/${ITK_REQUIRED_SCRIPT_FILE}")
|
||||
list(APPEND ITK_MISSING_SCRIPT_FILES
|
||||
"${ITK_SCRIPT_INSTALL_DIR}/${ITK_REQUIRED_SCRIPT_FILE}"
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
if (ITK_MISSING_SCRIPT_FILES)
|
||||
list(JOIN ITK_MISSING_SCRIPT_FILES "\n " ITK_MISSING_SCRIPT_FILES_TEXT)
|
||||
message(FATAL_ERROR
|
||||
"Itk install did not produce required runtime scripts:\n"
|
||||
" ${ITK_MISSING_SCRIPT_FILES_TEXT}\n"
|
||||
)
|
||||
endif ()
|
||||
|
||||
message("Itk install succeeded:\n${CMD_OUT}\n")
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -0,0 +1,16 @@
|
||||
diff -Naur itk/win/makefile.vc ITK_BLD/win/makefile.vc
|
||||
--- itk/win/makefile.vc 2026-09-14 11:07:25.785985244 -0400
|
||||
+++ ITK_BLD/win/makefile.vc 2026-09-15 17:45:00.000000000 -0400
|
||||
@@ -130,5 +130,11 @@
|
||||
|
||||
# Additional default actions for install
|
||||
-install: default-install-docs-n
|
||||
+install: default-install-docs-n install-itk-class-library
|
||||
+
|
||||
+# The generic TEA target copies only *.tcl. Install Itk's class definitions
|
||||
+# and autoload index as well so the base classes are available at runtime.
|
||||
+install-itk-class-library: default-install-scripts
|
||||
+ @$(CPY) $(LIBDIR)\*.itk "$(SCRIPT_INSTALL_DIR)"
|
||||
+ @$(CPY) $(LIBDIR)\tclIndex "$(SCRIPT_INSTALL_DIR)"
|
||||
|
||||
# The TIP 477 generation of pkgIndex.tcl from pkgIndex.tcl.in does not include
|
||||
@@ -0,0 +1 @@
|
||||
git-e697407849b01d3498b56fc46e5a423690190954
|
||||
@@ -0,0 +1,99 @@
|
||||
#------------------------------------------------------------- -*- makefile -*-
|
||||
# targets.vc --
|
||||
#
|
||||
# Part of the nmake based build system for Tcl and its extensions.
|
||||
# This file defines some standard targets for the convenience of extensions
|
||||
# and can be optionally included by the extension makefile.
|
||||
# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs.
|
||||
|
||||
$(PROJECT): setup pkgindex $(PRJLIB)
|
||||
|
||||
!ifdef PRJ_STUBOBJS
|
||||
$(PROJECT): $(PRJSTUBLIB)
|
||||
$(PRJSTUBLIB): $(PRJ_STUBOBJS)
|
||||
$(LIBCMD) $**
|
||||
|
||||
$(PRJ_STUBOBJS):
|
||||
$(CCSTUBSCMD) %s
|
||||
!endif # PRJ_STUBOBJS
|
||||
|
||||
!ifdef PRJ_MANIFEST
|
||||
$(PROJECT): $(PRJLIB).manifest
|
||||
$(PRJLIB).manifest: $(PRJ_MANIFEST)
|
||||
@nmakehlp -s << $** >$@
|
||||
@MACHINE@ $(MACHINE:IX86=X86)
|
||||
<<
|
||||
!endif
|
||||
|
||||
!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
|
||||
$(PRJLIB): $(PRJ_OBJS) $(RESFILE)
|
||||
!if $(STATIC_BUILD)
|
||||
$(LIBCMD) $**
|
||||
!else
|
||||
$(DLLCMD) $**
|
||||
$(_VC_MANIFEST_EMBED_DLL)
|
||||
!endif
|
||||
-@del $*.exp
|
||||
!endif
|
||||
|
||||
!if "$(PRJ_HEADERS)" != "" && "$(PRJ_OBJS)" != ""
|
||||
$(PRJ_OBJS): $(PRJ_HEADERS)
|
||||
!endif
|
||||
|
||||
# If parent makefile has defined stub objects, add their installation
|
||||
# to the default install
|
||||
!if "$(PRJ_STUBOBJS)" != ""
|
||||
default-install: default-install-stubs
|
||||
!endif
|
||||
|
||||
# Unlike the other default targets, these cannot be in rules.vc because
|
||||
# the executed command depends on existence of macro PRJ_HEADERS_PUBLIC
|
||||
# that the parent makefile will not define until after including rules-ext.vc
|
||||
!if "$(PRJ_HEADERS_PUBLIC)" != ""
|
||||
default-install: default-install-headers
|
||||
default-install-headers:
|
||||
@$(ECHO) Installing headers to '$(INCLUDE_INSTALL_DIR)'
|
||||
@if not exist "$(INCLUDE_INSTALL_DIR)" $(MKDIR) "$(INCLUDE_INSTALL_DIR)"
|
||||
@for %f in ($(PRJ_HEADERS_PUBLIC)) do @$(COPY) %f "$(INCLUDE_INSTALL_DIR)"
|
||||
!endif
|
||||
|
||||
!if "$(DISABLE_STANDARD_TARGETS)" == ""
|
||||
DISABLE_STANDARD_TARGETS = 0
|
||||
!endif
|
||||
|
||||
!if "$(DISABLE_TARGET_setup)" == ""
|
||||
DISABLE_TARGET_setup = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_install)" == ""
|
||||
DISABLE_TARGET_install = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_clean)" == ""
|
||||
DISABLE_TARGET_clean = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_test)" == ""
|
||||
DISABLE_TARGET_test = 0
|
||||
!endif
|
||||
!if "$(DISABLE_TARGET_shell)" == ""
|
||||
DISABLE_TARGET_shell = 0
|
||||
!endif
|
||||
|
||||
!if !$(DISABLE_STANDARD_TARGETS)
|
||||
!if !$(DISABLE_TARGET_setup)
|
||||
setup: default-setup
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_install)
|
||||
install: default-install
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_clean)
|
||||
clean: default-clean
|
||||
realclean: hose
|
||||
hose: default-hose
|
||||
distclean: realclean default-distclean
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_test)
|
||||
test: default-test
|
||||
!endif
|
||||
!if !$(DISABLE_TARGET_shell)
|
||||
shell: default-shell
|
||||
!endif
|
||||
!endif # DISABLE_STANDARD_TARGETS
|
||||
+8
-12
@@ -5,16 +5,12 @@ if (USE_BRLCAD)
|
||||
|
||||
endif (USE_BRLCAD)
|
||||
|
||||
# Unfortunately, there does not appear to be a reliable way to test for the
|
||||
# presence of the IWidgets package on a system Tcl/Tk. As far as I can tell
|
||||
# the "package require Iwidgets" test (which is what is required to properly
|
||||
# test for an available Iwidgets 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.
|
||||
|
||||
# Unless we have been specifically instructed not to, provide the bundled
|
||||
# version of IWidgets.
|
||||
# Tcl can inspect a system package index without loading Iwidgets, but the
|
||||
# advertised version does not establish Itcl 4 compatibility. The latest
|
||||
# upstream 4.1.1 sources still need the fixes in iwidgets_itcl4.patch, and a
|
||||
# system package using that same version may or may not carry equivalent
|
||||
# downstream fixes. Actually validating it loads Tk and requires a display.
|
||||
# Unless explicitly disabled, use the known patched copy.
|
||||
|
||||
if (NOT DEFINED ENABLE_IWIDGETS AND NOT DISABLE_IWIDGETS)
|
||||
set(ENABLE_IWIDGETS ON)
|
||||
@@ -27,8 +23,9 @@ if (ENABLE_IWIDGETS)
|
||||
RegisterDeps(IWIDGETS)
|
||||
|
||||
ExternalProject_Add(IWIDGETS_BLD
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/iwidgets"
|
||||
URL "${CMAKE_CURRENT_SOURCE_DIR}/iwidgets"
|
||||
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
|
||||
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/iwidgets_itcl4.patch
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BUNDLE_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
@@ -58,4 +55,3 @@ endif (ENABLE_IWIDGETS)
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
Iwidgets in bext
|
||||
================
|
||||
|
||||
Bext packages Iwidgets 4.1.1 because Iwidgets is not bundled with Tcl or Tk
|
||||
and cannot be assumed to be installed with a system Tcl/Tk stack. The source
|
||||
predates Itcl 4 and needs a small compatibility patch when used with the Itcl
|
||||
4.1.1-or-newer stack required by BRL-CAD.
|
||||
|
||||
Upstream status
|
||||
---------------
|
||||
|
||||
The latest official Incr Widgets source release is 4.1.1. The release archive
|
||||
and bext's generic widget sources match except for expanded CVS Id strings;
|
||||
bext omits obsolete build, CVS, demo, manual, and test files and supplies its
|
||||
own CMake packaging. The Tcl Core fossil project named "iwidgets for itk4"
|
||||
has only two check-ins, both from May 24, 2012, and its source retains the
|
||||
compatibility defects fixed here. There is consequently no newer maintained
|
||||
upstream source to import as of September 2026.
|
||||
|
||||
Tcl can discover versions advertised by system package indexes without loading
|
||||
Iwidgets or opening a display. That is sufficient for inventory, but not for
|
||||
safe selection: an unpatched system package and one with equivalent downstream
|
||||
fixes both advertise version 4.1.1. Loading enough code to validate behavior
|
||||
also loads Tk and requires a display. Bext therefore continues to use its
|
||||
known patched copy by default instead of treating the version string as proof
|
||||
of compatibility.
|
||||
|
||||
Compatibility patch
|
||||
-------------------
|
||||
|
||||
Itcl 3 accepted an array element as the argument to itcl::scope. Itcl 4
|
||||
instead resolves that argument as a variable name and rejects array element
|
||||
syntax. The patch resolves each common array's fully qualified variable name
|
||||
with namespace which, then appends the element index. This preserves the
|
||||
variable names expected by Tk -variable, -textvariable, trace, and tkwait
|
||||
without depending on Itcl 3's itcl::scope behavior.
|
||||
|
||||
The Finddialog match callback previously constructed a command with subst and
|
||||
then executed the resulting string. Tcl 8.5's argument expansion syntax
|
||||
invokes the stored command prefix directly, preserving argument boundaries and
|
||||
supporting the command prefixes produced by Itcl 4.
|
||||
|
||||
Labeledwidget::alignlabels originally passed the unqualified class name
|
||||
Labeledwidget to itcl::find. Itcl 4 resolves that name in the caller's object
|
||||
context. The result therefore depended on package initialization order: it
|
||||
worked when Itcl was loaded before Tk, but failed in applications such as
|
||||
bwish and Archer where Tk was initialized first. The patch uses the fully
|
||||
qualified ::iwidgets::Labeledwidget class name so both supported initialization
|
||||
orders behave identically.
|
||||
|
||||
Panedwindow's frame hull shares its resource class name with Tk's native
|
||||
panedwindow widget, whose event bindings call a different widget API. The
|
||||
patch removes that class tag from the hull's binding list while retaining
|
||||
Iwidgets' configure and sash bindings and the Panedwindow resource class.
|
||||
Pointer motion and clicks therefore use the correct handlers without
|
||||
changing native Tk panedwindow behavior.
|
||||
|
||||
These changes are kept as a bext patch rather than modifications to the source
|
||||
submodule. That keeps the imported upstream revision identifiable and makes
|
||||
the compatibility delta explicit and independently reviewable. The external
|
||||
project patches a staged copy so builds do not modify the source submodule.
|
||||
|
||||
Validation
|
||||
----------
|
||||
|
||||
The BRL-CAD Tcl/Itcl smoke baseline exercises the affected Iwidgets under both
|
||||
initialization orders:
|
||||
|
||||
* btclsh loads Itcl before Tk and represents command-line tools such as
|
||||
rtwizard;
|
||||
* bwish initializes Tk before tclcad loads Itcl and represents Archer and
|
||||
other Tk-first applications.
|
||||
|
||||
The baseline constructs and operates the affected widgets, invokes
|
||||
Labeledwidget::alignlabels, follows callbacks after returning to the event
|
||||
loop, and treats background Tcl errors as failures. Xmin supplies the X
|
||||
server needed to run the GUI case on headless builders.
|
||||
@@ -1,4 +1,3 @@
|
||||
PATCH
|
||||
ITCL
|
||||
ITK
|
||||
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
diff --git a/generic/canvasprintbox.itk b/generic/canvasprintbox.itk
|
||||
index 9d41daa..4f7d1d0 100755
|
||||
--- a/generic/canvasprintbox.itk
|
||||
+++ b/generic/canvasprintbox.itk
|
||||
@@ -352,7 +352,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
itk_component add printerrb {
|
||||
radiobutton $cs.printerrb \
|
||||
-text Printer \
|
||||
- -variable [itcl::scope _globVar($this,output)] \
|
||||
+ -variable [namespace which -variable _globVar]($this,output) \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
-value printer \
|
||||
@@ -366,7 +366,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
-labeltext "command:" \
|
||||
-state normal \
|
||||
-labelpos w \
|
||||
- -textvariable [itcl::scope _globVar($this,printeref)]
|
||||
+ -textvariable [namespace which -variable _globVar]($this,printeref)
|
||||
}
|
||||
|
||||
itk_component add filerb {
|
||||
@@ -374,7 +374,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
-text File \
|
||||
-justify left \
|
||||
-anchor w \
|
||||
- -variable [itcl::scope _globVar($this,output)] \
|
||||
+ -variable [namespace which -variable _globVar]($this,output) \
|
||||
-value file \
|
||||
-command [itcl::code $this _update_attr]
|
||||
} {
|
||||
@@ -386,7 +386,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
-labeltext "filename:" \
|
||||
-state disabled \
|
||||
-labelpos w \
|
||||
- -textvariable [itcl::scope _globVar($this,fileef)]
|
||||
+ -textvariable [namespace which -variable _globVar]($this,fileef)
|
||||
}
|
||||
|
||||
itk_component add propsframe {
|
||||
@@ -422,7 +422,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
-text {Stretch to fit} \
|
||||
-justify left \
|
||||
-anchor w \
|
||||
- -variable [itcl::scope _globVar($this,stretchcb)] \
|
||||
+ -variable [namespace which -variable _globVar]($this,stretchcb) \
|
||||
-command [itcl::code $this refresh]
|
||||
} {
|
||||
usual
|
||||
@@ -435,7 +435,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
-text Posterize \
|
||||
-justify left \
|
||||
-anchor w \
|
||||
- -variable [itcl::scope _globVar($this,postercb)] \
|
||||
+ -variable [namespace which -variable _globVar]($this,postercb) \
|
||||
-command [itcl::code $this refresh]
|
||||
} {
|
||||
usual
|
||||
@@ -445,7 +445,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
itk_component add hpcnt {
|
||||
iwidgets::entryfield $cs.hpcnt \
|
||||
-labeltext on \
|
||||
- -textvariable [itcl::scope _globVar($this,hpc)] \
|
||||
+ -textvariable [namespace which -variable _globVar]($this,hpc) \
|
||||
-validate integer -width 3 \
|
||||
-command [itcl::code $this refresh]
|
||||
}
|
||||
@@ -453,7 +453,7 @@ itcl::body iwidgets::Canvasprintbox::constructor {args} {
|
||||
itk_component add vpcnt {
|
||||
iwidgets::entryfield $cs.vpcnt \
|
||||
-labeltext by \
|
||||
- -textvariable [itcl::scope _globVar($this,vpc)] \
|
||||
+ -textvariable [namespace which -variable _globVar]($this,vpc) \
|
||||
-validate integer -width 3 \
|
||||
-command [itcl::code $this refresh]
|
||||
}
|
||||
diff --git a/generic/checkbox.itk b/generic/checkbox.itk
|
||||
index 49e8888..123be27 100755
|
||||
--- a/generic/checkbox.itk
|
||||
+++ b/generic/checkbox.itk
|
||||
@@ -172,7 +172,7 @@ itcl::body iwidgets::Checkbox::index {index} {
|
||||
itcl::body iwidgets::Checkbox::add {tag args} {
|
||||
itk_component add $tag {
|
||||
eval checkbutton $itk_component(childsite).cb[incr _unique] \
|
||||
- -variable [list [itcl::scope buttonVar($this,$tag)]] \
|
||||
+ -variable [list [namespace which -variable buttonVar]($this,$tag)] \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
-highlightthickness 0 \
|
||||
@@ -207,7 +207,7 @@ itcl::body iwidgets::Checkbox::add {tag args} {
|
||||
itcl::body iwidgets::Checkbox::insert {index tag args} {
|
||||
itk_component add $tag {
|
||||
eval checkbutton $itk_component(childsite).cb[incr _unique] \
|
||||
- -variable [list [itcl::scope buttonVar($this,$tag)]] \
|
||||
+ -variable [list [namespace which -variable buttonVar]($this,$tag)] \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
-highlightthickness 0 \
|
||||
@@ -258,7 +258,7 @@ itcl::body iwidgets::Checkbox::select {index} {
|
||||
# already selected. Check its associated variable, and if
|
||||
# it's set, then just ignore and return.
|
||||
#-----------------------------------------------------------
|
||||
- if {[set [itcl::scope buttonVar($this,$tag)]] ==
|
||||
+ if {[set [namespace which -variable buttonVar]($this,$tag)] ==
|
||||
[[component $tag] cget -onvalue]} {
|
||||
return
|
||||
}
|
||||
diff --git a/generic/combobox.itk b/generic/combobox.itk
|
||||
index 140724b..dfa690b 100755
|
||||
--- a/generic/combobox.itk
|
||||
+++ b/generic/combobox.itk
|
||||
@@ -1231,7 +1231,7 @@ itcl::body iwidgets::Combobox::_listShowing {{val ""}} {
|
||||
return $_listShowing($this)
|
||||
} elseif {$val == "-wait"} {
|
||||
while {!$_listShowing($this)} {
|
||||
- tkwait variable [itcl::scope _listShowing($this)]
|
||||
+ tkwait variable [namespace which -variable _listShowing]($this)
|
||||
}
|
||||
return
|
||||
}
|
||||
diff --git a/generic/finddialog.itk b/generic/finddialog.itk
|
||||
index 7bf38f1..608ebb9 100755
|
||||
--- a/generic/finddialog.itk
|
||||
+++ b/generic/finddialog.itk
|
||||
@@ -102,7 +102,7 @@ itcl::body ::iwidgets::Finddialog::constructor {args} {
|
||||
#
|
||||
itk_component add all {
|
||||
checkbutton $itk_interior.all \
|
||||
- -variable [itcl::scope _optionValues($this-all)] \
|
||||
+ -variable [namespace which -variable _optionValues]($this-all) \
|
||||
-text "All"
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ itcl::body ::iwidgets::Finddialog::constructor {args} {
|
||||
#
|
||||
itk_component add case {
|
||||
checkbutton $itk_interior.case \
|
||||
- -variable [itcl::scope _optionValues($this-case)] \
|
||||
+ -variable [namespace which -variable _optionValues]($this-case) \
|
||||
-text "Consider Case"
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ itcl::body ::iwidgets::Finddialog::constructor {args} {
|
||||
#
|
||||
itk_component add regexp {
|
||||
checkbutton $itk_interior.regexp \
|
||||
- -variable [itcl::scope _optionValues($this-regexp)] \
|
||||
+ -variable [namespace which -variable _optionValues]($this-regexp) \
|
||||
-text "Use Regular Expression"
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ itcl::body ::iwidgets::Finddialog::constructor {args} {
|
||||
#
|
||||
itk_component add backwards {
|
||||
checkbutton $itk_interior.backwards \
|
||||
- -variable [itcl::scope _optionValues($this-backwards)] \
|
||||
+ -variable [namespace which -variable _optionValues]($this-backwards) \
|
||||
-text "Find Backwards"
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ itcl::body ::iwidgets::Finddialog::find {} {
|
||||
# of the string matching the pattern.
|
||||
#
|
||||
set precmd "$itk_option(-textwidget) search \
|
||||
- -count [list [itcl::scope _matchLen($this)]]"
|
||||
+ -count [list [namespace which -variable _matchLen]($this)]"
|
||||
|
||||
if {! [_get case]} {
|
||||
append precmd " -nocase"
|
||||
@@ -423,7 +423,7 @@ itcl::body ::iwidgets::Finddialog::find {} {
|
||||
# If a match command is defined, then call it with the match point.
|
||||
#
|
||||
if {$itk_option(-matchcommand) != {}} {
|
||||
- [subst $itk_option(-matchcommand)] $matchPoint
|
||||
+ {*}$itk_option(-matchcommand) $matchPoint
|
||||
}
|
||||
|
||||
#
|
||||
diff --git a/generic/mainwindow.itk b/generic/mainwindow.itk
|
||||
index 032021e..4f94a4d 100755
|
||||
--- a/generic/mainwindow.itk
|
||||
+++ b/generic/mainwindow.itk
|
||||
@@ -84,7 +84,7 @@ itcl::body iwidgets::Mainwindow::constructor {args} {
|
||||
#
|
||||
itk_component add menubar {
|
||||
iwidgets::Menubar $itk_interior.menubar \
|
||||
- -helpvariable [itcl::scope _helpVar($this)]
|
||||
+ -helpvariable [namespace which -variable _helpVar]($this)
|
||||
} {
|
||||
keep -disabledforeground -cursor \
|
||||
-highlightbackground -highlightthickness
|
||||
@@ -101,7 +101,7 @@ itcl::body iwidgets::Mainwindow::constructor {args} {
|
||||
#
|
||||
itk_component add toolbar {
|
||||
iwidgets::Toolbar $itk_interior.toolbar -orient horizontal \
|
||||
- -helpvariable [itcl::scope _helpVar($this)]
|
||||
+ -helpvariable [namespace which -variable _helpVar]($this)
|
||||
} {
|
||||
keep -balloonbackground -balloondelay1 -balloondelay2 \
|
||||
-balloonfont -balloonforeground -disabledforeground -cursor \
|
||||
@@ -116,7 +116,7 @@ itcl::body iwidgets::Mainwindow::constructor {args} {
|
||||
#
|
||||
itk_component add mousebar {
|
||||
iwidgets::Toolbar $itk_interior.mousebar -orient vertical \
|
||||
- -helpvariable [itcl::scope _helpVar($this)]
|
||||
+ -helpvariable [namespace which -variable _helpVar]($this)
|
||||
} {
|
||||
keep -balloonbackground -balloondelay1 -balloondelay2 \
|
||||
-balloonfont -balloonforeground -disabledforeground -cursor \
|
||||
@@ -142,13 +142,13 @@ itcl::body iwidgets::Mainwindow::constructor {args} {
|
||||
|
||||
itk_component add help {
|
||||
label $itk_component(lineframe).help \
|
||||
- -textvariable [itcl::scope _helpVar($this)] \
|
||||
+ -textvariable [namespace which -variable _helpVar]($this) \
|
||||
-relief sunken -borderwidth 2 -width 10
|
||||
}
|
||||
|
||||
itk_component add status {
|
||||
label $itk_component(lineframe).status \
|
||||
- -textvariable [itcl::scope _statusVar($this)] \
|
||||
+ -textvariable [namespace which -variable _statusVar]($this) \
|
||||
-relief sunken -borderwidth 2 -width 10
|
||||
}
|
||||
|
||||
diff --git a/generic/panedwindow.itk b/generic/panedwindow.itk
|
||||
--- a/generic/panedwindow.itk
|
||||
+++ b/generic/panedwindow.itk
|
||||
@@ -134,8 +134,11 @@
|
||||
# Add binding for the configure event.
|
||||
#
|
||||
bind pw-config-$this <Configure> [itcl::code $this _pwConfigureEventHandler %w %h]
|
||||
+ # Tk's native Panedwindow uses the same class name but a different API.
|
||||
+ # Keep the hull's resource class and Iwidgets' own event bindings.
|
||||
bindtags $itk_component(hull) \
|
||||
- [linsert [bindtags $itk_component(hull)] 0 pw-config-$this]
|
||||
+ [linsert [lsearch -all -inline -not -exact \
|
||||
+ [bindtags $itk_component(hull)] Panedwindow] 0 pw-config-$this]
|
||||
|
||||
array set _relief {0 sunken 1 raised}
|
||||
|
||||
diff --git a/generic/radiobox.itk b/generic/radiobox.itk
|
||||
index 282eaa7..fe1b11e 100755
|
||||
--- a/generic/radiobox.itk
|
||||
+++ b/generic/radiobox.itk
|
||||
@@ -111,7 +111,7 @@ itcl::body iwidgets::Radiobox::constructor {args} {
|
||||
#
|
||||
set _modes($this) {}
|
||||
|
||||
- trace variable [itcl::scope _modes($this)] w [itcl::code $this _command]
|
||||
+ trace variable [namespace which -variable _modes]($this) w [itcl::code $this _command]
|
||||
|
||||
grid columnconfigure $itk_component(childsite) 0 -weight 1
|
||||
|
||||
@@ -123,7 +123,7 @@ itcl::body iwidgets::Radiobox::constructor {args} {
|
||||
# ------------------------------------------------------------------
|
||||
itcl::body iwidgets::Radiobox::destructor { } {
|
||||
|
||||
- trace vdelete [itcl::scope _modes($this)] w [itcl::code $this _command]
|
||||
+ trace vdelete [namespace which -variable _modes]($this) w [itcl::code $this _command]
|
||||
catch {unset _modes($this)}
|
||||
|
||||
}
|
||||
@@ -212,7 +212,7 @@ itcl::body iwidgets::Radiobox::add {tag args} {
|
||||
|
||||
itk_component add $tag {
|
||||
eval radiobutton $itk_component(childsite).rb[incr _unique] \
|
||||
- -variable [list [itcl::scope _modes($this)]] \
|
||||
+ -variable [list [namespace which -variable _modes]($this)] \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
-highlightthickness 0 \
|
||||
@@ -250,7 +250,7 @@ itcl::body iwidgets::Radiobox::insert {index tag args} {
|
||||
|
||||
itk_component add $tag {
|
||||
eval radiobutton $itk_component(childsite).rb[incr _unique] \
|
||||
- -variable [list [itcl::scope _modes($this)]] \
|
||||
+ -variable [list [namespace which -variable _modes]($this)] \
|
||||
-highlightthickness 0 \
|
||||
-anchor w \
|
||||
-justify left \
|
||||
diff --git a/generic/shell.itk b/generic/shell.itk
|
||||
index c7b6f04..b326f05 100755
|
||||
--- a/generic/shell.itk
|
||||
+++ b/generic/shell.itk
|
||||
@@ -275,7 +275,7 @@ itcl::body iwidgets::Shell::activate {} {
|
||||
|
||||
lappend grabstack [list grab $itk_component(hull)]
|
||||
|
||||
- tkwait variable [itcl::scope _wait($this)]
|
||||
+ tkwait variable [namespace which -variable _wait]($this)
|
||||
return $_result
|
||||
|
||||
} elseif {$itk_option(-modality) == "global" } {
|
||||
@@ -293,7 +293,7 @@ itcl::body iwidgets::Shell::activate {} {
|
||||
|
||||
lappend grabstack [list grab -global $itk_component(hull)]
|
||||
|
||||
- tkwait variable [itcl::scope _wait($this)]
|
||||
+ tkwait variable [namespace which -variable _wait]($this)
|
||||
return $_result
|
||||
}
|
||||
}
|
||||
diff --git a/generic/watch.itk b/generic/watch.itk
|
||||
index ace2cc9..4993aca 100755
|
||||
--- a/generic/watch.itk
|
||||
+++ b/generic/watch.itk
|
||||
@@ -171,7 +171,7 @@ itcl::body iwidgets::Watch::constructor { args } {
|
||||
radiobutton $itk_component(frame).am \
|
||||
-text "AM" \
|
||||
-value "AM" \
|
||||
- -variable [itcl::scope _ampmVar($this)]
|
||||
+ -variable [namespace which -variable _ampmVar]($this)
|
||||
} {
|
||||
usual
|
||||
rename -font -labelfont labelFont Font
|
||||
@@ -181,7 +181,7 @@ itcl::body iwidgets::Watch::constructor { args } {
|
||||
radiobutton $itk_component(frame).pm \
|
||||
-text "PM" \
|
||||
-value "PM" \
|
||||
- -variable [itcl::scope _ampmVar($this)]
|
||||
+ -variable [namespace which -variable _ampmVar]($this)
|
||||
} {
|
||||
usual
|
||||
rename -font -labelfont labelFont Font
|
||||
diff --git a/generic/labeledwidget.itk b/generic/labeledwidget.itk
|
||||
index 2e0faa5..0f43ddb 100755
|
||||
--- a/generic/labeledwidget.itk
|
||||
+++ b/generic/labeledwidget.itk
|
||||
@@ -248,9 +248,9 @@
|
||||
# Verify that all the widgets are of type Labeledwidget and
|
||||
# determine the size of the maximum length label string.
|
||||
#
|
||||
foreach iwid $args {
|
||||
- set objcmd [itcl::find objects -isa Labeledwidget *::$iwid]
|
||||
+ set objcmd [itcl::find objects -isa ::iwidgets::Labeledwidget *::$iwid]
|
||||
|
||||
if {$objcmd == ""} {
|
||||
error "$iwid is not a \"Labeledwidget\""
|
||||
}
|
||||
@@ -273,9 +273,9 @@
|
||||
|
||||
set labelSize [expr {$shellWidth - $csWidth}]
|
||||
|
||||
if {$maxLabelWidth > $labelSize} {
|
||||
- set objcmd [itcl::find objects -isa Labeledwidget *::$iwid]
|
||||
+ set objcmd [itcl::find objects -isa ::iwidgets::Labeledwidget *::$iwid]
|
||||
set dist [expr {$maxLabelWidth - \
|
||||
($labelSize - [$objcmd cget -labelmargin])}]
|
||||
|
||||
$objcmd configure -labelmargin $dist
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user