Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 244b3aef36 | |||
| d54457e9b3 | |||
| d8bbbc1d1d | |||
| b82a28cd89 | |||
| 99b87881c2 | |||
| be823acda2 | |||
| f376ce1310 |
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"phabricator.uri" : "http://pha.geofinder.eu/"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/test
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: docker pull condaforge/linux-anvil
|
||||
- run:
|
||||
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
|
||||
command: ./package/conda/run_docker_build.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
jobs:
|
||||
- build
|
||||
@@ -1,58 +0,0 @@
|
||||
78d0fc786aece120146b5c7a2367b593d3498e43
|
||||
eef27b845f5409dafbe3434ef16cd0fd3c06b311
|
||||
a5bfba266593eeea4e1970b03b01ce360511d67d
|
||||
bfc8111d19e05f578e4f0567cb93a6288c8f39ee
|
||||
e901e584acaa1de1aa817448dbf1936f17c7f474
|
||||
3da6ced354983790f027514284a4aab1daf33022
|
||||
4543c982670a0d6044ebed7812ac7df43feb1c4a
|
||||
c4b1ec01baed0a6e2698fc2f8d6557193f6b15df
|
||||
2a8c1271d53bb9d4daad270e729661b7a35d7337
|
||||
7c43b059df1b33ceffb3aa57d7e2b162a310f5e1
|
||||
5bd5f3a9637c09a2537b5563c244c5db87b8a14a
|
||||
5abfdb140531c1c59254eb5dc4a62cb6bbd60e34
|
||||
298c67787377a06aee01d76477ba696b1335307b
|
||||
d5f6c096b8089d5835a22a80667b00eda6721526
|
||||
d84071275a76cea3ae96f12be6405e12305c98c7
|
||||
bfdffb50beb8064b15f3eaadee983c7c95ae57bd
|
||||
59fcb80a801e94248ae3184a0d8ca67745c96954
|
||||
31c0099a59ab76ac7282f60bb8308fad5ac59ddd
|
||||
67381e957984c0a3958e5c71f605f9a8a2fa3c5a
|
||||
a3cb87b11763504f86aac23a640ebf3cb840034a
|
||||
b75cd3dd522c7c2589016160f5bb342ea6a7ed94
|
||||
ae7cb9e30081b0c23643e69ff08d0d836b03b5f2
|
||||
8fb5c657365efb3fddce465b98ce8f5b39eca5f6
|
||||
c7f9874422ecccc791f35b02da521dcf76e60b22
|
||||
9d4b58ae85bfbac752b439b4146f8a0c119fd436
|
||||
d9237989467a036fa0095917b15ed30a34a1846a
|
||||
f11783a49876564eec5c9f6f9f0215db810fb1c4
|
||||
6f11ed298a9896c2b693cb2a5c6d540467496ca0
|
||||
4f308dc03cbb1d67482ba41d251a3c6bd8e9b194
|
||||
b2ffebf1c0ecee57bf5329f4d2546fd98f3f6399
|
||||
53bb216b571bdbacb5ac978a5ac3f6e5cd13c23f
|
||||
d38f18af23bfa76138d1c8b5e87672d57f3734eb
|
||||
1baf5da3cfb24d9fcc1a1389cbd502f60002e7ab
|
||||
7fe10182a9c2a1ca97beb8a8e82742fae6a80c8d
|
||||
0c6786d4bfe1814119c00a2b2816f2770885386d
|
||||
cbdba0b5bb19ffc0ff5450a3ff63281ef03d8bd9
|
||||
a5135efd879abcfb34868c775f4178124ccd771c
|
||||
e0399e83c3d48c7d43fa2d1ed2ad1f6d52e68a0a
|
||||
3ef6811dae41b0d5aa2343feea37cca12c5d23e3
|
||||
c44ccc0ff231b7a91deb4425fa7b484725e98683
|
||||
cb21ac7bf8ac998be93849b75c8ff94e9b1c1b54
|
||||
1ee046788d50bb2512dfb4454d3e8f6c4aff0f9f
|
||||
190d64bdae81af46a60241af9b8f4a8e381248fb
|
||||
ec74d351f0c533da1626b05d1db9e20b678a8f72
|
||||
1e9236abd416f998ccc3d052556338d4988ea709
|
||||
bac451cc537be8beb4826c89fd4429ca73e69f4d
|
||||
5f31fb74f6445fda5632b5f2545362f85a379c74
|
||||
6f230d740401f914d5340a4b4be1a1c1df7b444a
|
||||
0a65575c2c1b23fcae6354277fee264df6d163d8
|
||||
702238a99c80ff2e6c91b4880f91bb38ab7833ac
|
||||
35156cdce3b2716071e994467c607e5175693a12
|
||||
bb0e2f1c5186ae3008b9aad1f0ba3e35370d18db
|
||||
b13088664fea77e6ac4779dddfdea7aac3c50b30
|
||||
1ea364379f64314ea47549a2f625c34eafdd262d
|
||||
3b42d4aface8c64feb9c86533f3b847e9aa9c563
|
||||
bedf9207023d6d594f2c03d2a8d799b34759a8fb
|
||||
132a1d7e55eadd0cb5a09760d471780eb5bd9340
|
||||
3ef438eaf03f840958a2f7a9ec585a3d2728e447
|
||||
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: FreeCAD
|
||||
liberapay: FreeCAD
|
||||
open_collective: freecad
|
||||
patreon: # Replace with a single Patreon username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ["https://wiki.freecadweb.org/Donate"]
|
||||
@@ -1,91 +0,0 @@
|
||||
name: 🐛 Report a Bug
|
||||
description: File a bug report
|
||||
title: "[Bug] <title>"
|
||||
labels: ["🐛 bug", "needs triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to file a bug report! Please make sure you've posted about your issue in the FreeCAD Forums before submitting here.
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
id: forum_link
|
||||
attributes:
|
||||
label: Forums discussion
|
||||
description: Please start a discussion about your issue at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating an issue
|
||||
placeholder: Paste link to forum discussion here
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of FreeCAD are you running?
|
||||
options:
|
||||
- 0.19 (Release)
|
||||
- 0.20 (Development)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Arch
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- GCS
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Path
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- Techdraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Issue description
|
||||
description: Please include as much detail as possible so that testers can reproduce the bug
|
||||
placeholder: Description of the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -1,73 +0,0 @@
|
||||
name: 🌱 Feature Request
|
||||
description: Submit an idea for a new feature
|
||||
title: "[Feature Request] <title>"
|
||||
labels: ["feature", "needs triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to request a feature! Please make sure you've posted about your idea in the FreeCAD Forums before submitting here.
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing request for this?
|
||||
description: Please search to see if a request already exists for your suggestion
|
||||
options:
|
||||
- label: I have searched the existing requests
|
||||
required: true
|
||||
- type: input
|
||||
id: forum_link
|
||||
attributes:
|
||||
label: Forums discussion
|
||||
description: Please start a discussion about your idea at [the FreeCAD Forum](https://forum.freecad.org) and wait for confirmation there before creating a request.
|
||||
placeholder: Paste link to forum discussion here
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Arch
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- GCS
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Path
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- Techdraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Idea description
|
||||
description: Please include as much detail as possible so that developers understand the request
|
||||
placeholder: Description of the feature
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about your idea.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 START HERE -- FreeCAD Forum
|
||||
url: https://forum.freecad.org/
|
||||
about: Please start a topic at the forums first and wait for others to confirm your issue before creating a bug report on GitHub
|
||||
@@ -1,14 +0,0 @@
|
||||
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10)!
|
||||
|
||||
- [ ] Your pull request is confined strictly to a single module. That is, all the files changed by your pull request are either in `App`, `Base`, `Gui` or one of the `Mod` subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next ones
|
||||
- [ ] In case your pull request does more than just fixing small bugs, make sure you discussed your ideas with other developers on the FreeCAD forum
|
||||
- [ ] Your branch is [rebased](https://git-scm.com/docs/git-rebase) on latest master `git pull --rebase upstream master`
|
||||
- [ ] All FreeCAD unit tests are confirmed to pass by running `./bin/FreeCAD --run-test 0`
|
||||
- [ ] All commit messages are [well-written](https://chris.beams.io/posts/git-commit/) ex: `Fixes typo in Draft Move command text`
|
||||
- [ ] Your pull request is well written and has a good description, and its title starts with the module name, ex: `Draft: Fixed typos`
|
||||
- [ ] Commit messages include `issue #<id>` or `fixes #<id>` where `<id>` is the issue ID number from our [Issues database](https://github.com/FreeCAD/FreeCAD/issues) in case a particular commit solves or is related to an existing issue. Ex: `Draft: fix typos - fixes #4805`
|
||||
|
||||
And please remember to update the Wiki with the features added or changed once this PR is merged.
|
||||
**Note**: If you don't have wiki access, then please mention your contribution on the [0.20 Changelog Forum Thread](https://forum.freecadweb.org/viewtopic.php?f=10&t=56135).
|
||||
|
||||
---
|
||||
@@ -1,70 +0,0 @@
|
||||
aci
|
||||
ake
|
||||
aline
|
||||
alle
|
||||
alledges
|
||||
alocation
|
||||
anid
|
||||
anormal
|
||||
apoints
|
||||
appy
|
||||
ba
|
||||
beginn
|
||||
bloaded
|
||||
bottome
|
||||
childrens
|
||||
childs
|
||||
connexion
|
||||
currenty
|
||||
curvelinear
|
||||
detet
|
||||
doubleclick
|
||||
dum
|
||||
eiter
|
||||
ende
|
||||
extaction
|
||||
finde
|
||||
findn
|
||||
fle
|
||||
fo
|
||||
freez
|
||||
froms
|
||||
hist
|
||||
indicies
|
||||
inout
|
||||
ist
|
||||
lod
|
||||
mantatory
|
||||
mata
|
||||
methode
|
||||
modell
|
||||
nd
|
||||
nin
|
||||
normale
|
||||
normaly
|
||||
numer
|
||||
ontop
|
||||
ot
|
||||
parm
|
||||
parms
|
||||
programm
|
||||
propt
|
||||
rady
|
||||
recurrance
|
||||
rougly
|
||||
seh
|
||||
serie
|
||||
som
|
||||
strack
|
||||
substraction
|
||||
sur
|
||||
te
|
||||
thist
|
||||
tread
|
||||
ue
|
||||
uptodate
|
||||
usind
|
||||
vas
|
||||
vertexes
|
||||
wallthickness
|
||||
zuser
|
||||
@@ -1,63 +0,0 @@
|
||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||
# source:
|
||||
# - any: ['src/**/*', '!src/docs/*']
|
||||
|
||||
Core:
|
||||
- 'src/App/**/*'
|
||||
- 'src/Base/**/*'
|
||||
- 'src/Gui/**/*'
|
||||
|
||||
:octocat::
|
||||
- '.github/**/*'
|
||||
|
||||
Addon Manager:
|
||||
- 'src/Mod/AddonManager/**/*'
|
||||
|
||||
WB Arch:
|
||||
- 'src/Mod/Arch/**/*'
|
||||
|
||||
WB Draft:
|
||||
- 'src/Mod/Draft/**/*'
|
||||
|
||||
WB FEM:
|
||||
- 'src/Mod/Fem/**/*'
|
||||
|
||||
WB Mesh:
|
||||
- 'src/Mod/Mesh/**/*'
|
||||
|
||||
WB MeshPart:
|
||||
- 'src/Mod/MeshPart/**/*'
|
||||
|
||||
WB OpenSCAD:
|
||||
- 'src/Mod/OpenSCAD/**/*'
|
||||
|
||||
WB Part:
|
||||
- 'src/Mod/Part/**/*'
|
||||
|
||||
WB PartDesign:
|
||||
- 'src/Mod/PartDesign/**/*'
|
||||
|
||||
WB Path:
|
||||
- 'src/Mod/Path/**/*'
|
||||
|
||||
WB Points:
|
||||
- 'src/Mod/Points/**/*'
|
||||
|
||||
WB ReverseEngineering:
|
||||
- 'src/Mod/ReverseEngineering/**/*'
|
||||
|
||||
WB Sketcher:
|
||||
- 'src/Mod/Sketcher/**/*'
|
||||
|
||||
WB Spreadsheet:
|
||||
- 'src/Mod/Spreadsheet/**/*'
|
||||
|
||||
WB Surface:
|
||||
- 'src/Mod/Surface/**/*/'
|
||||
|
||||
WB TechDraw:
|
||||
- 'src/Mod/TechDraw/**/*'
|
||||
|
||||
WB Test:
|
||||
- 'src/Mod/Test/**/*'
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
|
||||
name: Codespell
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v12.2
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
ignore_words_file: .github/codespellignore
|
||||
skip: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
path: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
@@ -1,24 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
sync-labels: false
|
||||
-17
@@ -1,6 +1,5 @@
|
||||
# file types to ignore
|
||||
|
||||
*.DS_Store
|
||||
*.pyc
|
||||
*.obj
|
||||
*.lib
|
||||
@@ -9,8 +8,6 @@
|
||||
*.exp
|
||||
*.dep
|
||||
*.manifest
|
||||
*.o
|
||||
*.orig
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
@@ -21,7 +18,6 @@ ui_*.h
|
||||
moc_*.cpp
|
||||
Makefile
|
||||
CMakeCache.txt
|
||||
CMakeLists.txt.user
|
||||
config.h
|
||||
install_manifest.txt
|
||||
/bin/
|
||||
@@ -31,16 +27,3 @@ install_manifest.txt
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
OpenSCAD_rc.py
|
||||
/\.idea/
|
||||
.tags
|
||||
tags
|
||||
/\.vscode/
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
tsupdate_stderr.log
|
||||
tsupdate_stdout.log
|
||||
files_to_translate.txt
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Wrn:
|
||||
Err:
|
||||
Cannot find icon:
|
||||
-357
@@ -1,357 +0,0 @@
|
||||
######
|
||||
#
|
||||
# Travis-CI configuration file for FreeCAD.
|
||||
#
|
||||
# This build configuration will build and test FreeCAD on both Linux
|
||||
# and Mac OS X. For Mac OS X, this configuration will also package
|
||||
# and deploy the build to GitHub provided the following prerequisites
|
||||
# are satisfied:
|
||||
#
|
||||
# GH_TOKEN is defined as a secure environment variable and contains a
|
||||
# a valid GitHub OAUTH token with repo_deployment scope.
|
||||
# NOTE: Define this env using the Travis-CI Repo Settings UI
|
||||
#
|
||||
# FREECAD_RELEASE: A GitHub Release with this identifier exists in the
|
||||
# repo. The Travis job will deploy the OS X build to this
|
||||
# GitHub release name as a release asset.
|
||||
#
|
||||
# DEPLOY: Repo setting to deploy (defaults to no deploy to reduce
|
||||
# Travis build times. Set DEPLOY=1 to enable in repo settings.
|
||||
######
|
||||
env:
|
||||
global:
|
||||
- GENERATOR="Unix Makefiles"
|
||||
- CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}
|
||||
# - FREECAD_RELEASE="0.18"
|
||||
# - DEPLOY_RELEASE=${DEPLOY_RELEASE:-$FREECAD_RELEASE}
|
||||
# - OSX_PORTS_CACHE=${OSX_PORTS_CACHE:-FreeCAD/FreeCAD-ports-cache}
|
||||
# - DEPLOY=${DEPLOY:-0}
|
||||
|
||||
# jobs:
|
||||
# chunk.io key (if needed, obtain it with Yorik, PrzemoF, Kunda1)
|
||||
# secure: MJu0ZU/9Yqut6bUkHoSrXTV/c/WhCLR0KnHKCsnEU081PYoukzH6ngzgKk7/trAH2In080d/ra4B2OmTNl/LAgV6DXKFY9dO1aG8QwcrHgaMPf0pHYUy/OfwQSFYFByQDV2OEMAHcIWc/dtNkzK2QUi44Kn7d0GtSEiN4s816lriWtjg0vmEGAU8MjvcAGss4gKyn05Xm1NUCYPKgpgIHsywLbpE76lv0eOYoosEuKv5Q9Pb4FMQts02+JUlqE8eY4ZZ3nV8iQbgIDdseOSA7Ixn05zWjU/ZRZ74TrYxMnzfUAwQcJe9OcqoESq+pPWQt5HYG66VmeVxQim1gmsiDASH51U/nswKt0Q4bISj3tVk0YZMFV8Ax+SzPvLEmFZJQGfgO1mg7HdNcz9N9G5JHPawrV19DwYIEFbAw8MCSAoIXFOcPQZUWXCbtjm7NO9vCjMrqyVJMDD9L8omvQajHoajuHbOT8KB250gFokeLj3z8yu++Tz+IrZX5inUMrXsARVt/ALXpi8rJPXmoFMpMUjyWmDPqPWlnqUhLtTtEtKpuOWP8ZnWVwkg4QYOUhCy95C1okJSGkG+ylHWncWfY4mS+UBT525laoh+GOhH+sRW+p2xkI21xGFRqg1oHjjgY1yIYF6nnSHPzxMBRYmZwagyXsjkFG5FPMWR2oYk0Yg
|
||||
|
||||
git:
|
||||
depth: 5000
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/479456663cdf5c84e4d8
|
||||
on_success: always
|
||||
on_failure: always
|
||||
on_start: change
|
||||
|
||||
# Inject osx build into matrix - needed to specify image/dist
|
||||
jobs:
|
||||
# allow_failures:
|
||||
# - python: 3.7
|
||||
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds
|
||||
include:
|
||||
- if: type != pull_request
|
||||
os: linux
|
||||
dist: bionic
|
||||
language: cpp
|
||||
compiler: clang
|
||||
cache: ccache
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
packages:
|
||||
- clang-10
|
||||
env:
|
||||
- CC=clang-10
|
||||
- CXX=clang++-10
|
||||
- CMAKE_ARGS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
|
||||
- CACHE_NAME=JOB1
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
language: cpp
|
||||
compiler: gcc-10
|
||||
cache: ccache
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- gcc-10
|
||||
- g++-10
|
||||
env:
|
||||
- CC=gcc-10
|
||||
- CXX=g++-10
|
||||
- CC_FOR_BUILD=gcc-10
|
||||
- CXX_FOR_BUILD=g++-10
|
||||
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON"
|
||||
- CACHE_NAME=JOB2
|
||||
|
||||
# - os: osx
|
||||
# osx_image: xcode11.6
|
||||
# language: cpp
|
||||
# cache:
|
||||
# - ccache: true
|
||||
# - directories:
|
||||
# - $HOME/.ccache
|
||||
# - $HOME/Library/Caches/Homebrew
|
||||
# - /usr/local/Homebrew
|
||||
# env:
|
||||
# - CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release"
|
||||
# - PATH=/usr/local/bin:$PATH
|
||||
# - CACHE_NAME=OSX1
|
||||
|
||||
- os: windows
|
||||
language: cpp
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=OFF -DFREECAD_RELEASE_PDB=OFF -DFREECAD_RELEASE_SEH=OFF"
|
||||
- GENERATOR="Visual Studio 15 2017 Win64"
|
||||
- PYTHON_MAJOR_VERSION=3
|
||||
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
|
||||
- TEST_PATH="C:\Users\travis\build\FreeCAD\FreeCAD\build\bin"
|
||||
- CLCACHE_PATH="C:\Users\travis\build\FreeCAD\FreeCAD"
|
||||
- VS15=true
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_DIR=$HOME/.ccache
|
||||
- CACHE_NAME=JOB5
|
||||
# enable this if clcache extended log is needed
|
||||
#- CLCACHE_LOG=1
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/clcache
|
||||
|
||||
# - language: python
|
||||
# python: 3.7
|
||||
# dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
||||
# before_install: true
|
||||
# install: python3 -m pip install flake8
|
||||
# # fail the build if there are Python syntax errors or undefined names
|
||||
# script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||
|
||||
before_cache:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
|
||||
|
||||
before_install:
|
||||
# - eval "$(curl -fsSL "https://raw.githubusercontent.com/${OSX_PORTS_CACHE}/v${FREECAD_RELEASE}/travis-helpers.sh")"
|
||||
- |
|
||||
case "${TRAVIS_OS_NAME}" in
|
||||
|
||||
"linux")
|
||||
# Daily PPA for OCCT, Pivy, Netgen, PySide ... packages
|
||||
sudo apt-add-repository -y ppa:freecad-maintainers/freecad-daily
|
||||
sudo apt-get update -qq
|
||||
# Build deps
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
python-dev \
|
||||
python-pyside \
|
||||
python-matplotlib \
|
||||
python3-dev \
|
||||
python3-pyside \
|
||||
python3-matplotlib \
|
||||
libboost1.65-dev \
|
||||
libboost-filesystem1.65-dev \
|
||||
libboost-program-options1.65-dev \
|
||||
libboost-python1.65-dev \
|
||||
libboost-regex1.65-dev \
|
||||
libboost-signals1.65-dev \
|
||||
libboost-system1.65-dev \
|
||||
libboost-thread1.65-dev \
|
||||
libxerces-c-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libvtk7-dev \
|
||||
libmedc-dev \
|
||||
pybind11-dev \
|
||||
swig \
|
||||
qt4-qmake \
|
||||
libqt4-opengl-dev \
|
||||
libqtwebkit-dev \
|
||||
qtbase5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5opengl5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
libcoin80-dev \
|
||||
libpyside-dev \
|
||||
libpyside2-dev \
|
||||
libshiboken-dev \
|
||||
libshiboken2-dev \
|
||||
pyside-tools \
|
||||
pyside2-tools \
|
||||
doxygen \
|
||||
graphviz \
|
||||
libnglib-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
libmetis-dev \
|
||||
libspnav-dev
|
||||
# Runtime deps
|
||||
sudo apt-get install -y --no-install-recommends freecad-daily-python3 python-pivy python3-pivy python-ply python3-ply
|
||||
|
||||
# Use newer Eigen to suppress warnings
|
||||
# https://github.com/FreeCAD/FreeCAD/pull/3485
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.7-2_all.deb
|
||||
sudo dpkg -i libeigen3-dev_3.3.7-2_all.deb
|
||||
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
|
||||
export INSTALLED_APP_PATH="/usr/local/bin/FreeCAD"
|
||||
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/netgen/:$LD_LIRBARY_PATH
|
||||
;;
|
||||
|
||||
"osx")
|
||||
xcodebuild -version -sdk
|
||||
brew --config
|
||||
brew install ccache
|
||||
brew install coreutils
|
||||
brew update >/dev/null
|
||||
brew --config
|
||||
brew update
|
||||
brew upgrade
|
||||
brew install python@3.9
|
||||
brew unlink python@3.8
|
||||
brew link --overwrite --force python@3.9
|
||||
rm /usr/local/bin/python
|
||||
ln -s /usr/local/bin/python3 /usr/local/bin/python
|
||||
pip3 install six
|
||||
pip3 install pyyaml
|
||||
pip3 install ply
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
brew reinstall vtk@8.2
|
||||
brew link --force vtk@8.2
|
||||
which python
|
||||
python --version
|
||||
brew install boost
|
||||
brew install boost-python3
|
||||
brew tap FreeCAD/freecad
|
||||
brew install freecad/freecad/coin
|
||||
brew install freecad/freecad/nglib
|
||||
brew install freecad/freecad/med-file
|
||||
brew install freecad/freecad/opencamlib
|
||||
brew install freecad/freecad/shiboken2
|
||||
brew install freecad/freecad/pyside2
|
||||
brew install freecad/freecad/pyside2-tools
|
||||
brew install freecad/freecad/pivy
|
||||
brew install freecad/freecad/matplotlib
|
||||
|
||||
##Install the 3DConnexion frameworks
|
||||
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then
|
||||
curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-6-6_360DF97D-ED08-4ccf-A55E-0BF905E58476/3DxWareMac_v10-6-6_r3234.dmg'
|
||||
hdiutil attach -readonly /tmp/3dFW.dmg
|
||||
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
|
||||
diskutil eject /Volumes/3Dconnexion\ Software
|
||||
fi
|
||||
export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=OFF"
|
||||
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD"
|
||||
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON"
|
||||
brew link --overwrite matplotlib
|
||||
if [ -f "/usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx" ]; then
|
||||
sed '1,$s/\[\[nodiscard\]\]//' /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx > /tmp/Standard_Macro.hxx && cp /tmp/Standard_Macro.hxx /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx ;
|
||||
fi
|
||||
;;
|
||||
|
||||
"windows")
|
||||
#choco install -y python
|
||||
#py -m pip install --quiet --upgrade pip
|
||||
#py -m pip install git+https://github.com/frerich/clcache.git@v4.2.0
|
||||
curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip --output clcache-4.2.0.zip
|
||||
7z x clcache-4.2.0.zip > /dev/null
|
||||
export PATH=$CLCACHE_PATH:$PATH
|
||||
export PATH=$TEST_PATH:$PATH
|
||||
#reset clcache hit stats
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -z'
|
||||
# clcache stats before compilation
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
|
||||
|
||||
curl -L https://github.com/FreeCAD/FreeCAD/releases/download/0.19.1/FreeCADLibs_12.5.3_x64_VC17.7z --output FreeCADLibs.7z
|
||||
7z x FreeCADLibs.7z -oFreeCADLibs > /dev/null
|
||||
rm -f FreeCADLibs.7z
|
||||
export FREECAD_LIBPACK_DIR="$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17"
|
||||
|
||||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_LIBPACK_DIR=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17 -DPYTHON_EXECUTABLE=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.5.3_x64_VC17\bin\python.exe \
|
||||
-DBUILD_QT5=TRUE"
|
||||
export PATH=$MSBUILD_PATH:$PATH
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid or unsupported operating system ${TRAVIS_OS_NAME}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install:
|
||||
####
|
||||
# Build FreeCAD with cmake options set above for each platform
|
||||
##
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/bin:/usr/local/opt/ccache/libexec:$PATH"; fi
|
||||
- echo ${CMAKE_ARGS}
|
||||
- mkdir build && cd build && cmake -Wno-dev -G"${GENERATOR}" ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../
|
||||
|
||||
script:
|
||||
####
|
||||
# Install FreeCAD and run unit tests. Test failures will fail the build
|
||||
##
|
||||
# MSBuild.exe /m FreeCAD.sln
|
||||
- |
|
||||
if [ "${TRAVIS_OS_NAME}" == "windows" ]; then
|
||||
# https://travis-ci.community/t/vcvarsall-bat-freezes-on-new-1809-based-windows-images/7098/6
|
||||
# call msbuild using clcache
|
||||
#cmd.exe //C '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64'
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\.travis\build.bat'
|
||||
# ls -lahR
|
||||
mkdir bin/
|
||||
mv ../FreeCADLibs/FreeCADLibs_12.5.3_x64_VC17/bin/* bin/
|
||||
du -hs bin/
|
||||
# show clcache hit stats
|
||||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s'
|
||||
# run the tests
|
||||
#cmd.exe //C 'cd C:\Users\travis\build\FreeCAD\FreeCAD\build\bin && FreeCADCmd.exe --run-test 0'
|
||||
# Make build fail if ANY of the following fails
|
||||
#set -ev
|
||||
winpty.exe -Xallow-non-tty -Xplain /C/Users/travis/build/FreeCAD/FreeCAD/build/bin/FreeCADCmd.exe --run-test 0 | tee runlog.txt
|
||||
grep -q FAILED runlog.txt ; [ $? == 1 ] && echo "Build succeeded and tests passed!" || ( echo "Tests failed!" && false )
|
||||
else
|
||||
# Stop compiling (GCC) after 2 hrs 50 min (3 hrs limit).
|
||||
# Preserves created ccache for the next build job.
|
||||
# if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
|
||||
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo gtimeout -s KILL make -j2 install; fi
|
||||
cat $HOME/.ccache/ccache.conf
|
||||
ccache -z -s
|
||||
df -h
|
||||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then export PATH="/usr/local/opt/ccacche/libexec:$PATH"; sudo gtimeout -s KILL 7200 make -j2; [ $? == 124 ] && { ccache -s; return 0; } fi
|
||||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi
|
||||
sudo make -j2 install
|
||||
ccache -s
|
||||
${INSTALLED_APP_PATH} --console --run-test 0 || travis_terminate 1
|
||||
${INSTALLED_APP_PATH} --log-file /tmp/FreeCAD_installed.log &
|
||||
sleep 10 && pkill FreeCAD
|
||||
cat /tmp/FreeCAD_installed.log
|
||||
grep --file=../.log_errors /tmp/FreeCAD_installed.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from /usr/local/bin" || ( echo "Error from .log_errors found!" && false )
|
||||
fi
|
||||
|
||||
#after_success:
|
||||
# Package and deploy the build to GitHub. This will only run for builds on
|
||||
# master (i.e. pull requests are only built and tested but not deployed).
|
||||
#
|
||||
# GH_TOKEN must be set in order to deploy releases to GitHub
|
||||
#
|
||||
#- |
|
||||
# if [ "${TRAVIS_OS_NAME}" == "osx" -a "${TRAVIS_PULL_REQUEST}" == "false" -a "${DEPLOY}" == "1" ]; then
|
||||
# brew ls --versions jq || brew install jq
|
||||
# npm install -g appdmg
|
||||
# export VSN=$(python ${TRAVIS_BUILD_DIR}/src/Tools/ArchiveNameFromVersionHeader.py ${TRAVIS_BUILD_DIR}/build/src/Build/Version.h)
|
||||
# export DEPLOYMENT_ARCHIVE=${VSN}-${QT}.dmg
|
||||
# appdmg ${TRAVIS_BUILD_DIR}/src/MacAppBundle/DiskImage/layout.json "${DEPLOYMENT_ARCHIVE}"
|
||||
# deployContext=$(create_helper_context repo=${TRAVIS_REPO_SLUG} auth_token=${GH_TOKEN} release=${DEPLOY_RELEASE})
|
||||
# gitHub_deploy_asset_to_release_named $deployContext ${DEPLOYMENT_ARCHIVE}
|
||||
# gitHub_prune_assets_for_release_named $deployContext "-${QT}" 1
|
||||
# fi
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
echo on
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
|
||||
MSBuild.exe FreeCAD.sln /p:CLToolExe=clcache.exe /p:TrackFileAccess=false /p:CLToolPath=C:\Users\travis\build\FreeCAD\FreeCAD /m:2 /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64
|
||||
|
||||
-299
@@ -1,299 +0,0 @@
|
||||
# Contents
|
||||
|
||||
<a name="contents"></a>
|
||||
|
||||
- [Building FreeCAD on Mac OS 10.15.x -- Catalina](#build-freecad-macos-catalina)
|
||||
- [Directions](#directions)
|
||||
- [Install Xcode Command line tools](#install-xcode-cli-tools)
|
||||
- [Install Conda](#install-conda)
|
||||
- [Run the shell script](#run-the-shell-script)
|
||||
- [Building FreeCAD on macOS using homebrew packages with & without formula file](#homebrew-build-fc-on-macos)
|
||||
- [Requirements](#homebrew-requirements)
|
||||
- [Install required FreeCAD dependencies](#homebrew-install-required-deps)
|
||||
- [Limitations of using freecad formula file](#homebrew-limits-of-formula-file)
|
||||
- [Directions, Installing FreeCAD using brew packages without formula file](#homebrew-install-no-form-file)
|
||||
- [Expanded Directions](#homebrew-expanded-directions)
|
||||
- [Boost v1.75 fix](#homebrew-boost-175-fix)
|
||||
- [Errors, Issues, & Possible Solutions](#errors-issues-solutions)
|
||||
|
||||
<!-- SEE: https://stackoverflow.com/a/7335259/708807 for explanation of using `name` attribute for in page linking within a MD doc -->
|
||||
|
||||
# Building FreeCAD on Mac OS 10.15.x -- Catalina #
|
||||
|
||||
<a name="build-freecad-macos-catalina"></a>
|
||||
|
||||
General notes on how the tooling works:
|
||||
|
||||
This setup uses [conda](https://docs.conda.io) for dependency management.
|
||||
Conda is able to pull the deps from a repository called conda-forge and
|
||||
setup an isolated build environment. Not quite as isolated as docker, but
|
||||
it is a good option for Mac and is what the FreeCAD CI system uses.
|
||||
|
||||
Once the dependencies are installed into a conda environment, then the
|
||||
build uses the standard `cmake` configuration process to configure the build
|
||||
and `ninja` to invoke the actual compilation against whatever host compiler
|
||||
(gcc, clang, etc.) was installed by conda's `cxx-compiler` package for
|
||||
that architecture.
|
||||
|
||||
All of this, and some sanity checks, are in a unified shell script. See below.
|
||||
|
||||
# Directions
|
||||
|
||||
<a name="directions"></a>
|
||||
|
||||
## Install XCode Command line tools ##
|
||||
|
||||
<a name="install-xcode-cli-tools"></a>
|
||||
|
||||
Run `xcode-select --install` and click through.
|
||||
|
||||
## Install Conda ##
|
||||
|
||||
<a name="install-conda"></a>
|
||||
|
||||
Refer to [MiniConda Docs](https://docs.conda.io/en/latest/miniconda.html).
|
||||
|
||||
## Run the shell script ##
|
||||
|
||||
<a name="run-the-shell-script"></a>
|
||||
|
||||
Run the `./build_unix_dev_conda.sh` and go get coffee. Builds take
|
||||
an hour+ on a 2012 Retina MacBook.
|
||||
|
||||
Output binaries will be in the `./build/bin/FreeCAD` *and*
|
||||
`${CONDA_PREFIX}/bin/FreeCAD` directories.
|
||||
|
||||
You can code/build/test using the cmake configuration folder `./build` in
|
||||
the standard way *from within the freecad_dev conda environment*.
|
||||
|
||||
---
|
||||
|
||||
# Building FreeCAD on macOS using homebrew with & without a formula file
|
||||
|
||||
<a name="homebrew-build-fc-on-macos"></a>
|
||||
|
||||
> The below procedure provides an alternative way to install FreeCAD from the git source on macOS without having to use conda, but rather relies on [**mac homebrew**][lnk1] to manage dependencies.
|
||||
|
||||
## Requirements
|
||||
|
||||
<a name="homebrew-requirements"></a>
|
||||
|
||||
- macOS, running High Sierra _10.13_ or later
|
||||
- homebrew installed and working
|
||||
- All required dependencies to build FreeCAD installed using `brew install`
|
||||
|
||||
There is an official [**homebrew tap**][lnk2] that provides a list of formulas along with FreeCAD to setup all the dependencies to build FreeCAD from source on macOS, and also provides prebuilt bottles to install FreeCAD from a package rather than building from source.
|
||||
|
||||
> 💡 The below steps will build a FreeCAD binary that will launch FreeCAD from a command line interface, and will **NOT** build the **FreeCAD.app** bundle, ie. a double clickable app icon that can be launched from a Finder window.
|
||||
|
||||
### Install required FreeCAD dependencies
|
||||
|
||||
<a name="homebrew-install-required-deps"></a>
|
||||
|
||||
- Setup homebrew to use the official [**freecad-homebrew**][lnk2] tap.
|
||||
|
||||
```shell
|
||||
brew tap FreeCAD/freecad
|
||||
```
|
||||
|
||||
- Install FreeCAD dependencies provided by the tap
|
||||
|
||||
```shell
|
||||
brew install --only-dependencies freecad
|
||||
```
|
||||
|
||||
> The above step will install FreeCAD dependencies provided by the tap, and if a _bottle_ is provided by the tap homebrew will install the bottled version of the dep rather than building from source, unless the `install` command explicitly uses a _flag_ to build from source.
|
||||
|
||||
After all the dependencies have been installed, it should be possible to install FreeCAD from the provided bottle.
|
||||
|
||||
```shell
|
||||
brew install freecad/freecad/freecad
|
||||
```
|
||||
|
||||
> As of writing this, there are bottles provided for macOS Catalina and Big Sur
|
||||
> > If running a different version of macOS then building FreeCAD from source will be required.
|
||||
|
||||
To explicitly build FreeCAD from source using the formula file provided by the tap
|
||||
|
||||
```shell
|
||||
brew install freecad/freecad/freecad --build-from-source --HEAD --verbose
|
||||
```
|
||||
|
||||
The above command will grab the latest git source of FreeCAD and output the build process to the terminal.
|
||||
|
||||
> NOTE: On a MacBookPro 2013 late model it takes ~60 minutes to build FreeCAD from source.
|
||||
|
||||
After the _make_ and _make install_ process completes it should be possible to launch FreeCAD from any directory using a terminal with the below commands,
|
||||
|
||||
```shell
|
||||
FreeCAD
|
||||
FreeCADCmd
|
||||
```
|
||||
|
||||
- `FreeCAD` will launch a GUI version of FreeCAD
|
||||
- `FreeCADCmd` will launch **only** a command line version of FreeCAD
|
||||
|
||||
## Limitations of using the FreeCAD formula file
|
||||
|
||||
<a name="homebrew-limits-of-formula-file"></a>
|
||||
|
||||
If FreeCAD is installed via the bottle then one will have to wait for a new bottle to be generated to install a later version of FreeCAD. However, if FreeCAD is built from source, then FreeCAD will have all the updates up to the time the build process was started.
|
||||
|
||||
If any of the dependencies FreeCAD relies on is updated FreeCAD will likely require a rebuild. Mac homebrew does provide a feature to pin packages at specific versions to prevent them from updating, and also allows setting of an environment variable to prevent homebrew from automatically checking for updates (which can slow things down). All that said, FreeCAD can be built using all the dependencies provided by Mac homebrew, but not using the formula file: instead cloning the source to an arbitrary path on a local filesystem. This provides a couple of advantages:
|
||||
|
||||
- If `brew cleanup` is run and FreeCAD was installed using the above-provided command, all source tarballs or bottles that were _checked out_ or downloaded during the install process will be deleted from the system. If a reinstall or upgrade is later required then homebrew will have to refetch the bottles, or reclone the git source again.
|
||||
- Mac homebrew provides a method, _install flag_, for keeping the source regardless if the build succeeds or fails. The options are limited, however, and performing a standard `git clone` outside of homebrew is **much** preferred.
|
||||
- Cloning the FreeCAD source allows passing **any** cmake flags not provided by the formula file
|
||||
- Allowing the use of other build systems such as _ninja_
|
||||
- Allowing the use of alternate compilers, e.g. _ccache_
|
||||
- Pulling in subsequent updates are quicker because the `git clone` of the FreeCAD source will remain on the local filesystem even if a `brew cleanup` is run
|
||||
- Subsequent recompiles should not take 60 minutes if using a caching strategy such as _ccache_.
|
||||
|
||||
## Directions, Installing FreeCAD using brew packages without a formula file
|
||||
|
||||
<a name="homebrew-install-no-form-file"></a>
|
||||
|
||||
> ⚠️ The below directions assume macOS High Sierra or later is being used, homebrew is setup properly, and all dependencies were installed successfully.
|
||||
|
||||
**TL;DR**
|
||||
|
||||
- Clone the FreeCAD source, pass cmake args/flags within source dir, run make, and make install, then profit 💰
|
||||
|
||||
### Expanded Directions
|
||||
|
||||
<a name="homebrew-expanded-directions"></a>
|
||||
|
||||
- Clone the FreeCAD source from GitHub
|
||||
|
||||
```shell
|
||||
git clone https://github.com/freecad/freecad
|
||||
cd ./freecad
|
||||
git fetch
|
||||
```
|
||||
|
||||
> The above _fetch_ cmd will take some time to fetch the commit history for the repo, but if a shallow clone is performed then FreeCAD will not show to correct build number in the About dialog [**learn more**][lnk3].
|
||||
|
||||
Advanced users may alter the process below to build in a different location, use a different compiler, etc. but these instructions represent a procedure that works successfully for this author.
|
||||
|
||||
Set the path / environment variables for specifying the compilers to use
|
||||
|
||||
```
|
||||
export CC="/usr/local/opt/llvm/bin/clang"
|
||||
export CXX="/usr/local/opt/llvm/bin/clang++"
|
||||
```
|
||||
|
||||
- Linking the brew-provided install of python 3 will be required in order for cmake to find the proper python and python libraries.
|
||||
|
||||
```shell
|
||||
brew link python@3.9
|
||||
```
|
||||
|
||||
#### Boost v1.75 fix
|
||||
|
||||
<a name="homebrew-boost-175-fix"></a>
|
||||
|
||||
- Due to recent changes in boost v1.75, building FreeCAD will fail with the below linking error message (for a more exhaustive error message, [**learn more**][lnk4])
|
||||
|
||||
To work around the linking issue until the [**PR**][lnk5] is merged install boost will the patches applied within the PR.
|
||||
|
||||
```shell
|
||||
ld: library not found for -licudata
|
||||
```
|
||||
|
||||
```shell
|
||||
git checkout -b mybuild
|
||||
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/beta/freecad \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_FIND_FRAMEWORK=LAST
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-Wno-dev \
|
||||
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/macOSX10.14.sdk \
|
||||
-std=c++14 \
|
||||
-DCMAKE_CXX_STANDARD=14 \
|
||||
-DBUILD_ENABLE_CXX_STD:STRING=C++14 \
|
||||
-Wno-deprecated-declarations \
|
||||
-DUSE_PYTHON3=1 -DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
|
||||
-DBUILD_FEM_NETGEN=1 \
|
||||
-DBUILD_FEM=1 \
|
||||
-DBUILD_TECHDRAW=0 \
|
||||
-DFREECAD_USE_EXTERNAL_KDL=ON \
|
||||
-DFREECAD_CREATE_MAC_APP=OFF
|
||||
-DCMAKE_PREFIX_PATH="/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources;/usr/local/opt/vtk@8.2/lib/cmake;/usr/local;" .
|
||||
```
|
||||
|
||||
After the configuration completes run the below commands to start the build & install process
|
||||
|
||||
```shell
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
> 💡 Author's note: The above cmake build flags are the ones I've had good luck with, but that's not to say other ones can be added or removed. And for reasons unknown to me the above build process takes ~ twice along than using `brew install --build-from-source`
|
||||
|
||||
If everything goes well FreeCAD should be able to launch from a terminal
|
||||
|
||||
## Errors and Issues + possible solutions
|
||||
|
||||
<a name="errors-issues-solutions"></a>
|
||||
|
||||
Some common pitfalls are listed in this section.
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary><strong>error:</strong> no member named </summary>
|
||||
|
||||
```shell
|
||||
[ 18%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/DlgProjectInformationImp.cpp.o
|
||||
cd /opt/code/github/public/forks/freecad/build/src/Gui && /usr/local/bin/ccache /usr/local/opt/llvm/bin/clang++ -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PP_VARIADICS=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"Release\" -DFreeCADGui_EXPORTS -DGL_SILENCE_DEPRECATION -DHAVE_CONFIG_H -DHAVE_FREEIMAGE -DHAVE_PYSIDE2 -DHAVE_RAPIDJSON -DHAVE_SHIBOKEN2 -DHAVE_TBB -DNDEBUG -DOCC_CONVERT_SIGNALS -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_OCC64 -I/opt/code/github/public/forks/freecad/build -I/opt/code/github/public/forks/freecad/build/src -I/opt/code/github/public/forks/freecad/src -I/opt/code/github/public/forks/freecad/src/Gui -I/opt/code/github/public/forks/freecad/src/Gui/Quarter -I/opt/code/github/public/forks/freecad/build/src/Gui -I/opt/code/github/public/forks/freecad/src/Gui/.. -I/opt/code/github/public/forks/freecad/build/src/Gui/.. -I/opt/code/github/public/forks/freecad/build/src/Gui/Language -I/opt/code/github/public/forks/freecad/build/src/Gui/propertyeditor -I/opt/code/github/public/forks/freecad/build/src/Gui/TaskView -I/opt/code/github/public/forks/freecad/build/src/Gui/Quarter -I/opt/code/github/public/forks/freecad/build/src/Gui/DAGView -I/usr/local/include/eigen3 -I/usr/local/include/PySide2/QtCore -I/usr/local/include/PySide2/QtGui -I/usr/local/include/PySide2/QtWidgets -isystem /usr/local/include -isystem /usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9 -iframework /usr/local/opt/qt/lib -isystem /usr/local/opt/qt/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt/./mkspecs/macx-clang -isystem /usr/local/opt/qt/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt/lib/QtGui.framework/Headers -isystem /Library/Developer/CommandLineTools/SDKs/macOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtOpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtPrintSupport.framework/Headers -isystem /usr/local/opt/qt/lib/QtSvg.framework/Headers -isystem /usr/local/opt/qt/lib/QtNetwork.framework/Headers -isystem /usr/local/opt/qt/include -isystem /usr/local/opt/qt/include/QtUiTools -isystem /usr/local/include/shiboken2 -isystem /usr/local/include/PySide2 -isystem /usr/local/opt/qt/lib/QtXml.framework/Headers -Wall -Wextra -Wpedantic -Wno-write-strings -Wno-undefined-var-template -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/macOSX10.14.sdk -fPIC -I/usr/local/Cellar/open-mpi/4.0.5/include -fPIC -std=gnu++14 -o CMakeFiles/FreeCADGui.dir/DlgProjectInformationImp.cpp.o -c /opt/code/github/public/forks/freecad/src/Gui/DlgProjectInformationImp.cpp
|
||||
/opt/code/github/public/forks/freecad/src/Gui/DlgProjectInformationImp.cpp:56:9: error: no member named 'lineEditProgramVersion' in 'Gui::Dialog::Ui_DlgProjectInformation'
|
||||
ui->lineEditProgramVersion->setText(QString::fromUtf8(doc->getProgramVersion()));
|
||||
~~ ^
|
||||
1 error generated.
|
||||
make[2]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/DlgProjectInformationImp.cpp.o] Error 1
|
||||
make[1]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/all] Error 2
|
||||
make: *** [all] Error 2
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
FreeCAD may fail to build if creating a build directory within the _src_ directory and running `cmake ..` within the newly created _build_ directory. As it currently stands, `cmake` needs run within the _src_ directory or the this error message will likely appear during the build process.
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary> ⚠️ <strong>warning:</strong> specified path differs in case from file name on disk</summary>
|
||||
|
||||
```
|
||||
/opt/code/github/public/forks/FreeCAD/src/Gui/moc_DlgParameterFind.cpp:10:10: warning: non-portable path to file '"../../../FreeCAD/src/Gui/DlgParameterFind.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
|
||||
#include "../../../freecad/src/Gui/DlgParameterFind.h"
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
"../../../FreeCAD/src/Gui/DlgParameterFind.h"
|
||||
1 warning generated.
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
On macOS most filesystems are case **insensitive**, whereas most GNU+Linux distros use _case sensitive_ file systems. So if FreeCAD source is cloned within a `FreeCAD` directory the build process on macOS may look for a `freecad` that is _case sensitive_ however the file system isn't case sensitive, thus the compiler will provide the above warning message.
|
||||
|
||||
One way to resolve such error message is to rename `FreeCAD` to `freecad`
|
||||
|
||||
```shell
|
||||
mv FreeCAD freecadd;
|
||||
mv freecadd freecad;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<!-- links -->
|
||||
|
||||
[lnk1]: <http://brew.sh>
|
||||
[lnk2]: <https://github.com/FreeCAD/homebrew-freecad>
|
||||
[lnk3]: <https://forum.freecadweb.org/viewtopic.php?f=4&t=51981#p446796>
|
||||
[lnk4]: <https://gist.github.com/ipatch/6116824ab1f2a99b526cb07e43317b91#gistcomment-3577066>
|
||||
[lnk5]: <https://github.com/Homebrew/homebrew-core/pull/67615>
|
||||
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
rem Build script, uses vcbuild to completetly build FreeCAD
|
||||
|
||||
rem start again nice (LOW)
|
||||
if "%1"=="" (
|
||||
start /WAIT /LOW /B cmd.exe /V /C %~s0 go_ahead
|
||||
goto:eof
|
||||
)
|
||||
rem set the aprobiated Variables here or outside in the system
|
||||
if NOT DEFINED VCDIR set VCDIR=C:\Program Files\Microsoft Visual Studio 9.0
|
||||
|
||||
rem Register VS Build programms
|
||||
call "%VCDIR%\VC\vcvarsall.bat"
|
||||
|
||||
rem "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\SW_Projects\CAD\FreeCAD_10" /closeonend:3
|
||||
|
||||
|
||||
rem Start the Visuall Studio build process
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Debug|Win32"
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Debug|Win32"
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Release|Win32"
|
||||
@@ -0,0 +1,19 @@
|
||||
# Version of the release. The Revision number you must specify at the command line
|
||||
[Version]
|
||||
Major: 0
|
||||
Minor: 7
|
||||
Alias: Bespin
|
||||
Url: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk
|
||||
|
||||
# Here comes the paths of the needed tools to build a release
|
||||
# the path can be simple or as full path. Depends if you have your tool in PATH
|
||||
[Tools]
|
||||
svn: C:\Program Files (x86)\Subversion\svn.exe
|
||||
wget: C:\Libs\FreeCADLibs\FreeCADLibs6.2\bin\wget.exe
|
||||
candle: C:\Libs\Libs\wix_30\candle.exe
|
||||
light: C:\Libs\Libs\wix_30\light.exe
|
||||
hhc: C:\Program Files (x86)\HTML Help Workshop\hhc.exe
|
||||
|
||||
# needet until the build is completely done with cMake
|
||||
[Libs] # Libs used in the build
|
||||
FreecadLib: C:\Libs\FreeCADLibs\FreeCADLibs6.2
|
||||
+342
@@ -0,0 +1,342 @@
|
||||
#! python
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2007 Jürgen Riegel GPL
|
||||
|
||||
Usage = """BuildRelease - Build script to build a complete FreeCAD release
|
||||
|
||||
Usage:
|
||||
BuildRelease [Optionen] ReleaseNbr
|
||||
|
||||
Options:
|
||||
-h, --help print this help
|
||||
-b, --buildPath specify the output path where the build takes place
|
||||
-i, --ini-file specify the ini file to use
|
||||
|
||||
This script will build a complete FreeCAD distribution which includes:
|
||||
* Check out fresh source
|
||||
* packing source
|
||||
* Set the Version and Release numbers
|
||||
* Gathering change log
|
||||
* completele build FreeCAD
|
||||
* run tests
|
||||
* build source docu
|
||||
* build user docu
|
||||
* build installer
|
||||
* upload to source forge
|
||||
|
||||
On failure of one of these steps the script will stop.
|
||||
Each step writes tones of info in the log file.
|
||||
There is one error log file.
|
||||
|
||||
Autor:
|
||||
(c) 2007 Juergen Riegel
|
||||
juergen.riegel@web.de
|
||||
Licence: GPL
|
||||
|
||||
Version:
|
||||
0.1
|
||||
"""
|
||||
#
|
||||
# Its inteded only to used by the maintainer
|
||||
|
||||
import os, sys, getopt
|
||||
from subprocess import call,Popen,PIPE
|
||||
from time import sleep
|
||||
from zipfile import ZipFile,ZIP_DEFLATED
|
||||
import tarfile
|
||||
from string import find
|
||||
import ConfigParser
|
||||
import time
|
||||
|
||||
|
||||
# global information
|
||||
Release = 0
|
||||
Major = 0
|
||||
Minor = 7
|
||||
Alias = ""
|
||||
FileName = ""
|
||||
BuildPath = "D:/ReleaseBuilds"
|
||||
Log = None
|
||||
ErrLog = None
|
||||
Config = None
|
||||
|
||||
|
||||
def CallProcess(args,Msg,ret=True):
|
||||
Anim = ['-','\\','|','/']
|
||||
|
||||
sys.stdout.write(Msg+': ')
|
||||
Log.write("====== Call: " + args[0] + '\n')
|
||||
SVN = Popen(args,
|
||||
stdout=PIPE, stderr = ErrLog)
|
||||
|
||||
i = 0
|
||||
while(SVN.poll() == None):
|
||||
line = SVN.stdout.readline()
|
||||
if(line):
|
||||
Log.write(line.replace('\n',''))
|
||||
sys.stdout.write(chr(8) + Anim[i%4])
|
||||
i+=1
|
||||
sleep(0.2)
|
||||
|
||||
#ErrLog.write(SVN.stdout.read())
|
||||
sys.stdout.write(chr(8) + "done\n")
|
||||
if(not SVN.returncode == 0 and ret):
|
||||
print "Process returns: ",SVN.returncode
|
||||
raise
|
||||
|
||||
# Step 2 & 3
|
||||
def CheckOut():
|
||||
|
||||
CallProcess([Config.get('Tools','svn'),
|
||||
"checkout",
|
||||
"-r",
|
||||
`Release`,
|
||||
"https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk",
|
||||
"../"+FileName],
|
||||
"2) Checking out")
|
||||
|
||||
sys.stdout.write('3) Write version files: ')
|
||||
|
||||
Version = open("src/Build/Version.h","w")
|
||||
Version.write('#define FCVersionMajor "' + `Major` + '"\n')
|
||||
Version.write('#define FCVersionMinor "' + `Minor` + '"\n')
|
||||
Version.write('#define FCVersionName "' + Alias + '"\n')
|
||||
Version.write('#define FCRevision "' + `Release` + '"\n')
|
||||
Version.write('#define FCRepositoryURL "' + "https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk/src" + '"\n')
|
||||
Version.write('#define FCCurrentDateT "'+time.asctime()+'" \n')
|
||||
Version.close()
|
||||
|
||||
Version = open("installer/Version.wxi","w")
|
||||
Version.write('<Include> \n')
|
||||
Version.write(' <?define FCVersionMajor = ' + `Major` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionMinor = ' + `Minor` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionRevision =' + `Release` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionAlias = "' + Alias + '" ?>\n')
|
||||
Version.write('</Include> \n')
|
||||
Version.close()
|
||||
|
||||
sys.stdout.write('done\n')
|
||||
|
||||
|
||||
#Step 4
|
||||
def PackSourceZip():
|
||||
|
||||
def addAll(dirFrom, ZipSrcFile):
|
||||
for file in os.listdir(dirFrom): # for files/dirs here
|
||||
if(not file==".svn" and not file== FileName+'_source.zip'):
|
||||
pathFrom = os.path.join(dirFrom, file)
|
||||
if not os.path.isdir(pathFrom): # copy simple files
|
||||
ZipSrcFile.write(pathFrom,pathFrom.replace('.\\',FileName+'\\'))
|
||||
Log.write("Insert: "+ pathFrom + '\n')
|
||||
else:
|
||||
addAll(pathFrom,ZipSrcFile)
|
||||
|
||||
sys.stdout.write("4) Pack zip source files: ")
|
||||
|
||||
SourceFile = ZipFile(FileName+'_source.zip','w',ZIP_DEFLATED,True)
|
||||
addAll('.',SourceFile)
|
||||
SourceFile.close()
|
||||
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
# Step 5
|
||||
def PackSourceTar():
|
||||
|
||||
def addAll(dirFrom, ZipTarFile):
|
||||
for file in os.listdir(dirFrom): # for files/dirs here
|
||||
if(not file==".svn" and not file== FileName+'_source.zip'):
|
||||
pathFrom = os.path.join(dirFrom, file)
|
||||
if not os.path.isdir(pathFrom): # copy simple files
|
||||
ZipTarFile.add(pathFrom,pathFrom.replace('.\\',FileName+'\\'))
|
||||
Log.write("Insert: "+ pathFrom + '\n')
|
||||
else:
|
||||
addAll(pathFrom,ZipTarFile)
|
||||
|
||||
sys.stdout.write("5) Pack tar source files: ")
|
||||
|
||||
SourceFile = tarfile.open(FileName+'_source.tgz','w:gz')
|
||||
addAll('.',SourceFile)
|
||||
SourceFile.close()
|
||||
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
|
||||
# Step 6 & 7
|
||||
def BuildAll():
|
||||
import fcbt.FileTools
|
||||
LibPack = Config.get('Libs','FreeCADLib')
|
||||
|
||||
sys.stdout.write('6) Copy resources: ')
|
||||
os.mkdir('./bin')
|
||||
fcbt.FileTools.cpall(LibPack + '/bin','./bin')
|
||||
os.mkdir('./include')
|
||||
fcbt.FileTools.cpall(LibPack + '/include','./include')
|
||||
os.mkdir('./lib')
|
||||
fcbt.FileTools.cpall(LibPack + '/lib','./lib')
|
||||
os.mkdir('./doc')
|
||||
fcbt.FileTools.cpall(LibPack + '/doc','./doc')
|
||||
sys.stdout.write('done\n')
|
||||
|
||||
CallProcess(["BuildAll.bat"],
|
||||
"7) Build all")
|
||||
|
||||
# Step 8 & 9
|
||||
def HelpFile():
|
||||
import wiki2chm
|
||||
if not os.path.isdir('doc'):
|
||||
os.mkdir('doc')
|
||||
if not os.path.isdir('doc/tmp'):
|
||||
os.mkdir('doc/tmp')
|
||||
|
||||
CallProcess([Config.get('Tools','wget'),'-k', '-r', '-l5', '-P', 'doc/tmp', '-nd',
|
||||
'-R', '*action=*',
|
||||
'-R', '*title=Special*',
|
||||
'-R', '*title=Talk*',
|
||||
'-R', '*oldid=*',
|
||||
'-R', '*printable=yes*',
|
||||
'--domains=apps.sourceforge.net',
|
||||
'--append-output=doc/tmp/wget.log',
|
||||
'http://apps.sourceforge.net/mediawiki/free-cad/index.php?title=Online_Help_Toc'],
|
||||
"8) Download docu")
|
||||
|
||||
sys.stdout.write("9) Fix up CSS: ")
|
||||
open('doc/tmp/chm.css','w').write(open('src/Tools/chm.css').read())
|
||||
|
||||
wiki2chm.WikiBaseUrl ='http://apps.sourceforge.net/mediawiki/free-cad/'
|
||||
wiki2chm.TocPageName ='Online_Help_Toc'
|
||||
wiki2chm.BasePath ='doc/tmp/'
|
||||
wiki2chm.Output = Log
|
||||
|
||||
wiki2chm.replaceCSS()
|
||||
|
||||
wiki2chm.WriteProject()
|
||||
wiki2chm.readToc()
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
# Step 10
|
||||
def CompileHelp():
|
||||
import fcbt.FileTools
|
||||
CallProcess([Config.get('Tools','hhc'),'doc/tmp/Online_Help_Toc.hhp'],'10)Compile help:',False)
|
||||
fcbt.FileTools.cpfile('doc/tmp/FreeCAD.chm','doc/FreeCAD.chm')
|
||||
fcbt.FileTools.cpfile('doc/tmp/FreeCAD.chm',FileName+'_helpfile.chm')
|
||||
|
||||
def BuildInstaller():
|
||||
import fcbt.FileTools
|
||||
LibPack = Config.get('Libs','FreeCADLib')
|
||||
|
||||
fcbt.FileTools.cpfile('lib/Microsoft_VC80_CRT_x86.msm','installer/Microsoft_VC80_CRT_x86.msm')
|
||||
fcbt.FileTools.cpfile('lib/policy_8_0_Microsoft_VC80_CRT_x86.msm','installer/policy_8_0_Microsoft_VC80_CRT_x86.msm')
|
||||
CallProcess([Config.get('Tools','candle'),
|
||||
'-out', 'installer\\',
|
||||
'installer\\FreeCAD.wxs',
|
||||
'installer\\FreeCADBase.wxs',
|
||||
'installer\\LibPack.wxs',
|
||||
'installer\\FreeCADDoc.wxs',
|
||||
'installer\\FreeCADModules.wxs',
|
||||
],'11)Compile installer:',False)
|
||||
CallProcess([Config.get('Tools','light'),
|
||||
'-ext', 'WixUIExtension',
|
||||
'-cultures:en-us',
|
||||
'-out', 'installer\\FreeCAD.msi',
|
||||
'installer\\FreeCAD.wixobj',
|
||||
'installer\\FreeCADBase.wixobj',
|
||||
'installer\\LibPack.wixobj',
|
||||
'installer\\FreeCADDoc.wixobj',
|
||||
'installer\\FreeCADModules.wixobj',
|
||||
],'12)Build installer:',False)
|
||||
|
||||
fcbt.FileTools.cpfile('installer/FreeCAD.msi',FileName+'_installer.msi')
|
||||
|
||||
def SendFTP():
|
||||
from ftplib import FTP
|
||||
ftp = FTP('upload.sf.net')
|
||||
Log.write(ftp.login() + '\n')
|
||||
Log.write(ftp.cwd("/incoming") + '\n')
|
||||
Log.write(ftp.sendcmd('PASV') + '\n')
|
||||
Log.write(ftp.sendcmd('TYPE I') + '\n')
|
||||
sys.stdout.write('13) Send source ZIP: ')
|
||||
f = open(FileName+'_source.zip', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_source.zip', f) + '\n')
|
||||
sys.stdout.write('done\n14) Send source tgz: ')
|
||||
f = open(FileName+'_source.tgz', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_source.tgz', f) + '\n')
|
||||
sys.stdout.write('done\n15) Send installer: ')
|
||||
f = open(FileName+'_installer.msi', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_installer.msi', f) + '\n')
|
||||
f.close()
|
||||
ftp.close()
|
||||
|
||||
def main():
|
||||
global Release, Major, Minor, Alias, FileName, BuildPath, Log, ErrLog, Config
|
||||
IniFile = "BuildRelease.ini"
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "hb:", ["help","buildPath="])
|
||||
except getopt.GetoptError:
|
||||
# print help information and exit:
|
||||
sys.stderr.write(Usage)
|
||||
sys.exit(2)
|
||||
|
||||
# checking on the options
|
||||
for o, a in opts:
|
||||
if o in ("-h", "--help"):
|
||||
sys.stderr.write(Usage)
|
||||
sys.exit()
|
||||
if o in ("-b", "--buildPath"):
|
||||
BuildPath = a
|
||||
if o in ("-i", "--ini-file"):
|
||||
IniFile = a
|
||||
|
||||
|
||||
# runing through the files
|
||||
if (not len(args) == 1):
|
||||
sys.stderr.write(Usage)
|
||||
|
||||
Release = int(args[0])
|
||||
|
||||
Config = ConfigParser.ConfigParser()
|
||||
Config.readfp(open(IniFile))
|
||||
|
||||
Alias = Config.get('Version','Alias')
|
||||
Major = Config.getint('Version','Major')
|
||||
Minor = Config.getint('Version','Minor')
|
||||
|
||||
# creating the directory and switch to
|
||||
FileName = 'FreeCAD_' + `Major` + '.' + `Minor` + '.' + `Release`
|
||||
print "=== Building:", FileName, '\n'
|
||||
BuildPath = BuildPath + '/' + FileName
|
||||
# set tool path
|
||||
sys.path.append((BuildPath + '/src/Tools') )
|
||||
OldCwd = os.getcwd()
|
||||
print "1) Creating Build directory: ", BuildPath
|
||||
if not os.path.isdir(BuildPath):
|
||||
os.mkdir(BuildPath)
|
||||
os.chdir(BuildPath)
|
||||
Log = open("BuildRelease.log","w")
|
||||
ErrLog = open("BuildReleaseErrors.log","w")
|
||||
|
||||
try:
|
||||
CheckOut()
|
||||
PackSourceZip()
|
||||
PackSourceTar()
|
||||
BuildAll()
|
||||
HelpFile()
|
||||
CompileHelp()
|
||||
BuildInstaller()
|
||||
#SendFTP()
|
||||
except:
|
||||
Log.close()
|
||||
ErrLog.close()
|
||||
Err = open("BuildReleaseErrors.log","r")
|
||||
sys.stderr.write("!!!!!!!!! Fehler aufgetreten:\n")
|
||||
sys.stderr.write(Err.read())
|
||||
raise
|
||||
|
||||
os.chdir(OldCwd)
|
||||
Log.close()
|
||||
ErrLog.close()
|
||||
|
||||
print "Press any key"
|
||||
sys.stdin.readline()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+785
-65
@@ -1,94 +1,814 @@
|
||||
# March 2021, the oldest we have to support : Ununtu 18.04 LTS
|
||||
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
|
||||
project(FreeCAD_trunk)
|
||||
set(FREECAD_VERSION "0.15")
|
||||
|
||||
# policy CMP0072 was introduced with CMake 3.11
|
||||
# relates to FindOpenGL module
|
||||
# and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY
|
||||
if (POLICY CMP0072)
|
||||
cmake_policy(SET CMP0072 OLD)
|
||||
endif(POLICY CMP0072)
|
||||
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
||||
project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_NAME "Vulcan")
|
||||
set(PACKAGE_NAME "FreeCAD")
|
||||
set(PACKAGE_VERSION_MAJOR "0")
|
||||
set(PACKAGE_VERSION_MINOR "20")
|
||||
set(PACKAGE_VERSION_PATCH "0")
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
|
||||
set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
|
||||
set(PACKAGE_VERSION_MINOR "15")
|
||||
set(PACKAGE_VERSION_PATCH "4664")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
|
||||
# include local modules
|
||||
include(CheckCXXCompilerFlag)
|
||||
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
# added in cmake 3.0
|
||||
if(POLICY CMP0050)
|
||||
cmake_policy(SET CMP0050 OLD)
|
||||
endif(POLICY CMP0050)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
# include local modules
|
||||
include(AddFileDependencies)
|
||||
include(cMake/FreeCadMacros.cmake)
|
||||
# include helper functions/macros
|
||||
add_subdirectory(cMake/FreeCAD_Helpers)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
|
||||
|
||||
|
||||
#if(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
# No Debug/Release output paths
|
||||
set(DEBUG_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
set(RELEASE_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
#else(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
# set(DEBUG_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/src/Main/Debug)
|
||||
# set(RELEASE_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/src/Main/Release)
|
||||
#endif(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
|
||||
if(WIN32)
|
||||
set(PLATFORM_CP xcopy /Y /S)
|
||||
set(PLATFORM_MK mkdir)
|
||||
else(WIN32)
|
||||
set(PLATFORM_CP cp)
|
||||
set(PLATFORM_MK mkdir -p)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
# ================================================================================
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX TRUE)
|
||||
endif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
include(cMake/ConfigureChecks.cmake)
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-write-strings")
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||
if(UNIX)
|
||||
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
||||
endif(UNIX)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
|
||||
|
||||
# ================================================================================
|
||||
# Output directories for install target
|
||||
|
||||
if(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
|
||||
else(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
|
||||
endif(WIN32)
|
||||
|
||||
SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
|
||||
SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||
# Don't set it without manual adaption of LibDir variable in src/App/FreeCADInit.py
|
||||
SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
endif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(NOT WIN32)
|
||||
|
||||
SET(PYCXX_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||
SET(PYCXX_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||
|
||||
# used as compiler defines
|
||||
SET(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
|
||||
SET(DOCDIR "${CMAKE_INSTALL_DOCDIR}")
|
||||
|
||||
MESSAGE(STATUS "prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
MESSAGE(STATUS "datadir: ${CMAKE_INSTALL_DATADIR}")
|
||||
MESSAGE(STATUS "docdir: ${CMAKE_INSTALL_DOCDIR}")
|
||||
MESSAGE(STATUS "includedir: ${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
MESSAGE(STATUS "libdir: ${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
# ==============================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
OPTION(FREECAD_RELEASE_PDB "Create PDB file for Release version." OFF)
|
||||
OPTION(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
|
||||
OPTION(FREECAD_LIBPACK_USEPYSIDE "Use PySide in LibPack rather to PyQt and Swig." ON)
|
||||
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
else(MSVC)
|
||||
OPTION(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif(MSVC)
|
||||
|
||||
# ==============================================================================
|
||||
# == All the options for the build process ============
|
||||
|
||||
OPTION(BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line and the Python import module." ON)
|
||||
OPTION(FREECAD_MAINTAINERS_BUILD "Build FreeCAD for Maintainers, with Docu and 3rd party libs. On Windows the Installer is build." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
|
||||
if(APPLE)
|
||||
OPTION(FREECAD_CREATE_MAC_APP "Create app bundle on install" OFF)
|
||||
|
||||
if(FREECAD_CREATE_MAC_APP)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}/src/MacAppBundle/FreeCAD.app
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/FreeCAD.app/Contents)
|
||||
SET(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif(FREECAD_CREATE_MAC_APP)
|
||||
endif(APPLE)
|
||||
|
||||
OPTION(BUILD_CAM "Build the FreeCAD CAM module and the needed libs, be aware, unfinished code!" OFF)
|
||||
OPTION(BUILD_FEM "Build the FreeCAD FEM module, be aware, unfinished code!" ON)
|
||||
OPTION(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
|
||||
OPTION(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
|
||||
OPTION(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
|
||||
OPTION(BUILD_ASSEMBLY "Build the FreeCAD Assembly module" OFF)
|
||||
OPTION(BUILD_COMPLETE "Build the FreeCAD complete module" ON)
|
||||
OPTION(BUILD_DRAFT "Build the FreeCAD draft module" ON)
|
||||
OPTION(BUILD_DRAWING "Build the FreeCAD drawing module" ON)
|
||||
OPTION(BUILD_IDF "Build the FreeCAD idf module" ON)
|
||||
OPTION(BUILD_IMAGE "Build the FreeCAD image module" ON)
|
||||
OPTION(BUILD_IMPORT "Build the FreeCAD import module" ON)
|
||||
OPTION(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
OPTION(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
OPTION(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
OPTION(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
OPTION(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
OPTION(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON)
|
||||
OPTION(BUILD_PART "Build the FreeCAD part module" ON)
|
||||
OPTION(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON)
|
||||
OPTION(BUILD_PLOT "Build the FreeCAD plot module" ON)
|
||||
OPTION(BUILD_POINTS "Build the FreeCAD points module" ON)
|
||||
OPTION(BUILD_RAYTRACING "Build the FreeCAD ray tracing module" ON)
|
||||
OPTION(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
|
||||
OPTION(BUILD_ROBOT "Build the FreeCAD robot module" ON)
|
||||
OPTION(BUILD_SHIP "Build the FreeCAD ship module" ON)
|
||||
OPTION(BUILD_SKETCHER "Build the FreeCAD sketcher module" ON)
|
||||
OPTION(BUILD_SPREADSHEET "Build the FreeCAD spreadsheet module" ON)
|
||||
OPTION(BUILD_START "Build the FreeCAD start module" ON)
|
||||
OPTION(BUILD_TEST "Build the FreeCAD test module" ON)
|
||||
OPTION(BUILD_WEB "Build the FreeCAD web module" ON)
|
||||
OPTION(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
|
||||
|
||||
if(MSVC)
|
||||
OPTION(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
OPTION(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" OFF)
|
||||
OPTION(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
else(MSVC)
|
||||
set(FREECAD_USE_3DCONNEXION OFF)
|
||||
OPTION(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
OPTION(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
OPTION(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." ON)
|
||||
endif(MSVC)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON)
|
||||
set(FREECAD_USE_EXTERNAL_PIVY ON)
|
||||
# A Debian package for SMESH doesn't exist
|
||||
#set(FREECAD_USE_EXTERNAL_SMESH ON)
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
# ==============================================================================
|
||||
#inter-module dependencies
|
||||
|
||||
#took these from Mod/Complete/App/AppComplete.cpp. appears to be working.
|
||||
if(BUILD_COMPLETE)
|
||||
set(BUILD_MESH ON)
|
||||
set(BUILD_POINTS ON)
|
||||
set(BUILD_DRAWING ON)
|
||||
set(BUILD_RAYTRACING ON)
|
||||
set(BUILD_PART_DESIGN ON)
|
||||
set(BUILD_IMAGE ON)
|
||||
set(BUILD_DRAFT ON)
|
||||
endif(BUILD_COMPLETE)
|
||||
|
||||
#inferred from .py files. appears to be working.
|
||||
if(BUILD_ARCH)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_MESH ON)
|
||||
set(BUILD_DRAFT ON)
|
||||
endif(BUILD_ARCH)
|
||||
|
||||
#inferred from .py files. appears to be working.
|
||||
if(BUILD_OPENSCAD)
|
||||
set(BUILD_MESH_PART ON)
|
||||
set(BUILD_DRAFT ON)
|
||||
endif(BUILD_OPENSCAD)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_INSPECTION)
|
||||
set(BUILD_MESH ON)
|
||||
set(BUILD_POINTS ON)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_INSPECTION)
|
||||
|
||||
#inferred from .py files. appears to be working.
|
||||
if(BUILD_SHIP)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_PLOT ON)
|
||||
set(BUILD_IMAGE ON)
|
||||
endif(BUILD_SHIP)
|
||||
|
||||
#inferred from .py files. appears to be working.
|
||||
if(BUILD_SPREADSHEET)
|
||||
set(BUILD_DRAFT ON)
|
||||
endif(BUILD_SPREADSHEET)
|
||||
|
||||
#this has been tested. appears to be working.
|
||||
if(BUILD_DRAFT)
|
||||
set(BUILD_SKETCHER ON)
|
||||
endif(BUILD_DRAFT)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_PART_DESIGN)
|
||||
set(BUILD_SKETCHER ON)
|
||||
endif(BUILD_PART_DESIGN)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_REVERSEENGINEERING)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_MESH ON)
|
||||
endif(BUILD_REVERSEENGINEERING)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_MESH_PART)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_MESH ON)
|
||||
set(BUILD_SMESH ON)
|
||||
endif(BUILD_MESH_PART)
|
||||
|
||||
#inferred from cmakelists.txt. build errors. obsolete?
|
||||
if(BUILD_CAM)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_MESH ON)
|
||||
endif(BUILD_CAM)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_RAYTRACING)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_RAYTRACING)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_DRAWING)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_DRAWING)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_ROBOT)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_ROBOT)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_SKETCHER)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_SKETCHER)
|
||||
|
||||
#inferred from .py files. built, but not sure how to test.
|
||||
if(BUILD_IDF)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_IDF)
|
||||
|
||||
#inferred from cmakelists.txt. built, but not sure how to test.
|
||||
if(BUILD_IMPORT)
|
||||
set(BUILD_PART ON)
|
||||
endif(BUILD_IMPORT)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_FEM)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_SMESH ON)
|
||||
endif(BUILD_FEM)
|
||||
|
||||
#inferred from cmakelists.txt. appears to be working.
|
||||
if(BUILD_SANDBOX)
|
||||
set(BUILD_PART ON)
|
||||
set(BUILD_MESH ON)
|
||||
endif(BUILD_SANDBOX)
|
||||
|
||||
#inferred from header includes. not tested.
|
||||
if(BUILD_JTREADER)
|
||||
set(BUILD_MESH ON)
|
||||
endif(BUILD_JTREADER)
|
||||
|
||||
#leaving test module for someone else.
|
||||
#image has none. as far as I can tell.
|
||||
#mesh has none. as far as I can tell.
|
||||
#part has none. as far as I can tell.
|
||||
#material has none. as far as I can tell.
|
||||
#web has none. as far as I can tell.
|
||||
#start has none. as far as I can tell.
|
||||
#assembly has none. as far as I can tell.
|
||||
#plot has none. as far as I can tell.
|
||||
#points has none. as far as I can tell
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
|
||||
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE6X boost_program_options-vc80-mt-gd.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE7X boost_program_options-vc90-mt-gd-1_39.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE8X boost_program_options-vc90-mt-gd-1_48.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE9X boost_program_options-vc90-mt-gd-1_54.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE10X boost_program_options-vc110-mt-1_55.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKCUSTOM boost_program_options-vc90-mt-gd-1_41.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
|
||||
|
||||
# don't show them in the GUI
|
||||
set(FREECAD_LIBPACK_CHECKFILE6X "${FREECAD_LIBPACK_CHECKFILE6X}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE7X "${FREECAD_LIBPACK_CHECKFILE7X}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE8X "${FREECAD_LIBPACK_CHECKFILE8X}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE9X "${FREECAD_LIBPACK_CHECKFILE9X}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE10X "${FREECAD_LIBPACK_CHECKFILE10X}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKCUSTOM "${FREECAD_LIBPACK_CHECKCUSTOM}" CACHE INTERNAL "Find libpack")
|
||||
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
|
||||
|
||||
IF(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPackCLbundler.cmake)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE6X)
|
||||
set(FREECAD_LIBPACK_VERSION "6.x" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPack6x.cmake)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE7X)
|
||||
set(FREECAD_LIBPACK_VERSION "7.x" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPack7x.cmake)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE8X)
|
||||
set(FREECAD_LIBPACK_VERSION "8.x" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPack8x.cmake)
|
||||
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/tools/swigwin-1.3.40/swig.exe CACHE STRING "Swig" FORCE)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE9X)
|
||||
set(FREECAD_LIBPACK_VERSION "9.x" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPack9x.cmake)
|
||||
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/tools/swigwin-2.0.11/swig.exe CACHE STRING "Swig" FORCE)
|
||||
set(FREECAD_USE_EXTERNAL_PIVY ON CACHE BOOL "Switch off local pivy" FORCE)
|
||||
set(FREECAD_LIBPACK_PYSIDEUIC_REL "${FREECAD_LIBPACK_DIR}/pyside-tools/Lib/site-packages")
|
||||
file(GLOB FREECAD_LIBPACK_PIVY_COIN "${FREECAD_LIBPACK_DIR}/pivy/*.*")
|
||||
file(GLOB FREECAD_LIBPACK_SHIBOKEN "${FREECAD_LIBPACK_DIR}/shiboken-1.2.1/lib/site-packages/*.pyd")
|
||||
file(GLOB FREECAD_LIBPACK_PYSIDE "${FREECAD_LIBPACK_DIR}/pyside/lib/site-packages/PySide/*.py*")
|
||||
file(GLOB_RECURSE FREECAD_LIBPACK_PYSIDEUIC RELATIVE "${FREECAD_LIBPACK_PYSIDEUIC_REL}" "${FREECAD_LIBPACK_PYSIDEUIC_REL}/pysideuic/*.py")
|
||||
file(GLOB FREECAD_LIBPACK_PYTHON "${FREECAD_LIBPACK_DIR}/bin/*.py*")
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE10X)
|
||||
set(FREECAD_LIBPACK_VERSION "10.x" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPack10x.cmake)
|
||||
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/tools/swigwin-3.0.2/swig.exe CACHE STRING "Swig" FORCE)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKCUSTOM)
|
||||
set(FREECAD_LIBPACK_VERSION "Custom" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPackCustom.cmake)
|
||||
ELSE(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
ENDIF(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
|
||||
# -------------------------------- PyCXX --------------------------------
|
||||
|
||||
CompilerChecksAndSetups()
|
||||
ConfigureCMakeVariables()
|
||||
InitializeFreeCADBuildOptions()
|
||||
CheckInterModuleDependencies()
|
||||
FreeCADLibpackChecks()
|
||||
SetupDoxygen()
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
SetupPython()
|
||||
SetupPCL()
|
||||
SetupPybind11()
|
||||
SetupXercesC()
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PyCXX REQUIRED)
|
||||
SetupOpenCasCade()
|
||||
if(BUILD_GUI)
|
||||
# Do this before the check for SMESH because it depends on vtk
|
||||
# that may have its own OpenGL check but possibly fails and leaves
|
||||
# OPENGL_gl_LIBRARY empty that results into linker errors
|
||||
SetupOpenGL()
|
||||
endif(BUILD_GUI)
|
||||
SetupSalomeSMESH()
|
||||
SetupBoost()
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
IF(NOT SWIG_FOUND)
|
||||
MESSAGE("SWIG was not found, build no SWIG binding for pivy")
|
||||
ENDIF(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Shiboken/PySide ------------------------
|
||||
|
||||
find_package(PySideTools REQUIRED) # Pyside utilities (pyside-uic & pyside-rcc)
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
endif()
|
||||
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
|
||||
# ================================================================================
|
||||
# == for other OSes search the packages ==========================================
|
||||
|
||||
|
||||
# -------------------------------- Python --------------------------------
|
||||
|
||||
|
||||
#http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
|
||||
set(Python_ADDITIONAL_VERSIONS "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9")
|
||||
find_package(PythonInterp REQUIRED)
|
||||
IF (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
ELSE (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
||||
ENDIF(NOT DEFINED PYTHON_VERSION_STRING)
|
||||
|
||||
IF(NOT PYTHONLIBS_FOUND)
|
||||
MESSAGE("Python not found, install python!")
|
||||
ENDIF(NOT PYTHONLIBS_FOUND)
|
||||
|
||||
# -------------------------------- pcl ----------------------------------
|
||||
#PCL needs to be found before boost because the PCLConfig also calls find_package(Boost ...),
|
||||
#but with different components
|
||||
if(FREECAD_USE_PCL)
|
||||
find_package(PCL REQUIRED COMPONENTS common kdtree features surface io)
|
||||
endif(FREECAD_USE_PCL)
|
||||
|
||||
# -------------------------------- Boost --------------------------------
|
||||
|
||||
SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.41.0" "1.39.0" "1.38.0" "1.37.0"
|
||||
"1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34"
|
||||
"1.33.1" "1.33.0" "1.33" )
|
||||
|
||||
find_package(Boost COMPONENTS filesystem program_options regex signals system thread REQUIRED)
|
||||
|
||||
# -------------------------------- XercesC --------------------------------
|
||||
|
||||
find_package(XercesC REQUIRED)
|
||||
|
||||
# -------------------------------- ZLIB --------------------------------
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
# -------------------------------- PyCXX --------------------------------
|
||||
|
||||
find_package(PyCXX REQUIRED)
|
||||
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
find_package(OpenCasCade)
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
IF(OCC_FOUND)
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
else()
|
||||
find_package(SMESH)
|
||||
if(NOT SMESH_FOUND)
|
||||
message(ERROR "SMESH was not found.")
|
||||
endif()
|
||||
include_directories(${SMESH_INCLUDE_DIR})
|
||||
endif()
|
||||
set(SMESH_FOUND TRUE)
|
||||
ENDIF(OCC_FOUND)
|
||||
|
||||
# -------------------------------- Netgen --------------------------------
|
||||
|
||||
if (BUILD_FEM_NETGEN)
|
||||
find_package(NETGEN)
|
||||
endif(BUILD_FEM_NETGEN)
|
||||
|
||||
# -------------------------------- OpenCV --------------------------------
|
||||
|
||||
# not needed at the moment
|
||||
#find_package(OpenCV REQUIRED)
|
||||
SetupSwig()
|
||||
SetupEigen()
|
||||
# This file is included directly due to some cMake macros that are defined within.
|
||||
# If these macro definitions are embedded within another macro, it causes problems.
|
||||
include(cMake/FreeCAD_Helpers/SetupQt.cmake)
|
||||
SetupFreetype()
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
IF(NOT SWIG_FOUND)
|
||||
MESSAGE("SWIG was not found, build no SWIG binding for pivy")
|
||||
ENDIF(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Eigen --------------------------------
|
||||
|
||||
find_package(Eigen3)
|
||||
|
||||
# -------------------------------- ODE ----------------------------------
|
||||
|
||||
# find_package(ODE)
|
||||
|
||||
# -------------------------------- Qt --------------------------------
|
||||
|
||||
# sets ${QT_LIBRARIES}
|
||||
|
||||
SET(QT_MIN_VERSION 4.5.0)
|
||||
set(QT_USE_QTNETWORK TRUE)
|
||||
set(QT_USE_QTXML TRUE)
|
||||
if(BUILD_GUI)
|
||||
set(QT_USE_QTOPENGL TRUE)
|
||||
set(QT_USE_QTSVG TRUE)
|
||||
set(QT_USE_QTUITOOLS TRUE)
|
||||
set(QT_USE_QTWEBKIT TRUE)
|
||||
endif(BUILD_GUI)
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
include(${QT_USE_FILE})
|
||||
|
||||
IF(NOT QT4_FOUND)
|
||||
MESSAGE("Library qt-4.3 or above is not available, install QT or FreeCAD Gui version will not be built")
|
||||
ENDIF(NOT QT4_FOUND)
|
||||
|
||||
IF(NOT QT_QTWEBKIT_FOUND)
|
||||
MESSAGE("Qt Webkit not found, will not build browser integration!")
|
||||
ENDIF(NOT QT_QTWEBKIT_FOUND)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
# get include dirs
|
||||
QT4_GET_MOC_FLAGS(moc_flags)
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
set(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
#--------------------FreeType-----------------------
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
find_package(Freetype)
|
||||
if(NOT FREETYPE_FOUND)
|
||||
MESSAGE("FreeType2 library is not available. Part module will lack of makeWireString().")
|
||||
endif(NOT FREETYPE_FOUND)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
#---------------------------------------------------
|
||||
|
||||
if(BUILD_GUI)
|
||||
SetupCoin3D()
|
||||
SetupSpaceball()
|
||||
SetupShibokenAndPyside()
|
||||
SetupMatplotlib()
|
||||
# -------------------------------- OpenGL --------------------------------
|
||||
|
||||
find_package(OpenGL)
|
||||
include(FindPackageMessage)
|
||||
if(OPENGL_GLU_FOUND)
|
||||
find_package_message(OPENGL_GLU
|
||||
"Found OpenGLU: ${OPENGL_glu_LIBRARY}"
|
||||
"[${OPENGL_glu_LIBRARY}][${OEPNGL_INCLUDE_DIR}]")
|
||||
else(OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "The GLU library is required. Make sure it is installed.")
|
||||
endif(OPENGL_GLU_FOUND)
|
||||
|
||||
# -------------------------------- Coin3D --------------------------------
|
||||
|
||||
find_package(Coin3D REQUIRED)
|
||||
|
||||
# ------------------------------ Spaceball -------------------------------
|
||||
|
||||
if (WIN32)
|
||||
#future
|
||||
else(WIN32)
|
||||
find_package(Spnav)
|
||||
endif(WIN32)
|
||||
|
||||
# -------------------------------- Shiboken/PySide ------------------------
|
||||
|
||||
# set(PYTHON_SUFFIX -python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
SET(PYTHON_SUFFIX -python2.7) # for shiboken
|
||||
SET(PYTHON_BASENAME -python2.7) # for PySide
|
||||
find_package(Shiboken REQUIRED)
|
||||
find_package(PySide REQUIRED)
|
||||
find_package(PySideTools REQUIRED) # Pyside utilities (pyside-uic & pyside-rcc)
|
||||
|
||||
# ------------------------------ Matplotlib ------------------------------
|
||||
|
||||
find_package(Matplotlib)
|
||||
IF(MATPLOTLIB_FOUND)
|
||||
message(STATUS "-- matplotlib-${MATPLOTLIB_VERSION} has been found.")
|
||||
ELSE(MATPLOTLIB_FOUND)
|
||||
message("-- matplotlib not found, Plot module won't be available!")
|
||||
ENDIF(MATPLOTLIB_FOUND)
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
||||
endif(BUILD_GUI)
|
||||
|
||||
|
||||
endif(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
|
||||
if(BUILD_VR)
|
||||
find_package(Rift)
|
||||
endif(BUILD_VR)
|
||||
|
||||
SetLibraryVersions()
|
||||
SetGlobalCompilerAndLinkerSettings()
|
||||
# copy build convenient files for M$
|
||||
if(WIN32)
|
||||
if (EXISTS BuildAll.bat)
|
||||
configure_file(BuildAll.bat ${CMAKE_BINARY_DIR}/BuildAll.bat COPYONLY)
|
||||
endif (EXISTS BuildAll.bat)
|
||||
#configure_file(BuildAllNice.bat ${CMAKE_BINARY_DIR}/BuildAllNice.bat COPYONLY)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
|
||||
|
||||
# ================================================================================
|
||||
# == Global Compiler and Linker Settings =========================================
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# check for 64-bit platform
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
MESSAGE(STATUS "Platform is 64-bit, set -D_OCC64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OCC64")
|
||||
add_definitions(-D_OCC64 )
|
||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
MESSAGE(STATUS "Platform is 32-bit")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
|
||||
|
||||
IF(MSVC)
|
||||
# set default compiler settings
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG /Zm128")
|
||||
# set default libs
|
||||
SET (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
IF(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
ENDIF(FREECAD_RELEASE_PDB)
|
||||
|
||||
# Mark 32 bit executables large address aware so they can use > 2GB address space
|
||||
# NOTE: This setting only has an effect on machines with at least 3GB of RAM, although it sets the linker option it doesn't set the the linker switch 'Enable Large Addresses'
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
ELSE(MSVC)
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
#MESSAGE(STATUS "DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
ENDIF(MSVC)
|
||||
IF(MINGW)
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
|
||||
# Actually '-Wno-inline-dllimport' should work to suppress warnings of the form:
|
||||
# inline function 'foo' is declared as dllimport: attribute ignored
|
||||
# But it doesn't work with MinGW gcc 4.5.0 while using '-Wno-attributes' seems to
|
||||
# do the trick.
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads -Wno-attributes")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads -Wno-attributes")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
|
||||
# http://stackoverflow.com/questions/8375310/warning-auto-importing-has-been-activated-without-enable-auto-import-specifie
|
||||
# SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
LINK_LIBRARIES(-lgdi32)
|
||||
ENDIF(MINGW)
|
||||
# 0000661: cmake build on Mac OS: dealing with dylib versus so
|
||||
IF(APPLE)
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# force build directory to be different to source directory
|
||||
#if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
#MESSAGE(SEND_ERROR "The build directory (${CMAKE_BINARY_DIR}) must be different to the source directory "
|
||||
# "(${CMAKE_SOURCE_DIR}). Please choose another build directory!")
|
||||
#elseif()
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(data)
|
||||
#endif()
|
||||
|
||||
BuildAndInstallDesignerPlugin()
|
||||
# ================================================================================
|
||||
# == Packaging ===================================================================
|
||||
if(FREECAD_MAINTAINERS_BUILD AND NOT WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An extensible Open Source CAx program")
|
||||
set(CPACK_PACKAGE_VENDOR "FreeCAD development team")
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.Win32")
|
||||
else(WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.Linux")
|
||||
endif(WIN32)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/copying.lib")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION_PATCH})
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
|
||||
|
||||
CreatePackagingTargets()
|
||||
#for debian: 'cmake .. -DFREECAD_MAINTAINERS_BUILD=TRUE -DCPACK_GENERATOR="DEB"'
|
||||
IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(PKG_ARCH i386)
|
||||
ELSE( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(PKG_ARCH amd64)
|
||||
ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python, oce | opencascade, libqtgui4, libcoin60, libxerces-c3.1, zlib1g, libboost-dev, libeigen2-dev")
|
||||
set(CPACK_PACKAGE_CONTACT "<root@localhost>")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}_${PKG_ARCH}")
|
||||
|
||||
PrintFinalReport()
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
else(WIN32)
|
||||
if( CPACK_GENERATOR STREQUAL "" )
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif()
|
||||
endif(WIN32)
|
||||
file(GLOB DOT ".*")
|
||||
file(GLOB TILD "*~")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"${DOT}"
|
||||
"${TILD}"
|
||||
".a$"
|
||||
".am$"
|
||||
".in$"
|
||||
".bat$"
|
||||
".o$"
|
||||
".so$"
|
||||
".m4$"
|
||||
"/_build/"
|
||||
"/_cmake/"
|
||||
"/.deps/"
|
||||
"/.svn/"
|
||||
"/CMakeFiles/"
|
||||
"/CVS/"
|
||||
"/autom4te.cache/"
|
||||
"/build/"
|
||||
"/debian/"
|
||||
"/debug/"
|
||||
"/docs/"
|
||||
"/m4/"
|
||||
"/qt-build/"
|
||||
"/CxImage/"
|
||||
"/WindowsInstaller/"
|
||||
"AdditionalInfo.txt$"
|
||||
"CMakeCache.txt$"
|
||||
"Makefile$"
|
||||
"\\\\.sh$"
|
||||
"_CPack_"
|
||||
"config.h$"
|
||||
"config.log$"
|
||||
"config.status$"
|
||||
"configure$"
|
||||
"configure.ac$"
|
||||
"Doxyfile"
|
||||
"html$"
|
||||
"stamp-h1$"
|
||||
".swp$"
|
||||
"tar.bz2"
|
||||
"tar.gz"
|
||||
"~$"
|
||||
)
|
||||
#set(CPACK_SOURCE_IGNORE_FILES
|
||||
# ${CPACK_SOURCE_IGNORE_FILES}
|
||||
# "/Pivy-0.5/"
|
||||
#)
|
||||
set(CPACK_SOURCE_STRIP_FILES "")
|
||||
include(CPack)
|
||||
|
||||
#ADD_CUSTOM_TARGET(DIST make package_source)
|
||||
|
||||
endif(FREECAD_MAINTAINERS_BUILD AND NOT WIN32)
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --dfsg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --dfsg --check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# FreeCAD Project Code of Conduct
|
||||
|
||||
## Statement
|
||||
|
||||
The FreeCAD Project community covers people from a wide variety of countries,
|
||||
backgrounds and positions. This global diversity is a great strength of the
|
||||
project, but can also lead to communication issues, which may in turn cause
|
||||
unhappiness. To maximise happiness of the project community taken as a whole,
|
||||
all members (whether users, contributors or committers) are expected to abide
|
||||
by the project's code of conduct. At a high level the code can be summarized
|
||||
as *"be excellent to each other"*. Expanding on this:
|
||||
|
||||
* **Be respectful**: disagreements between people are to be expected and are
|
||||
usually the sign of healthy debate and engagement. Disagreements can lead to
|
||||
frustration and even anger for some members. Turning to personal insults,
|
||||
intimidation or threatening behaviour does not improve the situation though.
|
||||
Participants should thus take care to ensure all communications /
|
||||
interactions stay professional at all times.
|
||||
|
||||
* **Be considerate**: remember that the community has members with a diverse
|
||||
background many of whom have English as a second language. What might appear
|
||||
impolite, may simply be a result of a lack of knowledge of the English
|
||||
language. Bear in mind that actions will have an impact on other community
|
||||
members and the project as a whole, so take potential consequences into
|
||||
account before pursuing a course of action.
|
||||
|
||||
* **Be forgiving**: humans are fallible and as such prone to make mistakes and
|
||||
inexplicably change their positions at times. Don't assume that other members
|
||||
are acting with malicious intent. Be prepared to forgive people who make
|
||||
mistakes and assist each other in learning from them. Playing a blame game
|
||||
doesn't help anyone.
|
||||
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting any of the community admins or moderators at
|
||||
https://forum.freecadweb.org/memberlist.php?mode=team . All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
and the [libvirt Code of Conduct][libvirtcoc], available at https://libvirt.org/governance.html.
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[libvirtcoc]: https://libvirt.org/governance.html
|
||||
|
||||
For answers to common questions about the Contributor Covenant, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
+27
-26
@@ -1,9 +1,10 @@
|
||||
Note: Future changelog now located at: http://www.freecadweb.org/tracker/changelog_page.php
|
||||
Changelog you find now here:
|
||||
http://www.freecadweb.org/tracker/changelog_page.php
|
||||
|
||||
Version: 0.14
|
||||
* Python path messed up after installation
|
||||
* Installing 0.14 breaks previous python installation
|
||||
* Python function to retrieve direct children of a shape using TopoDS_Iterator
|
||||
* Python function to retrive direct children of a shape using TopoDS_Iterator
|
||||
* Update translations for 0.14
|
||||
* FreeCAD crashes when changing placement of sketch.
|
||||
* Sketcher 180-deg-constraints should not be allowed for lines without intersection point.
|
||||
@@ -48,7 +49,7 @@ Version: 0.14
|
||||
* Hide all objects in a group
|
||||
* Part::TopoShape::getMemSize fails for Bezier Curves
|
||||
* icons not showing in Part Loft and sweep dialogues
|
||||
* Drawing SVG output makes ever knot symmetrical.
|
||||
* Drawing SVG output makes ever knot symetrical.
|
||||
* Part Common fails with two surface objects
|
||||
* Teigha File Converter not found, DWG support will be disabled.
|
||||
* recognize remote branches for Version.h in detached head state
|
||||
@@ -61,10 +62,10 @@ Version: 0.14
|
||||
* Draft Dimensions due not observe Dimension Precision on FreeCAD Windows
|
||||
* invalid DXF export
|
||||
* Port wiki, phpbb and mantis to self-hosted
|
||||
* Crash probably in MeshPart
|
||||
* Crash propably in MeshPart
|
||||
* Part.BSplineCurve: allow to set degree and mutliplicites when calling constructor.
|
||||
* FeaturePython objects should be able to define how POVray output is generated
|
||||
* Losing Snap when Object is getting more complex.
|
||||
* Loosing Snap when Object is getting more complex.
|
||||
* PropertyLinkSubList causes crash
|
||||
* BRepPrimAPI_MakeRevolution vs BRepPrimAPI_MakeRevol
|
||||
* plane offset precision is limited to 0.1
|
||||
@@ -310,7 +311,7 @@ Version: V0.5B8 Date: Tue Aug 01 2006 +++++++++++++++++++++++++++++++
|
||||
* Allow to open a project file even if not everything can be loaded e.g. if a module is missing
|
||||
* Select name if a file instead of directory was given in FileDialog's getOpenFileName() or getSaveFileName() methods
|
||||
* Bug fixed in harmonizing normals of a mesh
|
||||
* speed up a lot several algorithms that searches for independent components of a mesh or searches for inhomogenous normals
|
||||
* speed up a lot several algorithms that searches for independant components of a mesh or searches for inhomogenous normals
|
||||
* make MeshKernel::VisitNeighbourFacets() more robust against topologic errors in mesh
|
||||
* Option added to do one- or two-side rendering of meshes
|
||||
* Dialog to enter numbers higher than the maximum of int's, i.e numbers up to 4294967295
|
||||
@@ -332,7 +333,7 @@ Version: V0.5B7 Date: Thu May 18 2006 +++++++++++++++++++++++++++++++
|
||||
* added new ViewProvider for meshes with more than 100.000 triangles using SoFCMeshNode for optimizations
|
||||
* save/restore of view providers into/from a separate XML file in a project file
|
||||
* check if project file exists when loading from command line
|
||||
* using grid to speed up cutting algorithm for huge meshes
|
||||
* using grid to speed up cutting algoritm for huge meshes
|
||||
* calculate inverse color of mesh color for open edges
|
||||
* added project properties to App::Document
|
||||
* added material property class
|
||||
@@ -429,7 +430,7 @@ Version: V0.5B5 Date: Sat Feb 25 2006 +++++++++++++++++++++++++++++++
|
||||
* Return the edge list by reference in mesh kernel (to avoid memory leak)
|
||||
* PropertyVectorList implemented
|
||||
* Use PropertyVectorLists and PropertyFloatLists in Mesh::Curvature feature and its associated view provider
|
||||
* PropertyColor(List) implemented
|
||||
* PropertyColor(List) implemeted
|
||||
* PropertyMeshKernel added
|
||||
* move all Projects to NODEFAULTLIBS
|
||||
* move all Projects to xcopy
|
||||
@@ -556,9 +557,9 @@ Version: V0.1B117 Date: Sun Mar 20 14:06:55 2005 +++++++++++++++++++++++++++++++
|
||||
* Viewprovider for meshes added
|
||||
* Integration of latest Image module source
|
||||
* RFE 1159671 implemented (elements in alphabetic order)
|
||||
* Finishing drag&drop multiple files
|
||||
* Finishing open from command line and dropping on Program icon
|
||||
* solving load dependent modules
|
||||
* Finishing drag&drop multible files
|
||||
* Finishing open from command line and droping on Programm icon
|
||||
* solving load dependand modules
|
||||
* more convenient Python console
|
||||
* Bug 1149706 fixed (Cannot load CAD curves)
|
||||
* RFE 1214187 implemented (Remove views from main window)
|
||||
@@ -607,7 +608,7 @@ Version: V0.1B109 Date: Mon Jan 24 11:13:15 2005 +++++++++++++++++++++++++++++++
|
||||
- SetStatus and GetStatus switch on or off the observer
|
||||
|
||||
Version: V0.1B108 Date: Sat Jan 15 14:24:52 2005 +++++++++++++++++++++++++++++++
|
||||
* Moved HtmlView to HelpView * Reimplementation
|
||||
* Moved HtmlView to HelpView * Reimplementaion
|
||||
* Added class FileChooser ( line edit with button on its right side to browse)
|
||||
* Merged pref. page "Help viewer" and "Online Help" to one page
|
||||
* TextEdit class with completion
|
||||
@@ -659,7 +660,7 @@ Version: V0.1B101 Date: Thu Dec 02 22:32:22 2004 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B100 Date: Mon Nov 29 19:40:56 2004 +++++++++++++++++++++++++++++++
|
||||
* set up new exception handling for python call back
|
||||
* implement std property access in App::Feature
|
||||
* implement std property acces in App::Feature
|
||||
|
||||
Version: V0.1B99 Date: Fri Nov 26 22:40:56 2004 +++++++++++++++++++++++++++++++
|
||||
* replace QextMDI by own impl. using QWorkspace and QDockWindow
|
||||
@@ -678,7 +679,7 @@ Version: V0.1B95 Date: Wed Nov 03 17:34:53 2004 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B94 Date: Sat Oct 23 18:58:52 2004 +++++++++++++++++++++++++++++++
|
||||
* finished implementation of the Tip of the day
|
||||
* split several big files in smaller ones
|
||||
* splitted several big files in smaller ones
|
||||
* namespace Gui::Kexi for property editor
|
||||
* namespace Gui::Dialog * documentation for most dialogs
|
||||
* use QToolBox provided by Qt instead of StackBar
|
||||
@@ -700,7 +701,7 @@ Version: V0.1B91 Date: Tue Sep 21 15:34:55 2004 +++++++++++++++++++++++++++++++
|
||||
Version: V0.1B90 Date: Tue Sep 07 19:25:03 2004 +++++++++++++++++++++++++++++++
|
||||
* Clean up path finding
|
||||
* port to OCC 5.2
|
||||
- switch to new iostream (finally!!!)
|
||||
- switch to new iostream (finaly!!!)
|
||||
|
||||
Version: V0.1B89 Date: Fri Aug 20 19:03:18 2004 +++++++++++++++++++++++++++++++
|
||||
* pimple App/Application and App/Document
|
||||
@@ -750,10 +751,10 @@ Version: V0.1B78 Date: Sun Nov 23 13:15:15 2003 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B77 Date: Fri Nov 14 14:56:14 2003 +++++++++++++++++++++++++++++++
|
||||
* Finished Setup stuff
|
||||
* Removed all relative paths
|
||||
* Removed all relativ paths
|
||||
* config HomePath is now not in bin anymore
|
||||
* all config files one dir up
|
||||
* FC runs now from every directory
|
||||
* FC runs now from every derectory
|
||||
* remove Startup and Install script
|
||||
|
||||
Version: V0.1B76 Date: Sat Nov 08 14:47:32 2003 +++++++++++++++++++++++++++++++
|
||||
@@ -833,18 +834,18 @@ Version: V0.1B63 Date: Sun Jun 08 20:21:25 2003 +++++++++++++++++++++++++++++++
|
||||
* drop down button completely new reimplemented
|
||||
|
||||
Version: V0.1B62 Date: Sat May 31 11:53:56 2003 +++++++++++++++++++++++++++++++
|
||||
* redesign of Document view model
|
||||
* redesign of Document view modell
|
||||
* removing ViewContainer
|
||||
* adding the OnHasMsg methodes
|
||||
* switching some stdCommands to message stile to allow views with own document
|
||||
* moving scintila to a passive view model
|
||||
* moving scintila to a passiv view modell
|
||||
* updated to new version of Scintilla (1.53)
|
||||
|
||||
Version: V0.1B61 Date: Sat May 24 17:35:52 2003 +++++++++++++++++++++++++++++++
|
||||
* binding for scintilla
|
||||
* switching the observer to templates
|
||||
* adding SoQt to the source
|
||||
* the template observer the M$ STL don't work any more
|
||||
* the template observer the M$ STL dont work any more
|
||||
|
||||
Version: V0.1B60 Date: Wed May 21 21:18:53 2003 +++++++++++++++++++++++++++++++
|
||||
* finishing close, save and update stuff
|
||||
@@ -891,7 +892,7 @@ Version: V0.1B52 Date: Thu Apr 10 21:17:20 2003 +++++++++++++++++++++++++++++++
|
||||
* insert the TreeDockBar
|
||||
|
||||
Version: V0.1B51 Date: Sun Apr 06 21:27:35 2003 +++++++++++++++++++++++++++++++
|
||||
* Really big patch from Werner
|
||||
* Realy big patch from Werner
|
||||
- Fix a problem with the paning in MouseModel
|
||||
- Fixing workbench binding for std. menus
|
||||
- switch to QT_VER for easier changing QT Version
|
||||
@@ -905,13 +906,13 @@ Version: V0.1B50 Date: Fri Apr 04 22:10:24 2003 +++++++++++++++++++++++++++++++
|
||||
* some work on the Linux port
|
||||
|
||||
Version: V0.1B49 Date: Thu Apr 03 22:45:35 2003 +++++++++++++++++++++++++++++++
|
||||
* Master redesign of the window system, not yet full working
|
||||
* Master redisign of the window system, not yet full working
|
||||
|
||||
Version: V0.1B48 Date: Sun Mar 30 15:06:23 2003 +++++++++++++++++++++++++++++++
|
||||
* Big patch from Werner about:
|
||||
- feeding toolbars and Commandbar and menus from the parameterts
|
||||
- customizing works with positions in command bar and toolbar
|
||||
- customizing by dragging from menu into toolbar and commandbar
|
||||
- customizing by draging from menu into toolbar and commandbar
|
||||
|
||||
Version: V0.1B47 Date: Fri Mar 28 18:24:36 2003 +++++++++++++++++++++++++++++++
|
||||
* Import App Module added
|
||||
@@ -951,10 +952,10 @@ Version: V0.1B39 Date: Mon Mar 03 12:32:14 2003 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B38 Date: Thu Feb 27 22:19:35 2003 +++++++++++++++++++++++++++++++
|
||||
* fix of memory leack in CmdBar (werner)
|
||||
* start rebuilding FCCommand framework
|
||||
* start rebulding FCCommand framework
|
||||
|
||||
Version: V0.1B37 Date: Tue Feb 25 20:29:19 2003 +++++++++++++++++++++++++++++++
|
||||
* massively improved customize dialog (werner)
|
||||
* massiv improved costomize dialog (werner)
|
||||
- sorting position of toolbars
|
||||
|
||||
Version: V0.1B36 Date: Sat Feb 22 18:12:19 2003 +++++++++++++++++++++++++++++++
|
||||
@@ -1012,7 +1013,7 @@ Version: V0.1B26 Date: Tue Jan 21 05:59:01 2003 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B25 Date: Sun Jan 19 18:20:51 2003 +++++++++++++++++++++++++++++++
|
||||
* Big Linux port patch from Vaclav
|
||||
- some fixes on implicit type conversion (Vaclav)
|
||||
- some fixes on implicite type conversion (Vaclav)
|
||||
- moving all .cxx to .cpp mainly in gui
|
||||
- moving DlgCusomizeImpl to Imp
|
||||
- and InitGui to GuiInit
|
||||
|
||||
@@ -1,481 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street - Fifth Floor
|
||||
Boston, MA 02110-1301, USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -1,55 +0,0 @@
|
||||
#ifndef LIBRARY_VERSIONS_H
|
||||
#define LIBRARY_VERSIONS_H
|
||||
|
||||
/* LibraryVersions.h. Generated from LibraryVersions.h.cmake by cmake. */
|
||||
|
||||
#cmakedefine HAVE_OCC_VERSION
|
||||
|
||||
#if defined(HAVE_OCC_VERSION)
|
||||
# include <${OCC_INCLUDE_DIR}/Standard_Version.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
/* No need for Boost (version info is always included in the source) */
|
||||
/* No need for Python (version info is always included in the source) */
|
||||
/* No need for Qt (version info is always included in the source) */
|
||||
/* No need for zlib (version info is always included in the source) */
|
||||
|
||||
// No CMake version info for SMESH, libarea, Zipios, or KDL
|
||||
|
||||
// Coin3D
|
||||
constexpr char * FC_COIN3D_VERSION = "${COIN3D_VERSION}";
|
||||
|
||||
// Eigen3
|
||||
constexpr char * FC_EIGEN3_VERSION = "${EIGEN3_VERSION}";
|
||||
|
||||
// FreeType
|
||||
constexpr char * FC_FREETYPE_VERSION = "${FREETYPE_VERSION_STRING}";
|
||||
|
||||
// pcl
|
||||
constexpr char * FC_PCL_VERSION = "${PCL_VERSION}";
|
||||
|
||||
// PyCXX
|
||||
constexpr char * FC_PYCXX_VERSION = "${PYCXX_VERSION}";
|
||||
|
||||
// PySide
|
||||
constexpr char * FC_PYSIDE_VERSION = "${PySide2_VERSION}";
|
||||
|
||||
// PyBind
|
||||
constexpr char * FC_PYBIND11_VERSION = "${pybind11_VERSION}";
|
||||
|
||||
// Shiboken
|
||||
constexpr char * FC_SHIBOKEN_VERSION = "${Shiboken2_VERSION}";
|
||||
|
||||
// vtk
|
||||
constexpr char * FC_VTK_VERSION = "${VTK_VERSION}";
|
||||
|
||||
// Xerces-C
|
||||
constexpr char * FC_XERCESC_VERSION = "${XercesC_VERSION}";
|
||||
|
||||
// Pivy
|
||||
constexpr char * FC_PIVY_VERSION = "${PIVY_VERSION}";
|
||||
|
||||
|
||||
#endif // LIBRARY_VERSIONS_H
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
FreeCAD
|
||||
=======
|
||||
|
||||
FreeCAD is a general purpose feature-based, parametric 3D modeler for
|
||||
CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering
|
||||
and product design but also fits a wider range of uses in engineering,
|
||||
such as architecture or other engineering specialties. It is 100% Open
|
||||
Source (LGPL2+ license) and extremely modular, allowing for very
|
||||
advanced extension and customization.
|
||||
|
||||
FreeCAD is based on OpenCasCade, a powerful geometry kernel, features an
|
||||
Open Inventor-compliant 3D scene representation model provided by the
|
||||
Coin 3D library, and a broad Python API. The interface is built with Qt.
|
||||
FreeCAD runs exactly the same way on Windows, Mac OSX, BSD and Linux
|
||||
platforms.
|
||||
|
||||
Home page: http://www.freecadweb.org
|
||||
Documentation wiki: http://www.freecadweb.org/wiki/
|
||||
Forum: http://forum.freecadweb.org/
|
||||
Bug tracker: http://www.freecadweb.org/tracker/
|
||||
Git repository: http://sourceforge.net/p/free-cad/code/ci/master/tree/
|
||||
|
||||
Installing
|
||||
==========
|
||||
|
||||
Precompiled (installable) packages are usually available to you from
|
||||
several sources and are described on the FreeCAD download page:
|
||||
http://www.freecadweb.org/wiki/index.php?title=Download
|
||||
|
||||
Compiling
|
||||
=========
|
||||
|
||||
Compiling FreeCAD requires to install several libraries and their
|
||||
development files such as OpenCasCADe, Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be simply compiled with
|
||||
cMake. On windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenience package, on Linux they are usually found
|
||||
in your distribution's repositories and on Mac OSX and other platforms
|
||||
you will usually need to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
For Linux: http://www.freecadweb.org/wiki/?title=CompileOnUnix
|
||||
For Windows: http://www.freecadweb.org/wiki/?title=CompileOnWindows
|
||||
For Mac OSX: http://www.freecadweb.org/wiki/?title=CompileOnMac
|
||||
For Cygwin: http://www.freecadweb.org/wiki/?title=CompileOnCygwin
|
||||
For MinGW: http://www.freecadweb.org/wiki/?title=CompileOnMinGW
|
||||
|
||||
Usage & Getting help
|
||||
====================
|
||||
|
||||
The FreeCAD documentation wiki contains a lot of documentation on
|
||||
general FreeCAD usage, python scripting, and development. The following
|
||||
pages might help you to get started:
|
||||
|
||||
Getting started: http://www.freecadweb.org/wiki/?title=Getting_started
|
||||
Features list: http://www.freecadweb.org/wiki/?title=Features_list
|
||||
Frequent questions: http://www.freecadweb.org/wiki/?title=FAQ
|
||||
Workbenches: http://www.freecadweb.org/wiki/?title=Workbench_Concept
|
||||
Scripting: http://www.freecadweb.org/wiki/?title=Power_users_hub
|
||||
Development: http://www.freecadweb.org/wiki/?title=Developer_hub
|
||||
|
||||
The FreeCAD forum at http://forum.freecadweb.org is also a great place
|
||||
to find help and solve specific problems that you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
How to build and run FreeCAD under Cygwin
|
||||
=========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
To compile FreeCAD, you will need, besides functioning Cygwin environment
|
||||
and programming tools (like compiler), the following libraries:
|
||||
|
||||
o Python (http://www.python.org), >= 2.5.x
|
||||
o Qt (http://www.trolltech.no), >= 4.1.x
|
||||
o Coin3D (http://www.coin3d.org), >= 2.4.x
|
||||
o SoQt (http://www.coin3d.org), >= 1.2.x
|
||||
o Xerces-c (http://xml.apache.org/dist/xerces-c/)
|
||||
o zlib (http://www.zlib.net/)
|
||||
|
||||
As far as I know, except of Coin3D and SoQt all libraries are available as prebuilt
|
||||
binary packages from one of the Cygwin mirrors. To install them, first download the
|
||||
latest version of setup.exe from www.cygwin.com and run it with administrator rights.
|
||||
Then follow the instructions of the wizard until the list of all available packages
|
||||
appears. Select the devel files of all the required libraries and install them.
|
||||
|
||||
Then download the source tarballs of Coin3D and SoQt and unpack them into a directory
|
||||
of your choice.
|
||||
The Coin library can be built with ./configure --disable-msvc;make; make install.
|
||||
|
||||
Building SoQt is a bit tricky and I haven't managed yet to build it in a proper way.
|
||||
There are various problems with X11 functions and Windows API functions which I
|
||||
don't know how to solve.
|
||||
|
||||
And for the Mesh module of FreeCAD the additional libraries
|
||||
o GTS Library (http://gts.sourceforge.net)
|
||||
o Wild Magic (http://www.geometrictools.com)
|
||||
o OpenCASCADE (http://www.opencascade.org), you need >=5.2 here
|
||||
are required. OpenCASCADE is also needed by the Part and Raytracing modules.
|
||||
|
||||
Note: As OpenCASCADE that is also required by the Mesh, Part and Raytracing
|
||||
modules is not available for Cygwin it is not possible to build them
|
||||
for this platform. It is planned for the future to move all OpenCASCADE
|
||||
dependencies of the Mesh module into a separate module so that at least
|
||||
this module can be built under Cygwin.
|
||||
|
||||
Note: All libraries listed above must be built as shared library. Refer to their
|
||||
documentation to see how to do.
|
||||
|
||||
Note: If possible you should enable thread support for the libraries. At least for
|
||||
Qt thread support is strongly recommended, otherwise you will run into linker
|
||||
errors at build time of FreeCAD.
|
||||
|
||||
Note: zlib might be already on your system, as this is a library that is used
|
||||
from a lot of other libraries.
|
||||
|
||||
Note: There seems to be various problems with Qt's uic tool of the Cygwin port.
|
||||
|
||||
Due to these problems it is not possible to run the GUI under Cygwin at the
|
||||
moment. It is only possible to run the commandline version.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
For the build process of FreeCAD we make use of configure scripts.
|
||||
To have an overview of all options type in ./configure --help, first.
|
||||
|
||||
If you have installed all libraries above into standard paths you need not any of the
|
||||
'--with' options at all. Unless you have installed any library into a non-standard path,
|
||||
then make use of the --with-XXX-includes or --with-XXX-libs options.
|
||||
(XXX represents the corresponding library.)
|
||||
|
||||
Note: Due to some limitations of the Windows platform it is not possible to build
|
||||
libraries with unresolved symbols at link time. Thus it is strongly recommended to run
|
||||
./configure with the option LDFLAGS=-no-undefined, otherwise the creation of shared
|
||||
libraries fails. For more details see section 11.2.1 Creating Libtool Libraries with
|
||||
Automake of the libtool documentation.
|
||||
|
||||
Note: To specify FreeCAD's root directory it is recommended to use only the '--prefix'
|
||||
option from the configure script but not the --bindir, --libdir, ... options, because
|
||||
at startup FreeCAD makes assumptions where its lib-, doc-, .. directories reside.
|
||||
The default root directory is located in ~/FreeCAD.
|
||||
|
||||
If you know how to work with GNU autoconf, feel free to contribute improvements
|
||||
to our configuration scripts --- that would be great.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Once you have built the sources successfully using 'make' with 'make install' you can
|
||||
install FreeCAD onto your machine whereever you want. Go to the directory FreeCAD/bin
|
||||
and just type in ./FreeCADCmd.
|
||||
FreeCAD's default root directory resides under ~/FreeCAD, so you don't need root privileges
|
||||
therefore.
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
How to build and run FreeCAD under Linux
|
||||
========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
To compile FreeCAD you will need, besides functioning Linux
|
||||
and programming tools (like compiler), the following libraries:
|
||||
|
||||
o Python (http://www.python.org), >= 2.5.x
|
||||
o boost (http://www.boost.org), >= 1.33.1
|
||||
o Qt (http://qt-project.org/), >= 4.1.x
|
||||
o PySide (http://qt-project.org/wiki/category:LanguageBindings::PySide::Downloads)
|
||||
o Coin3D (http://www.coin3d.org), >= 2.4.x
|
||||
o SoQt (http://www.coin3d.org), >= 1.2.x
|
||||
o Xerces-C++ (http://xml.apache.org/dist/xerces-c/), >= 2.6
|
||||
o zlib (http://www.zlib.net/)
|
||||
|
||||
And for the some FreeCAD modules the additional libraries
|
||||
o OpenCascade (http://www.opencascade.org), >= 5.2
|
||||
o Eigen3 (http://eigen.tuxfamily.org/index.php?title=Main_Page), >= 3.0.1
|
||||
o FreeType
|
||||
are required.
|
||||
|
||||
Note: zlib might be already on your system, as this is a library that is used
|
||||
by a lot of libraries, too.
|
||||
|
||||
Note: All libraries listed above must be built as shared library. Refer to their
|
||||
documentation to see how to do.
|
||||
|
||||
Note: If possible you should enable thread support for the libraries. At least for
|
||||
Qt thread support is strongly recommended, otherwise you will run into linker
|
||||
errors at build time of FreeCAD.
|
||||
|
||||
Note: The package for SoQt for Debian based systems may lack of the soqt.m4 macro file.
|
||||
You should download the file from www.coin3d.org and copy it to /usr/share/aclocal.
|
||||
|
||||
Note: The package for SoQt (at least for older Debian based systems) is usually built to link
|
||||
against Qt3. This, however, causes a segmentation fault when using with FreeCAD because
|
||||
it links against Qt4 and you get a mixup of Qt3 and Qt4 libraries.
|
||||
To fix this problem you must download the sources from www.coin3d.org and run
|
||||
configure with the 'with-qt=DIR' switch specifying the location of Qt4.
|
||||
Probably, it's best to 'make install' the newly built SoQt into a different directory
|
||||
than the installed SoQt to avoid to corrupt your package database and/or to keep other
|
||||
applications working. When configuring FreeCAD you have to use the '--with-soqt=DIR'
|
||||
switch specifying the path of the newly installed SoQt.
|
||||
For newer Debian releases this already solved by a new package that links against Qt4.
|
||||
|
||||
|
||||
During the compilation some Python scripts get executed. So the Python interpreter has
|
||||
to work properly.
|
||||
|
||||
Optionally, you can build the Qt plugin that provides all custom widgets of FreeCAD
|
||||
we need for the Qt Designer. The sources are located under Tools/plugins/widget.
|
||||
So far, we don't provide a makefile but calling 'qmake plugin.pro' creates it and
|
||||
calling 'make' will create the library libFreeCAD_widgets.so. To make known this library
|
||||
to your Qt Designer you have to copy the file to $QTDIR/plugin/designer.
|
||||
|
||||
On our Wiki you'll find more information to build with different Linux distributions at
|
||||
http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
For the build process of FreeCAD we make use of configure scripts.
|
||||
To have an overview of all switches type in ./configure --help, first.
|
||||
|
||||
You don't need any of these switches unless you have installed a library into a non-standard
|
||||
path. In this case make use of the appropriate --with-XXX-include or --with-XXX-lib switches,
|
||||
please. (XXX stands for the corresponding library.)
|
||||
Of course, for above mentioned problem with SoQt you should use the '--with-soqt=DIR' switch.
|
||||
|
||||
Note: To specify FreeCAD's root directory it is recommended to use only the '--prefix'
|
||||
switch from the configure script but not the --bindir, --libdir, ... switches, because at startup
|
||||
FreeCAD makes assumptions about where its module directories are installed.
|
||||
|
||||
|
||||
Installation & Running FreeCAD
|
||||
------------------------------
|
||||
|
||||
Once you have built the sources successfully using 'make', with 'make install' you can
|
||||
install FreeCAD onto your machine whereever you want. FreeCAD's default root directory
|
||||
is $HOME/FreeCAD, so you don't need root privileges therefore. To run FreeCAD go to
|
||||
$PREFIX/FreeCAD/bin and type in ./FreeCAD.
|
||||
|
||||
Note: In the past there were a lot of problems that the Part workbench couldn't be loaded.
|
||||
The problem is that the system wasn't able to find the OpenCascade library files.
|
||||
To fix this problem you are strongly recommended to add the path of these libraries
|
||||
to LD_LIBRARY_PATH or even to add it to ld.so.conf and run ldconfig.
|
||||
|
||||
|
||||
So, just have fun!
|
||||
|
||||
|
||||
|
||||
Werner Mayer <wmayer@users.sourceforge.net>
|
||||
June 2014
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
|
||||
How to build and run FreeCAD under MSYS/MinGW
|
||||
=============================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Here comes a short introduction how to setup a MSYS/MinGW environment
|
||||
on a Windows system, to build all needed libraries and finally to build
|
||||
the FreeCAD sources.
|
||||
|
||||
o MSYS/MinGW
|
||||
If not already installed get a MinGW installer from the Sourceforge page at
|
||||
http://sourceforge.net/projects/mingw. When writing this tutorial the latest
|
||||
version was mingw-get-inst-20100831.exe. Download and just double-click the
|
||||
excutable. This installs the compiler and a minimal Windows developer environment.
|
||||
Make sure to also install the Fortran compiler because there is a single Fortran
|
||||
file in the 3rd party folder of the FreeCAD sources.
|
||||
|
||||
Then as second step MSYS needs to be installed to have an environment to run
|
||||
./configure scripts which we make heavy use of in order to build all needed
|
||||
libraries. From the Soureforge page the file MSYS-1.0.11.exe was taken.
|
||||
|
||||
A virginal MSYS/MinGW installation lacks of a few modules we later need.
|
||||
First, we need the utility pexport which can be found in the file
|
||||
pexports-0.44-1-mingw32-bin.tar.lzma. I don't know where to put this file
|
||||
and how to make MSYS to install the stuff inside. But the file can be opened
|
||||
with a ZIP program and the content can be copied to their destination manually.
|
||||
Here, the pexports utility can go to the bin directory of your MinGW installation.
|
||||
|
||||
Then, we also need the development files for the pthreads module which is part
|
||||
of the file pthreads-w32-2.8.0-3-mingw32-dev.tar.lzma. Just download and copy
|
||||
the files inside to your MinGW installation.
|
||||
|
||||
|
||||
o CMake
|
||||
Download the CMake utility from http://www.cmake.org/cmake/resources/software.html.
|
||||
Get the archive with the binaries for the Windows platform and unpack whereever you
|
||||
want. There is nothing further to do for this.
|
||||
|
||||
o SWIG
|
||||
Download the SWIG utility from www.swig.org and extract it somewhere on your harddisk.
|
||||
|
||||
|
||||
Third party libraries
|
||||
---------------------
|
||||
|
||||
Here is a description which libraries we need for FreeCAD and how to build them from
|
||||
the sources. In order not to pollute our MinGW installation with too many files from
|
||||
the 3rd party libraries we have to build you can e.g. create a sub-directory "local"
|
||||
in your MSYS installation. If you have installed MSYS under C:\MSYS then simply create
|
||||
the directory C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o zlib
|
||||
For zlib there is already a ready package for MinGW. So, therefore simply download
|
||||
the file libz-1.2.3-1-mingw32-dev.tar.gz from the Sourceforge site and extract the
|
||||
two directories lib and include to C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o Python
|
||||
It seems to be nearly impossible to build the Python sources directly with the MinGW
|
||||
compiler. This is because some Python modules require some features which are not
|
||||
implemented on the MinGW platform. Fortunately, the Python sources are plain C code
|
||||
and instead of trying to build it with MinGW you can get a ready binary package built
|
||||
with the MSVC compiler. You can install the Python stuff whereever you want. Afterwards
|
||||
copy the include folder to C:\MSYS\1.0\local, the DLL can go to C:\MSYS\1.0\local\bin.
|
||||
|
||||
Now we also need the so called import library. There we cannot use the .lib file which
|
||||
comes together with the installer. But it's easy to create one with the pexports/dlltool
|
||||
utilities. Assuming the Python version is 2.6 do these two steps:
|
||||
|
||||
pexports python26.dll > python26.def
|
||||
dlltool -D python26.dll -d python26.def -l libpython26.dll.a
|
||||
|
||||
The file libpython26.dll.a can now be moved to C:\MSYS\1.0\local\lib.
|
||||
|
||||
|
||||
o f2c
|
||||
For this library we don't need any header files but only the import library to build the
|
||||
Salome SMESH sources. The easiest way to build this file is:
|
||||
|
||||
pexports libgfortran-3.dll > f2c.def
|
||||
dlltool -D libgfortran-3.dll -d f2c.def -l libf2c.dll.a
|
||||
|
||||
The file libf2c.dll.a can now be moved to C:\MSYS\1.0\local\lib.
|
||||
|
||||
|
||||
o xerces-c
|
||||
Download a source archive from http://xml.apache.org/dist/xerces-c/ and extract it.
|
||||
Open a MSYS command line window and change to the xerces-c sources. From there run
|
||||
|
||||
./configure LDFLAGS=-no-undefined
|
||||
|
||||
Once ./configure has finished it's best to move to the source directory because we
|
||||
don't need to build the dozens of test applications and other stuff. So, do this:
|
||||
|
||||
cd src
|
||||
make
|
||||
make install
|
||||
|
||||
This takes a few minutes to be done.
|
||||
|
||||
|
||||
o boost
|
||||
For boost there exists a testing package with cmake support. This, however, seems to be
|
||||
stable enough to build with the MinGW compiler. So, get the file boost-1.41.0.cmake0.zip
|
||||
from http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/ and unpack it.
|
||||
|
||||
Now, start the cmake-gui.exe from within the MSYS command line. This is necessary for cmake
|
||||
in order to find the compiler and other stuff. Select the folder of the boost sources with
|
||||
the CMakeLists.txt file, select a build directory and start Configure. You'll be asked for
|
||||
which system you want to generate the Makefiles. Select MSYS/Makefiles, not MinGW/Makefiles.
|
||||
|
||||
When the configuration step has finished go to the options and search for WINMANGLE_LIBNAMES.
|
||||
Switch this off because otherwise the boost library names contain the compiler name. This
|
||||
causes the boost cmake check to fail later when we try to build the FreeCAD sources. And for
|
||||
the installtion folder choose the directory C:\MSYS\1.0\local.
|
||||
|
||||
So, reconfigure boost and press on Generate once it has finished. Close the CMake GUI window
|
||||
and enter
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
into the command line. This will take a couple of minutes.
|
||||
|
||||
|
||||
o eigen2
|
||||
Download eigen-2.0.15.tar.gz or any later version from http://eigen.tuxfamily.org/index.php?title=Main_Page.
|
||||
Unpack the files and start again cmake-gui. Set the installation directory to C:\MSYS\1.0\local
|
||||
and press on Configure and Generate. Close the window and start the installation with
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
o Qt4
|
||||
From the Qt website at ftp://ftp.trollech.com you can download already prebuilt packages for the
|
||||
MinGW platform. But depending on the version you have installed it can happen that they don't fit
|
||||
together. In this case the source tarball must be downloaded. Use version 4.5.3 or higher. Unpack
|
||||
the sources and start the configure.exe you'll find inside the sources.
|
||||
|
||||
./configure
|
||||
|
||||
By default the build the debug and release version. If you only want the release version use the
|
||||
option "-release".
|
||||
|
||||
Configure will ask you some questions under which license you want to use Qt. Choose LGPL here.
|
||||
Now run the build with
|
||||
|
||||
make
|
||||
|
||||
This can take quite some time because Qt has become a really huge library over the years. Once the
|
||||
build has finished run a
|
||||
|
||||
make install
|
||||
|
||||
to copy the header files to their right place. All the binaries and header files are still inside
|
||||
the source folder. If you like you can copy all the .dll, .a, and the direcories under "include" to
|
||||
the subdirectories of C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o Coin
|
||||
Get a source archive from www.coin3d.org. Unpack the sources and run
|
||||
|
||||
./confiure
|
||||
make
|
||||
make install
|
||||
|
||||
It may happen that a message dialog pops up due to a missing cygwin1.dll. You simply ignore this.
|
||||
|
||||
|
||||
o SoQt
|
||||
Get a source archive from www.coin3d.org. Unpack the sources and run
|
||||
|
||||
./configure CXXFLAGS="-DCOIN_DLL" --with-qt=/usr/local
|
||||
make
|
||||
make install
|
||||
|
||||
In case your Qt development files are not under /usr/local choose the correct directory there.
|
||||
Again a message dialog may pop up due to the missing cygwin1.dll.
|
||||
|
||||
|
||||
o PyQt/sip
|
||||
|
||||
Warning: the following is obsoleted from version 0.14, since FreeCAD is now using
|
||||
pySide instead of PyQt. At the moment, PySide suport for MingW seems still not complete:
|
||||
https://bugreports.qt-project.org/browse/PYSIDE-113?page=com.atlassian.jira.plugin.system.issuetabpanels%3aall-tabpanel
|
||||
|
||||
Download the sources archives for sip and PyQt4 from www.riverbankcomputing.co.uk.
|
||||
|
||||
In order to build sip extract the archive and open a MSYS command line. From within
|
||||
its source archive call
|
||||
|
||||
python configure.py --platform win32-g++ --destdir=/usr/local
|
||||
make
|
||||
|
||||
It may happen that this step aborts because the Python include headers cannot be found.
|
||||
In this case edit the Makefile and add the include path for the ython headers and also
|
||||
the path and filename of the Python library.
|
||||
|
||||
Unfortunately, the 'make install' command doesn't work because the Makefile was generated
|
||||
to use Windows batch commands instead of bash commands. Thus, copy the following files to
|
||||
a path where Python can find it, e.g. /usr/local/bin.
|
||||
|
||||
sipconfig.py
|
||||
sipdistutils.py
|
||||
siputils.py
|
||||
sip.pyd
|
||||
sip.exe
|
||||
|
||||
In order to build PyQt4 extract the source archive and open a MSYS command line. Go to the
|
||||
directory and start
|
||||
|
||||
export PATH=/usr/local/lib/:$PATH
|
||||
python configure.py --destdir=/usr/local/lib/site-packages
|
||||
make
|
||||
|
||||
Since the Makefile doesn't find the Python header files copy them all and also the file sip.h
|
||||
to a directory where they can be found. A good place seems to be the directory of the Qt sources.
|
||||
There copy the files to $QTDIR/include. The Python library file python26.dll.a can go $QTDIR/lib.
|
||||
|
||||
After the build has finished you have to copy all files that end with .pyd to their destination,
|
||||
e.g. /usr/local/lib/site-packages/PyQt4. Lateron when you have built the FreeCAD sources you have
|
||||
to copy the PyQt4 directory and sip.pyd to the FreeCAD bin directory or set a symlink.
|
||||
|
||||
|
||||
o ODE
|
||||
TODO: Still not clear if this will be used. (http://www.ode.org), >= 0.10.x
|
||||
|
||||
|
||||
o OpenCASCADE
|
||||
For the build of the OpenCASCADE libraries get the sources from www.opencascade.org or alternatively
|
||||
it is also possible to download a stripped source tarball from the Debian mirrors which don't include
|
||||
any fonts and other resource files.
|
||||
|
||||
Unpack the sources and download a CMake script from http://opencascade-cmake.googlecode.com/svn/trunk/
|
||||
and the file occ_config.h.cmake. Copy both files into the 'ros' directory, start cmake-gui from
|
||||
within a MSYS command line and select MSYS Makefiles. In the options the following switches can be
|
||||
disabled:
|
||||
|
||||
OPENCASCADE_WRAPPERS
|
||||
OPENCASCADE_VISUALISATION
|
||||
OPENCASCADE_OCAF
|
||||
OPENCASCADE_DRAW
|
||||
|
||||
Then specify for OPENCASCADE_INSTALL_PREFIX C:/MSYS/1.0/local as destination directory-
|
||||
|
||||
Now click the Configure button which takes a while and afterwards the Generate button.
|
||||
|
||||
Note: The original sources don't completely compile with MinGW. Therefore you have to apply the patch
|
||||
OpenCASCADE6.3.0-MinGW.patch from http://code.google.com/p/opencascade-cmake/source/browse/trunk
|
||||
|
||||
Note: The original sources includes also a configure script and the Makefile.am files.
|
||||
But it appeared to be very hard to build the libraries this way. Thus, it highly
|
||||
recommended to do it the CMake way.
|
||||
|
||||
Note: For a couple of libraries the arguments passed to the linker exceeds the number of
|
||||
allowed characters and thus the linker stops with an error: "Bad file number".
|
||||
To solve this issue you can open the file build.make of the according library and
|
||||
split the block (e.g. TKGeomAlgo_OBJECTS) into several smaller ones and modify the
|
||||
build rule this way that you create first a static library, add the other object
|
||||
files to the group and then unpack the static archive into one directory. This
|
||||
trick solves the problem to reduce the whole number of characters.
|
||||
Afterwards the shared library can be built out of these object files.
|
||||
Example:
|
||||
If the build.make file has a line of the form
|
||||
g++ <options> -shared -o libTKGeomAlgo.dll $(TKGeomAlgo_OBJECTS) <libs>
|
||||
then change it into
|
||||
ar rcs win32/libTKGeomAlgo.a $(TKGeomAlgo_OBJECTS1)
|
||||
ar q win32/libTKGeomAlgo.a $(TKGeomAlgo_OBJECTS2)
|
||||
...
|
||||
ar x win32/libTKGeomAlgo.a
|
||||
g++ <options> -shared -o libTKGeomAlgo.dll *.obj <libs>
|
||||
rm -f *.obj
|
||||
|
||||
o Netgen
|
||||
Modify the following files:
|
||||
* libsrc/meshing/improve2.hpp
|
||||
Add DLL_HEADER to class MeshOptimize2d
|
||||
* libsrc/meshing/meshclass.hpp
|
||||
Add DLL_HEADER to CalcSurfacesOfNode
|
||||
* libsrc/meshing/meshtype.hpp
|
||||
Add DLL_HEADER to classes SurfaceElementIndex, MeshPoint, Element2d (int anp),
|
||||
* libsrc/occ/occgeom.hpp
|
||||
Add DLL_HEADER to classes Line, OCCGeometry, OCCParameters, OCCGenerateMesh
|
||||
* libsrc/occ/occmeshsurf.hpp
|
||||
Add DLL_HEADER to classes OCCSurface, Meshing2OCCSurfaces, MeshOptimize2dOCCSurfaces, OCCRefinementSurfaces
|
||||
|
||||
Run the configure script with these arguments
|
||||
./configure --prefix=/usr/local --enable-shared --enable-occ --with-occ=/usr/local --with-tcl=/usr/local/lib --enable-nglib CXXFLAGS="-DNGLIB_EXPORTS -DWNT"
|
||||
make && make install
|
||||
|
||||
|
||||
Building the FreeCAD sources
|
||||
----------------------------
|
||||
|
||||
In order build the FreeCAD sources either get the developer sources from the SVN repository
|
||||
or get one of the .tar.gz tarballs and extract it.
|
||||
Now start cmake-gui.exe from within a MSYS command line window and browse to the FreeCAD
|
||||
sources and also define the build directory. Now run Configure. It may happen that cmake
|
||||
complains about some not found libraries. In this case go through the listed libraries and
|
||||
choose the include directory and/or the path to the library where needed. Once Confgiure
|
||||
accepts all your input create the Makefiles by clicking on Generate. Now close the window
|
||||
and enter
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
This will take a couple of minutes. From the command line window change to the FreeCAD bin
|
||||
folder and start the application with ./FreeCAD. In case it complains about some DLLs it cannot
|
||||
find you have to extend your PATH environment variable with
|
||||
|
||||
export PATH=$PATH:/usr/local/bin:/usr/local/lib
|
||||
|
||||
If no grave problems remains repeating ./FreeCAD should start the application now.
|
||||
|
||||
Note: In order to let CMake detect the boost libraries you must make sure that the
|
||||
DLLs are in the system path because the check builds some test applications
|
||||
and tries to start them. If the DLLs are not in path CMake says that it cannot
|
||||
find boost. In this case do a export PATH=/usr/local/lib:$PATH
|
||||
|
||||
Have fun!
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
How to build and run FreeCAD under Windows
|
||||
==========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
On Windows we use the IDE MS VisualStudio 9 with the highest service pack.
|
||||
In case you don't want to use MS products you can also use the MinGW compiler,
|
||||
alternatively. In this case continue on reading the manual README.MinGW.
|
||||
You need cMake 2.6 or higher to generate the project files for VisualStudio.
|
||||
Also you need all the 3rd party libraries to succsefully compile FreeCAD.
|
||||
|
||||
Using LibPack
|
||||
-------------
|
||||
|
||||
To make it easier to get FreeCAD compiled, we provide a collection of all
|
||||
needed libraries. It's called the LibPack. You can find it on the download
|
||||
page on sourceforge.
|
||||
|
||||
Python needed
|
||||
-------------
|
||||
|
||||
During the compilation some Python scripts get executed. So the Python interpreter
|
||||
has to function on the OS. Use a command box to check it. If the Python library is
|
||||
not properly installed you will get an error message like Cannot find python.exe.
|
||||
If you use the LibPack you can also use the python.exe in the bin directory.
|
||||
|
||||
Compile
|
||||
-------
|
||||
|
||||
In order to build the FreeCAD sources start the GUI frontend of cmake. If
|
||||
doesn't already find the header files and libraries of the LibPack you have to
|
||||
define the path where you have unpacked it.
|
||||
|
||||
After you conform to all prerequisites the compilation is - hopefully - only
|
||||
a mouse click in VC ;-)
|
||||
|
||||
After Compiling
|
||||
---------------
|
||||
|
||||
To get FreeCAD up and running from the compiler environment you need to move a
|
||||
few files from the LibPack to the "bin" folder where FreeCAD.exe is installed
|
||||
after a successfull build:
|
||||
|
||||
* python.exe and python_d.exe from LIBPACK/bin
|
||||
* python26.dll and python26_d.dll from LIBPACK/bin
|
||||
* python26.zip from LIBPACK/bin
|
||||
* make a copy of python26.zip and rename it to python26_d.zip
|
||||
|
||||
|
||||
Additional stuff
|
||||
----------------
|
||||
|
||||
If you want to build the source code documentation you need DoxyGen.
|
||||
To create an intstaller package you need WIX.
|
||||
|
||||
|
||||
Additional information on building special 3rd party libraries
|
||||
--------------------------------------------------------------
|
||||
|
||||
* Mefisto2F
|
||||
|
||||
The Salome SMESH library needs the Mefisto2F library which contains some Fortran code.
|
||||
The easiest way is to convert the Fortran code into C code and use the f2c library to
|
||||
build a static library.
|
||||
|
||||
1. Get the f2c utility from http://netlib.sandia.gov/f2c/mswin/index.html
|
||||
2. Convert the Fortran file trte.f into a C file trte.c using the f2c utility
|
||||
>>> f2c trte.f
|
||||
3. Get the sources for the lib f2c from http://netlib.sandia.gov/f2c/libf2c.zip and
|
||||
unpack them.
|
||||
4. Apply the patch 'mefisto2f.patch'
|
||||
5. Run nmake -f makefile.vc
|
||||
|
||||
Alternatively, you can use the Watcom Fortran compiler. The needed project file can be get from
|
||||
here: http://sourceforge.net/p/salomesmesh/code/HEAD/tree/trunk/adm/win32-watcom/
|
||||
However, this doesn't work for x64 targets at the moment.
|
||||
|
||||
* FreeType
|
||||
|
||||
http://stackoverflow.com/questions/6207176/compiling-freetype-to-dll-as-opposed-to-static-library
|
||||
@@ -1,128 +0,0 @@
|
||||

|
||||
|
||||
### Your own 3D parametric modeler
|
||||
|
||||
[Website](https://www.freecadweb.org) •
|
||||
[Documentation](https://wiki.freecadweb.org) •
|
||||
[Forum](https://forum.freecadweb.org/) •
|
||||
[Bug tracker](https://www.freecadweb.org/tracker/) •
|
||||
[Git repository](https://github.com/FreeCAD/FreeCAD)
|
||||
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [](https://crowdin.com/project/freecad) [](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [](https://liberapay.com/FreeCAD)
|
||||
|
||||

|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
* **Freedom to build what you want** FreeCAD is an open-source parametric 3D
|
||||
modeler made primarily to design real-life objects of any size.
|
||||
Parametric modeling allows you to easily modify your design by going back into
|
||||
your model history to change its parameters.
|
||||
|
||||
* **Create 3D from 2D and back** FreeCAD lets you to sketch geometry constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
It contains many components to adjust dimensions or extract design details from
|
||||
3D models to create high quality production-ready drawings.
|
||||
|
||||
* **Designed for your needs** FreeCAD is designed to fit a wide range of uses
|
||||
including product design, mechanical engineering and architecture,
|
||||
whether you are a hobbyist, programmer, experienced CAD user, student or teacher.
|
||||
|
||||
* **Cross platform** FreeCAD runs on Windows, macOS and Linux operating systems.
|
||||
|
||||
* **Underlying technology**
|
||||
* **OpenCASCADE** A powerful geometry kernel, the most important component of FreeCAD
|
||||
* **Coin3D library** Open Inventor-compliant 3D scene representation model
|
||||
* **Python** FreeCAD offers a broad Python API
|
||||
* **Qt** Graphical user interface built with Qt
|
||||
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
|
||||
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
|
||||
|
||||
On most Linux distributions, FreeCAD is also directly installable from the
|
||||
software center application.
|
||||
|
||||
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
|
||||
|
||||
Other options are described at the [wiki Download page](https://wiki.freecadweb.org/Download).
|
||||
|
||||
Build Status
|
||||
------------
|
||||
|
||||
| Master | 0.19 | Translation |
|
||||
|:------:|:----:|:-----------:|
|
||||
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.19][freecad-0.19-status]][gitlab-branch-0.19]|[](https://crowdin.com/project/freecad)|
|
||||
|
||||
[freecad-0.19-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-19/pipeline.svg
|
||||
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
|
||||
[gitlab-branch-0.19]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-19
|
||||
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
|
||||
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
Compiling FreeCAD requires installation of several libraries and their
|
||||
development files such as OCCT (Open Cascade), Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be compiled with
|
||||
CMake. On Windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenient package. On Linux, they are usually found
|
||||
in your distribution's repositories, and on macOS and other platforms,
|
||||
you will usually have to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
- [Linux](https://wiki.freecadweb.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecadweb.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecadweb.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecadweb.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecadweb.org/Compile_on_MinGW)
|
||||
|
||||
|
||||
Reporting Issues
|
||||
---------
|
||||
|
||||
To report an issue please:
|
||||
- First post to forum to verify the issue;
|
||||
- Link forum thread to bug tracker ticket and vice-a-versa;
|
||||
- Use the most updated stable or development versions of FreeCAD;
|
||||
- Post version info from eg. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file to demonstrate problem.
|
||||
|
||||
For more detail see:
|
||||
- [Wiki Page about the Bug Tracker](https://wiki.freecadweb.org/Tracker)
|
||||
- [Bug Tracker](https://tracker.freecadweb.org)
|
||||
- [Help Forum](http://forum.freecadweb.org/viewforum.php?f=3)
|
||||
|
||||
|
||||
Usage & Getting help
|
||||
--------------------
|
||||
|
||||
The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecadweb.org/Getting_started)
|
||||
- [Features list](https://wiki.freecadweb.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecadweb.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecadweb.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecadweb.org/Power_users_hub)
|
||||
- [Development](https://wiki.freecadweb.org/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecadweb.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
|
||||
<p>This project receives generous infrastructure support from
|
||||
<a href="https://www.digitalocean.com/">
|
||||
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="91px">
|
||||
</a> and <a href="https://www.kipro-pcb.com/">KiCad Services Corp.</a>
|
||||
</p>
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef SMESH_VERSION_H
|
||||
#define SMESH_VERSION_H
|
||||
|
||||
/* SMESH_Version.h. Generated from SMESH_Version.h.cmake by cmake. */
|
||||
|
||||
// SMESH version
|
||||
#define SMESH_VERSION_MAJOR ${SMESH_VERSION_MAJOR}
|
||||
#define SMESH_VERSION_MINOR ${SMESH_VERSION_MINOR}
|
||||
#define SMESH_VERSION_PATCH ${SMESH_VERSION_PATCH}
|
||||
#define SMESH_VERSION_TWEAK ${SMESH_VERSION_TWEAK}
|
||||
|
||||
#endif // SMESH_VERSION_H
|
||||
@@ -1,66 +0,0 @@
|
||||
#version:
|
||||
|
||||
image: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
# APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||
generator: "Visual Studio 15 2017 Win64"
|
||||
ARCH: "Win64"
|
||||
Compiler: "MSVC2017"
|
||||
|
||||
cache: c:\users\appveyor\clcache -> appveyor.yml
|
||||
|
||||
configuration:
|
||||
#- Debug
|
||||
- Release
|
||||
|
||||
clone_depth: 1600
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
#init:
|
||||
|
||||
#before_build:
|
||||
|
||||
# scripts that run after cloning repository
|
||||
#todo cleanup libpacks on the FreeCAD-ports-cache repo
|
||||
install:
|
||||
- cd C:\projects\freecad
|
||||
- if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/apeltauer/FreeCAD/releases/download/LibPack_12.1/FreeCADLibs_12.1.2_x64_VC15.7z)
|
||||
- if [%ARCH%] == [Win64] (
|
||||
powershell -Command 7z x FreeCADLibs_12.1.2_x64_VC15.7z -oFreeCADLibs > nul &&
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat")
|
||||
- set PATH=c:\Python37;c:\Python37\Scripts;%PATH%
|
||||
- pip install clcache
|
||||
- clcache -z
|
||||
- clcache -s
|
||||
|
||||
build_script:
|
||||
- cd C:\projects\freecad
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
|
||||
-DBUILD_FEM_NETGEN=OFF
|
||||
-DFREECAD_RELEASE_PDB=OFF
|
||||
-G "%generator%" ..
|
||||
- mkdir bin
|
||||
- xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
|
||||
- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
|
||||
- msbuild FreeCAD.sln /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=c:\Python37\Scripts\ /m
|
||||
- ps: fsutil behavior set disablelastaccess 1
|
||||
- clcache -s
|
||||
|
||||
#after_build:
|
||||
- cd C:\projects\freecad\build\bin\
|
||||
- FreeCADCmd.exe --run-test 0
|
||||
|
||||
#artifacts:
|
||||
|
||||
test: off # to avoid discovering tests
|
||||
|
||||
#
|
||||
# The following section automatically uploads artifacts
|
||||
# whenever a tag is created on the master branch.
|
||||
#
|
||||
#deploy:
|
||||
@@ -1,91 +0,0 @@
|
||||
##!/usr/bin/env bash
|
||||
#
|
||||
# MacOS Build Script for FreeCAD using Conda.
|
||||
# This is intended for developer use.
|
||||
#
|
||||
# Copyright (c) 2020 by Jeffrey Zampieron. All rights reserved.
|
||||
#
|
||||
# License: LGPLv2.1
|
||||
#
|
||||
# References:
|
||||
# - Conda: https://conda.io/projects/conda/en/latest/user-guide/install/index.html
|
||||
# - Conda Build: https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html
|
||||
|
||||
###########################################################################
|
||||
# Script wide setup.
|
||||
###########################################################################
|
||||
# The Conda environment name
|
||||
FCENV=freecad_dev
|
||||
# The cmake build directory
|
||||
HOST=$(uname)
|
||||
|
||||
###########################################################################
|
||||
# Env Checks
|
||||
###########################################################################
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
# Linux specific checks here
|
||||
echo "Linux specific checks..."
|
||||
elif [[ ${HOST} =~ "Darwin" ]]; then
|
||||
# OSX specific checks here.
|
||||
echo "OS X specific checks..."
|
||||
which xcrun
|
||||
if [ $? != 0 ]; then
|
||||
echo "xcrun not found... install XCode command line tools..."
|
||||
echo "using: xcode-select --install"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "unknown host env... probably won't work. Aborting build."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
# Conda Setup
|
||||
###########################################################################
|
||||
which conda
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to find conda executable. Please install."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${CONDA_DEFAULT_ENV}" =~ "${FCENV}" ]]; then
|
||||
echo "Already in env"
|
||||
elif [[ -z "${CONDA_DEFAULT_ENV}" ]]; then
|
||||
echo "Not in conda env... activating"
|
||||
eval "$(conda shell.bash hook)"
|
||||
conda activate ${FCENV}
|
||||
else
|
||||
# Assume we are in some other env.
|
||||
echo "In ${CONDA_DEFAULT_ENV}, attempting switch to ${FCENV}"
|
||||
eval "$(conda shell.bash hook)"
|
||||
conda deactivate
|
||||
conda activate ${FCENV}
|
||||
fi
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to activate conda env: ${FCENV} ... creating"
|
||||
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
echo "Linux"
|
||||
conda env create -f environment-linux.yml
|
||||
elif [[ ${HOST} =~ "Darwin" ]]; then
|
||||
echo "OS X"
|
||||
conda env create -f environment-osx.yml
|
||||
else
|
||||
echo "Unknown Host: ${HOST}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
conda activate ${FCENV}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to create conda environment and activate it."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${CONDA_PREFIX}" ]; then
|
||||
echo "Failed to find CONDA_PREFIX variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PREFIX="${CONDA_PREFIX}" ./conda/build.sh
|
||||
@@ -63,23 +63,3 @@ SET(HAVE_QT_KEYPAD_DEFINE 1)
|
||||
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1)
|
||||
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
"#include <cstddef>\n"
|
||||
"#include <execinfo.h>\n\n"
|
||||
"int main() {\n"
|
||||
" void *callstack[128];\n"
|
||||
" size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n"
|
||||
" size_t nFrames = backtrace(callstack, nMaxFrames);\n"
|
||||
" char **symbols = backtrace_symbols(callstack, nFrames);\n"
|
||||
" return 0;\n"
|
||||
"}"
|
||||
)
|
||||
|
||||
try_compile(
|
||||
RESULT_VAR
|
||||
${CMAKE_BINARY_DIR}
|
||||
SOURCES
|
||||
${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
)
|
||||
|
||||
SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR})
|
||||
|
||||
+36
-68
@@ -2,31 +2,28 @@
|
||||
# Once done this will define
|
||||
#
|
||||
# COIN3D_FOUND - system has Coin3D - Open Inventor
|
||||
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
|
||||
# COIN3D_LIBRARIES - Link this to use Coin3D
|
||||
# COIN3D_INCLUDE_DIR - where the Inventor include directory can be found
|
||||
# COIN3D_LIBRARY - Link this to use Coin3D
|
||||
#
|
||||
|
||||
SET( COIN3D_FOUND "NO" )
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN OR MINGW)
|
||||
IF (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include/coin
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
ELSE (CYGWIN OR MINGW)
|
||||
ELSE (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
|
||||
)
|
||||
|
||||
@@ -34,92 +31,63 @@ IF (WIN32)
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE
|
||||
NAMES
|
||||
coin2
|
||||
Coin4
|
||||
PATHS
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE coin2
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
SET(COIN3D_LIBRARY optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
IF (COIN3D_LIBRARY_DEBUG)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
|
||||
SET (COIN3D_LIBRARY ${COIN3D_LIBRARY_DEBUG})
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG)
|
||||
IF (COIN3D_LIBRARY_RELEASE)
|
||||
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
|
||||
SET (COIN3D_LIBRARY ${COIN3D_LIBRARY_RELEASE})
|
||||
ENDIF (COIN3D_LIBRARY_RELEASE)
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
|
||||
IF (COIN3D_LIBRARIES)
|
||||
IF (COIN3D_LIBRARY)
|
||||
# ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
|
||||
#ELSE (COIN3D_LIBRARIES)
|
||||
# SET (COIN3D_LIBRARIES coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
|
||||
ENDIF (COIN3D_LIBRARIES)
|
||||
#ELSE (COIN3D_LIBRARY)
|
||||
# SET (COIN3D_LIBRARY coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
|
||||
ENDIF (COIN3D_LIBRARY)
|
||||
|
||||
ENDIF (CYGWIN OR MINGW)
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ELSE (WIN32)
|
||||
IF(APPLE)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/Library/Frameworks/Inventor.framework/Headers
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/Library/Frameworks/Inventor.framework/Libraries
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
||||
ELSE(APPLE)
|
||||
# Try to use pkg-config first...
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(COIN3D Coin)
|
||||
# ... then fall back to manual lookup
|
||||
IF(NOT COIN3D_FOUND)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
/usr/include/Coin3
|
||||
/usr/include
|
||||
/usr/include/coin
|
||||
/usr/local/include
|
||||
)
|
||||
SET(COIN3D_LIBRARY "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
||||
ELSE(APPLE)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARIES Coin
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
PATH_SUFFIXES Coin2 Coin3
|
||||
)
|
||||
ENDIF(NOT COIN3D_FOUND)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/usr/include/Coin3
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
PATH_SUFFIXES Coin2 Coin3
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
IF(COIN3D_LIBRARIES)
|
||||
SET( COIN3D_FOUND "NO" )
|
||||
IF(COIN3D_LIBRARY)
|
||||
SET( COIN3D_FOUND "YES" )
|
||||
message(STATUS "Coin3D libraries found")
|
||||
|
||||
IF(NOT COIN3D_VERSION)
|
||||
file(READ "${COIN3D_INCLUDE_DIRS}/Inventor/C/basic.h" _coin3d_basic_h)
|
||||
string(REGEX MATCH "define[ \t]+COIN_MAJOR_VERSION[ \t]+([0-9?])" _coin3d_major_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MINOR_VERSION[ \t]+([0-9?])" _coin3d_minor_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+COIN_MICRO_VERSION[ \t]+([0-9?])" _coin3d_micro_version_match "${_coin3d_basic_h}")
|
||||
set(COIN3D_MICRO_VERSION "${CMAKE_MATCH_1}")
|
||||
set(COIN3D_VERSION "${COIN3D_MAJOR_VERSION}.${COIN3D_MINOR_VERSION}.${COIN3D_MICRO_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT PIVY_VERSION)
|
||||
execute_process (COMMAND ${Python3_EXECUTABLE} -c "import pivy as p; print(p.__version__,end='')" OUTPUT_VARIABLE PIVY_VERSION)
|
||||
ENDIF()
|
||||
|
||||
ENDIF(COIN3D_LIBRARIES)
|
||||
ENDIF(COIN3D_LIBRARY)
|
||||
|
||||
|
||||
@@ -21,21 +21,20 @@ IF (COIN3D_FOUND)
|
||||
ELSE(APPLE)
|
||||
# Unix systems
|
||||
find_path(COIN3D_DOC_PATH index.html
|
||||
/usr/share/doc/libcoin80-doc/html
|
||||
/usr/share/doc/libcoin60-doc/html
|
||||
/usr/share/doc/coin/html
|
||||
/usr/share/doc/Coin/html
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_PATH})
|
||||
message(STATUS "Coin3D doc is installed")
|
||||
find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE coin.tag
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
|
||||
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
|
||||
@@ -86,5 +85,4 @@ if(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Location: ${COIN3D_DOC_PATH}")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
|
||||
# export for others
|
||||
SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# - Try to find Eigen2 lib
|
||||
# Once done this will define
|
||||
#
|
||||
# EIGEN2_FOUND - system has eigen lib with correct version
|
||||
# EIGEN2_INCLUDE_DIR - the eigen include directory
|
||||
# EIGEN2_VERSION - eigen version
|
||||
|
||||
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
|
||||
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(NOT EIGEN2_MIN_VERSION)
|
||||
if(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
set(Eigen2_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
set(Eigen2_FIND_VERSION_MINOR 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
set(Eigen2_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
|
||||
set(EIGEN2_MIN_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
|
||||
endif(NOT EIGEN2_MIN_VERSION)
|
||||
|
||||
macro(_eigen2_check_version)
|
||||
file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
|
||||
|
||||
string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
|
||||
if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK FALSE)
|
||||
else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK TRUE)
|
||||
endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
|
||||
if(NOT EIGEN2_VERSION_OK)
|
||||
|
||||
message(STATUS "Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, "
|
||||
"but at least version ${EIGEN2_MIN_VERSION} is required")
|
||||
endif(NOT EIGEN2_VERSION_OK)
|
||||
endmacro(_eigen2_check_version)
|
||||
|
||||
if (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen2_check_version()
|
||||
set(EIGEN2_FOUND ${EIGEN2_VERSION_OK})
|
||||
|
||||
else (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
|
||||
PATHS
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES eigen2
|
||||
)
|
||||
|
||||
if(EIGEN2_INCLUDE_DIR)
|
||||
_eigen2_check_version()
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ else (EIGEN3_INCLUDE_DIR)
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
|
||||
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# This module finds the f2c library.
|
||||
#
|
||||
# This module sets the following variables:
|
||||
# F2C_FOUND - set to true if library is found
|
||||
# F2C_DEFINITIONS - compilation options to use f2c
|
||||
# F2C_LIBRARIES - f2c library name (using full path name)
|
||||
|
||||
if (F2C_LIBRARIES)
|
||||
|
||||
set(F2C_FOUND TRUE)
|
||||
|
||||
else(F2C_LIBRARIES)
|
||||
|
||||
set(F2C_DEFINITIONS)
|
||||
|
||||
find_library(F2C_LIBRARIES f2c
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(F2C_LIBRARIES)
|
||||
set(F2C_FOUND TRUE)
|
||||
else()
|
||||
set(F2C_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT F2C_FIND_QUIETLY)
|
||||
if(F2C_FOUND)
|
||||
message(STATUS "f2c library found.")
|
||||
else(F2C_FOUND)
|
||||
if(F2C_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "f2c library not found. Please specify library location.")
|
||||
else()
|
||||
message(STATUS "f2c library not found. Please specify library location.")
|
||||
endif()
|
||||
endif(F2C_FOUND)
|
||||
endif(NOT F2C_FIND_QUIETLY)
|
||||
|
||||
endif(F2C_LIBRARIES)
|
||||
@@ -1,70 +0,0 @@
|
||||
# - Find MED file installation
|
||||
#
|
||||
# The following variable are set:
|
||||
# MEDFILE_INCLUDE_DIRS
|
||||
# MEDFILE_LIBRARIES
|
||||
# MEDFILE_C_LIBRARIES
|
||||
# MEDFILE_F_LIBRARIES
|
||||
# MEDFILE_VERSION
|
||||
#
|
||||
# The CMake (or environment) variable MEDFILE_ROOT_DIR can be set to
|
||||
# guide the detection and indicate a root directory to look into.
|
||||
#
|
||||
############################################################################
|
||||
# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
# ------
|
||||
|
||||
MESSAGE(STATUS "Check for medfile (libmed and libmedc) ...")
|
||||
|
||||
# ------
|
||||
|
||||
SET(MEDFILE_ROOT_DIR $ENV{MEDFILE_ROOT_DIR} CACHE PATH "Path to the MEDFile.")
|
||||
IF(MEDFILE_ROOT_DIR)
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${MEDFILE_ROOT_DIR}")
|
||||
ENDIF(MEDFILE_ROOT_DIR)
|
||||
|
||||
FIND_PATH(MEDFILE_INCLUDE_DIRS med.h PATH_SUFFIXES med)
|
||||
FIND_FILE(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
IF(NOT meddotH)
|
||||
MESSAGE(FATAL_ERROR "med.h not found, please install development header-files for libmedc")
|
||||
ENDIF(NOT meddotH)
|
||||
#FIND_PROGRAM(MDUMP mdump)
|
||||
FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC)
|
||||
FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med)
|
||||
IF(MEDFILE_F_LIBRARIES)
|
||||
SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES})
|
||||
ELSE(MEDFILE_F_LIBRARIES)
|
||||
SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES})
|
||||
ENDIF(MEDFILE_F_LIBRARIES)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES)
|
||||
|
||||
IF(meddotH)
|
||||
FILE(READ "${meddotH}" _med_h)
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MAJOR_NUM[ \t]+([0-9?])" _med_major_version_match "${_med_h}")
|
||||
SET(MED_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MINOR_NUM[ \t]+([0-9?])" _med_minor_version_match "${_med_h}")
|
||||
SET(MED_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_RELEASE_NUM[ \t]+([0-9?])" _med_release_version_match "${_med_h}")
|
||||
SET(MED_RELEASE_VERSION "${CMAKE_MATCH_1}")
|
||||
SET(MEDFILE_VERSION "${MED_MAJOR_VERSION}.${MED_MINOR_VERSION}.${MED_RELEASE_VERSION}")
|
||||
ENDIF()
|
||||
@@ -9,7 +9,7 @@
|
||||
# MATPLOTLIB_VERSION_PATCH - the patch version number of matplotlib
|
||||
# MATPLOTLIB_PATH_DIRS - path to the matplotlib include files
|
||||
|
||||
IF(Python3_Interpreter_FOUND)
|
||||
IF(PYTHONINTERP_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
|
||||
+25
-161
@@ -1,175 +1,39 @@
|
||||
# Try to find nglib/netgen
|
||||
#
|
||||
# Optional input NETGENDATA is path to the netgen libsrc source tree - this is
|
||||
# required due to some headers not being installed by netgen.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# NGLIB_INCLUDE_DIR - where the nglib include directory can be found
|
||||
# NGLIB_LIBRARIES - Link this to use nglib
|
||||
# NETGEN_INCLUDE_DIRS - where the netgen include directories can be found
|
||||
# NETGEN_DEFINITIONS - C++ compiler defines required to use netgen/nglib
|
||||
#
|
||||
# See also: http://git.salome-platform.org/gitweb/?p=NETGENPLUGIN_SRC.git;a=summary
|
||||
|
||||
# nglib
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR nglib.h /usr/include)
|
||||
FIND_LIBRARY(NGLIB_LIBRARIES nglib /usr/lib /usr/local/lib)
|
||||
|
||||
find_package(Netgen CONFIG)
|
||||
if(Netgen_FOUND)
|
||||
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
|
||||
set(NGLIB_LIBRARIES nglib)
|
||||
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
# for external smesh only the following two variables are needed:
|
||||
set(NETGEN_FOUND True)
|
||||
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
|
||||
# netgen headers
|
||||
SET(NETGEN_INCLUDE_DIRS)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
|
||||
else(Netgen_FOUND)
|
||||
if(NOT NETGENDATA)
|
||||
SET(NETGENDATA /usr/share/netgen/libsrc)
|
||||
endif()
|
||||
|
||||
FIND_PATH(NETGEN_DIR_csg csg.hpp PATHS ${NETGENDATA}/csg)
|
||||
FIND_PATH(NETGEN_DIR_gen array.hpp PATHS ${NETGENDATA}/general)
|
||||
FIND_PATH(NETGEN_DIR_geom2d geom2dmesh.hpp PATHS ${NETGENDATA}/geom2d)
|
||||
FIND_PATH(NETGEN_DIR_gprim gprim.hpp PATHS ${NETGENDATA}/gprim)
|
||||
FIND_PATH(NETGEN_DIR_la linalg.hpp PATHS ${NETGENDATA}/linalg)
|
||||
FIND_PATH(NETGEN_DIR_mesh meshing.hpp PATHS ${NETGENDATA}/meshing)
|
||||
FIND_PATH(NETGEN_DIR_occ occgeom.hpp PATHS ${NETGENDATA}/occ)
|
||||
FIND_PATH(NETGEN_DIR_stlgeom stlgeom.hpp PATHS ${NETGENDATA}/stlgeom)
|
||||
|
||||
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_csg})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_gen})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_geom2d})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_gprim})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_la})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_mesh})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_occ})
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS} ${NETGEN_DIR_stlgeom})
|
||||
|
||||
IF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
# We haven't supported Netgen prior to 5.3.1 on MacOS, and the current
|
||||
# plan is for the next Netgen version to be 6.1 (currently unreleased).
|
||||
IF(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${HOMEBREW_PREFIX})
|
||||
ELSE(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${MACPORTS_PREFIX})
|
||||
ENDIF(DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR nglib.h ${NGLIB_PREFIX}/include)
|
||||
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBMESH mesh ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBOCC occ ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE interface ${NGLIB_PREFIX}/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB} ${NGLIB_LIBMESH}
|
||||
${NGLIB_LIBOCC} ${NGLIB_LIBINTERFACE})
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NGLIB_PREFIX}/include/netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ELSEIF(WIN32)
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
|
||||
SET(NETGEN_LIBS nglib mesh occ interface)
|
||||
SET(NGLIB_LIBRARIES "")
|
||||
FOREACH(it ${NETGEN_LIBS})
|
||||
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
|
||||
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
|
||||
IF(NGLIBD AND NGLIB)
|
||||
SET(NG_LIB optimized ${NGLIB}
|
||||
debug ${NGLIBD})
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
UNSET(NGLIBD CACHE)
|
||||
ELSEIF(NGLIB)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ELSE(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
IF(NETGEN_ROOT)
|
||||
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
|
||||
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
|
||||
# allow to customize if NETGEN_ROOT is used
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
|
||||
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBMESH)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBOCC)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBINTERFACE)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA /usr/share/netgen/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ENDIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
|
||||
|
||||
IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
|
||||
MESSAGE(STATUS "Cannot find NETGEN header files.")
|
||||
ELSEIF(NOT NETGEN_VERSION)
|
||||
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
|
||||
REGEX "#define PACKAGE_VERSION.*"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NGLIB_LIBRARIES)
|
||||
MESSAGE(STATUS "Cannot find NETGEN library.")
|
||||
ENDIF()
|
||||
|
||||
IF(NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
|
||||
SET(Netgen_FOUND TRUE)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
|
||||
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
|
||||
ELSE()
|
||||
SET(Netgen_FOUND FALSE)
|
||||
ENDIF()
|
||||
endif(Netgen_FOUND)
|
||||
|
||||
# Package-provided cMake file is not enough
|
||||
IF(Netgen_FOUND)
|
||||
IF(NOT NETGEN_VERSION_MAJOR)
|
||||
IF(NETGEN_VERSION)
|
||||
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
|
||||
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
|
||||
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
|
||||
IF(NETGEN_VERSION_COUNT GREATER 1)
|
||||
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
|
||||
ELSE()
|
||||
set(NETGEN_VERSION_MINOR 0)
|
||||
ENDIF()
|
||||
ELSE() # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
|
||||
# better use "find_package(netgen CONFIG REQUIRED)"
|
||||
set(NETGEN_VERSION_MAJOR 6)
|
||||
set(NETGEN_VERSION_MINOR 2)
|
||||
ENDIF()
|
||||
set(NETGEN_VERSION_PATCH 0)
|
||||
ENDIF()
|
||||
|
||||
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
|
||||
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
|
||||
MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)")
|
||||
IF(NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Clang sometimes fails to include <cstdio>
|
||||
include(CMakePushCheckState)
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY1)
|
||||
# Ugly hack to make <stdio.h> building gets function
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY2)
|
||||
message(FATAL_ERROR "Cannot #include <cstdio>.")
|
||||
ELSE()
|
||||
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
cmake_pop_check_state()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
|
||||
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
|
||||
ENDIF()
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
# - Try to find the Open Dynamics Engine library
|
||||
# Once done this will define:
|
||||
#
|
||||
# ODE_FOUND - system has the ODE library
|
||||
# ODE_INCLUDE_DIRS - the ODE include directory (include ODE headers with <ode/headername.h>)
|
||||
# ODE_LIBRARIES - the ODE library
|
||||
# ODE_DEFINITIONS - additional definitions necessary to use ODE (usually the precision flag)
|
||||
|
||||
if (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
# ODE has already been found and the necessary variables are cached
|
||||
set(ODE_FOUND TRUE)
|
||||
else (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
# Find ODE
|
||||
|
||||
# Use PkgConfig if possible
|
||||
if (NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_ODE ode)
|
||||
endif (NOT WIN32)
|
||||
|
||||
# Find include dir
|
||||
find_path(ODE_INCLUDE_DIRS ode/ode.h
|
||||
HINTS ${PC_ODE_INCLUDEDIR}
|
||||
PATHS $ENV{OGRE_HOME}/include # ODE is shipped with the OGRE SDK
|
||||
)
|
||||
find_library(ODE_LIBRARIES ode
|
||||
NAMES ode ${PC_ODE_LIBRARIES}
|
||||
HINTS ${PC_ODE_LIBDIR}
|
||||
PATHS $ENV{OGRE_HOME}/lib
|
||||
)
|
||||
|
||||
# Decide if ODE was found
|
||||
set(ODE_FOUND FALSE)
|
||||
if (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
set(ODE_FOUND TRUE)
|
||||
endif (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
|
||||
# Find out extra definitions needed for ODE.
|
||||
# This is mostly needed for the ODE's precision selector:
|
||||
# ODE can be built either in single-precision (default) or double-precision mode. The app has
|
||||
# to be built in the same mode, otherwise things will crash.
|
||||
if (ODE_FOUND)
|
||||
# If PkgConfig found anything, then use its results, otherwise use ode-config script
|
||||
if (PC_ODE_FOUND)
|
||||
# Take the definitions from PkgConfig results
|
||||
set(ODE_DEFINITIONS ${PC_ODE_CFLAGS_OTHER} CACHE STRING "")
|
||||
set(ODE_DEFINITIONS_FOUND TRUE)
|
||||
else (PC_ODE_FOUND)
|
||||
# Try to use ode-config
|
||||
find_program(ODECONFIG_EXECUTABLE ode-config)
|
||||
if (ODECONFIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${ODECONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ODECONFIG_CFLAGS)
|
||||
set(ODE_DEFINITIONS ${ODECONFIG_CFLAGS} CACHE STRING "")
|
||||
set(ODE_DEFINITIONS_FOUND TRUE)
|
||||
endif (ODECONFIG_EXECUTABLE)
|
||||
endif (PC_ODE_FOUND)
|
||||
endif (ODE_FOUND)
|
||||
|
||||
# Show messages
|
||||
if (ODE_FOUND)
|
||||
if (NOT ODE_FIND_QUIETLY)
|
||||
message(STATUS "Found ODE: ${ODE_LIBRARIES}")
|
||||
# Show the ODE precision if the definitions were detected
|
||||
if (ODE_DEFINITIONS_FOUND)
|
||||
if (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
message(STATUS "ODE uses double precision")
|
||||
else (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
message(STATUS "ODE uses single precision")
|
||||
endif (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
else (ODE_DEFINITIONS_FOUND)
|
||||
message(STATUS "Warning: couldn't determine ODE's precision")
|
||||
endif (ODE_DEFINITIONS_FOUND)
|
||||
endif (NOT ODE_FIND_QUIETLY)
|
||||
else (ODE_FOUND)
|
||||
if (ODE_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find ODE")
|
||||
endif (ODE_FIND_REQUIRED)
|
||||
endif (ODE_FOUND)
|
||||
|
||||
endif(ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
@@ -1,7 +1,7 @@
|
||||
# - Try to find OpenCV library installation
|
||||
# See http://sourceforge.net/projects/opencvlibrary/
|
||||
#
|
||||
# The following variables are optionally searched for defaults
|
||||
# The follwoing variables are optionally searched for defaults
|
||||
# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use.
|
||||
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.
|
||||
|
||||
+31
-74
@@ -9,24 +9,14 @@
|
||||
|
||||
# First try to find OpenCASCADE Community Edition
|
||||
if(NOT DEFINED OCE_DIR)
|
||||
# Check for OSX needs to come first because UNIX evaluates to true on OSX
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
|
||||
elseif(DEFINED HOMEBREW_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
if(UNIX)
|
||||
set(OCE_DIR "/usr/local/share/cmake/")
|
||||
elseif(WIN32)
|
||||
set(OCE_DIR "c:/OCE-0.4.0/share/cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${FREECAD_USE_OCC_VARIANT} MATCHES "Community Edition")
|
||||
find_package(OCE QUIET)
|
||||
endif()
|
||||
|
||||
find_package(OCE QUIET)
|
||||
if(OCE_FOUND)
|
||||
message(STATUS "-- OpenCASCADE Community Edition has been found.")
|
||||
# Disable this define. For more details see bug #0001872
|
||||
@@ -34,47 +24,9 @@ if(OCE_FOUND)
|
||||
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
|
||||
#set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR})
|
||||
else(OCE_FOUND) #look for OpenCASCADE
|
||||
# we first try to find opencascade directly:
|
||||
if(NOT OCCT_CMAKE_FALLBACK)
|
||||
find_package(OpenCASCADE CONFIG QUIET)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0))
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif()
|
||||
endif(NOT OCCT_CMAKE_FALLBACK)
|
||||
if(OpenCASCADE_FOUND)
|
||||
set(OCC_FOUND ${OpenCASCADE_FOUND})
|
||||
set(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR})
|
||||
set(OCC_LIBRARY_DIR ${OpenCASCADE_LIBRARY_DIR})
|
||||
set(OCC_LIBRARIES ${OpenCASCADE_LIBRARIES})
|
||||
set(OCC_OCAF_LIBRARIES TKCAF TKXCAF)
|
||||
else(OpenCASCADE_FOUND)
|
||||
if(WIN32)
|
||||
if(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
else(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif(CYGWIN OR MINGW)
|
||||
else(WIN32)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
if(WIN32)
|
||||
if(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
@@ -85,16 +37,30 @@ else(OCE_FOUND) #look for OpenCASCADE
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif(WIN32)
|
||||
if(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
IF(NOT OCC_INCLUDE_DIR)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
ENDIF()
|
||||
endif(OCC_LIBRARY)
|
||||
endif(OpenCASCADE_FOUND)
|
||||
else(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif(CYGWIN OR MINGW)
|
||||
else(WIN32)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif(WIN32)
|
||||
if(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
endif(OCC_LIBRARY)
|
||||
endif(OCE_FOUND)
|
||||
|
||||
if(OCC_INCLUDE_DIR)
|
||||
@@ -139,35 +105,26 @@ if(OCC_FOUND)
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEP
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKSTEP209
|
||||
TKSTEP
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
)
|
||||
if(OCC_VERSION_STRING VERSION_LESS 6.7.3)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKAdvTools)
|
||||
elseif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKRWMesh)
|
||||
endif(OCC_VERSION_STRING VERSION_LESS 6.7.3)
|
||||
message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
else(OCC_FOUND)
|
||||
#message(SEND_ERROR "Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
message("Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
endif(OCC_FOUND)
|
||||
|
||||
+22
-42
@@ -5,7 +5,6 @@
|
||||
# PYCXX_SOURCE_DIR
|
||||
# PYCXX_FOUND
|
||||
# PYCXX_SOURCES
|
||||
# PYCXX_VERSION
|
||||
#
|
||||
# The PYCXX_*_DIR variables can be set to tell this module where
|
||||
# the files are.
|
||||
@@ -28,13 +27,13 @@ if(PYCXX_INCLUDE_DIR)
|
||||
if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(WARNING
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||
else(PYCXX_INCLUDE_DIR)
|
||||
@@ -45,11 +44,11 @@ else(PYCXX_INCLUDE_DIR)
|
||||
if(NOT PYCXX_INCLUDE_DIR)
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX not found; please set PYCXX_INCLUDE_DIR to "
|
||||
"the location of CXX/Config.hxx")
|
||||
"PyCXX not found; please set PYCXX_INCLUDE_DIR to "
|
||||
"the location of CXX/Config.hxx")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
unset(PYCXX_FOUND)
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT PYCXX_INCLUDE_DIR)
|
||||
endif(PYCXX_INCLUDE_DIR)
|
||||
@@ -59,14 +58,14 @@ if(PYCXX_SOURCE_DIR)
|
||||
# source directory specified, they'd better be there
|
||||
if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
|
||||
"${PYCXX_SOURCE_DIR}")
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(WARNING
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
|
||||
"${PYCXX_SOURCE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||
else(PYCXX_SOURCE_DIR)
|
||||
@@ -80,48 +79,29 @@ else(PYCXX_SOURCE_DIR)
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../CXX")
|
||||
if(NOT PYCXX_SOURCE_DIR)
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX not found; please set PYCXX_SOURCE_DIR to "
|
||||
"the location of cxxextensions.c")
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX not found; please set PYCXX_SOURCE_DIR to "
|
||||
"the location of cxxextensions.c")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
unset(PYCXX_FOUND)
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT PYCXX_SOURCE_DIR)
|
||||
endif(PYCXX_SOURCE_DIR)
|
||||
|
||||
# Find PyCXX Version
|
||||
if(PYCXX_INCLUDE_DIR AND PYCXX_SOURCE_DIR)
|
||||
file(READ ${PYCXX_INCLUDE_DIR}/CXX/Version.hxx PYCXX_VERSION_H)
|
||||
foreach(item IN ITEMS MAJOR MINOR PATCH)
|
||||
string(REGEX REPLACE
|
||||
".*#define[ \t]+PYCXX_VERSION_${item}[ \t]+([0-9]+).*"
|
||||
"\\1" PYCXX_VERSION_${item}
|
||||
"${PYCXX_VERSION_H}"
|
||||
)
|
||||
endforeach()
|
||||
set(PYCXX_VERSION ${PYCXX_VERSION_MAJOR}.${PYCXX_VERSION_MINOR}.${PYCXX_VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
# see what we've got
|
||||
if(PYCXX_FOUND)
|
||||
MESSAGE(STATUS "PyCXX found:")
|
||||
MESSAGE(STATUS " Headers: ${PYCXX_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS " Sources: ${PYCXX_SOURCE_DIR}")
|
||||
MESSAGE(STATUS " Version: ${PYCXX_VERSION}")
|
||||
|
||||
# Build the list of sources for convenience
|
||||
set(PYCXX_SOURCES
|
||||
${PYCXX_SOURCE_DIR}/cxxextensions.c
|
||||
${PYCXX_SOURCE_DIR}/cxx_extensions.cxx
|
||||
${PYCXX_SOURCE_DIR}/cxxsupport.cxx
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
${PYCXX_SOURCE_DIR}/cxxextensions.c
|
||||
${PYCXX_SOURCE_DIR}/cxx_extensions.cxx
|
||||
${PYCXX_SOURCE_DIR}/cxxsupport.cxx
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
)
|
||||
if(NOT ${PYCXX_VERSION} VERSION_LESS 7.0.0)
|
||||
list(APPEND PYCXX_SOURCES
|
||||
${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
endif()
|
||||
else(PYCXX_FOUND)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
endif(PYCXX_FOUND)
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
# Try to find PySide2 utilities, PYSIDE2UIC and PYSIDE2RCC:
|
||||
# PYSIDE2UICBINARY - Location of PYSIDE2UIC executable
|
||||
# PYSIDE2RCCBINARY - Location of PYSIDE2RCC executable
|
||||
# PYSIDE2_TOOLS_FOUND - PySide2 utilities found.
|
||||
|
||||
# Also provides macro similar to FindQt4.cmake's WRAP_UI and WRAP_RC,
|
||||
# for the automatic generation of Python code from Qt4's user interface
|
||||
# ('.ui') and resource ('.qrc') files. These macros are called:
|
||||
# - PYSIDE_WRAP_UI
|
||||
# - PYSIDE_WRAP_RC
|
||||
|
||||
IF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
|
||||
# Already in cache, be silent
|
||||
set(PYSIDE2_TOOLS_FOUND_QUIETLY TRUE)
|
||||
ENDIF(PYSIDE2UICBINARY AND PYSIDE2RCCBINARY)
|
||||
|
||||
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
#pyside2 tools are often in same location as python interpreter
|
||||
get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH)
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
|
||||
# We test Qt5Core version to act accordingly
|
||||
|
||||
FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
|
||||
|
||||
IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
# Legacy (< 5.14)
|
||||
FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
set(UICOPTIONS "")
|
||||
set(RCCOPTIONS "")
|
||||
ELSE()
|
||||
# New (>= 5.14)
|
||||
if (TARGET Qt::uic)
|
||||
get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION)
|
||||
set(UICOPTIONS "--generator=python")
|
||||
endif()
|
||||
if (TARGET Qt::rcc)
|
||||
get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION)
|
||||
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
endif()
|
||||
ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
if (NOT PYSIDE2UICBINARY)
|
||||
message(FATAL_ERROR "Qt uic is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside2-uic generates in comments at beginning., which is why
|
||||
# we follow the tool command with a POSIX-friendly sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_UI)
|
||||
|
||||
MACRO(PYSIDE_WRAP_RC outfiles)
|
||||
if (NOT PYSIDE2RCCBINARY)
|
||||
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
|
||||
endif()
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py")
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
if(WIN32 OR APPLE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
else()
|
||||
# Especially on Open Build Service we don't want changing date like
|
||||
# pyside-rcc generates in comments at beginning, which is why
|
||||
# we follow the tool command with in-place sed.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
|
||||
COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
|
||||
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endif()
|
||||
list(APPEND ${outfiles} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_RC)
|
||||
|
||||
if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
set(PYSIDE2_TOOLS_FOUND TRUE)
|
||||
if (NOT PySide2Tools_FIND_QUIETLY)
|
||||
message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
if(PySide2Tools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
|
||||
else(PySide2Tools_FIND_REQUIRED)
|
||||
if (NOT PySide2Tools_FIND_QUIETLY)
|
||||
message(STATUS "PySide2 tools: not found.")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
endif(PySide2Tools_FIND_REQUIRED)
|
||||
endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY)
|
||||
@@ -0,0 +1,77 @@
|
||||
# Try to find PySide utilities, PYSIDEUIC4 and PYSIDERCC4:
|
||||
# PYSIDEUIC4BINARY - Location of PYSIDEUIC4 executable
|
||||
# PYSIDERCC4BINARY - Location of PYSIDERCC4 executable
|
||||
# PYSIDE_TOOLS_FOUND - PySide utilities found.
|
||||
|
||||
# Also provides macro similar to FindQt4.cmake's WRAP_UI and WRAP_RC,
|
||||
# for the automatic generation of Python code from Qt4's user interface
|
||||
# ('.ui') and resource ('.qrc') files. These macros are called:
|
||||
# - PYSIDE_WRAP_UI
|
||||
# - PYSIDE_WRAP_RC
|
||||
|
||||
IF(PYSIDEUIC4BINARY AND PYSIDERCC4BINARY)
|
||||
# Already in cache, be silent
|
||||
set(PYSIDE_TOOLS_FOUND_QUIETLY TRUE)
|
||||
ENDIF(PYSIDEUIC4BINARY AND PYSIDERCC4BINARY)
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
#pyside tools are often in same location as python interpreter
|
||||
get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH)
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR APPLE)
|
||||
|
||||
FIND_PROGRAM(PYSIDEUIC4BINARY pyside-uic HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDERCC4BINARY pyside-rcc HINTS ${PYSIDE_BIN_DIR})
|
||||
|
||||
#message(STATUS "PYSIDEUIC4BINARY ${PYSIDEUIC4BINARY}" )
|
||||
#message(STATUS "PYSIDERCC4BINARY ${PYSIDERCC4BINARY}" )
|
||||
|
||||
MACRO(PYSIDE_WRAP_UI outfiles)
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDEUIC4BINARY} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_UI)
|
||||
|
||||
MACRO(PYSIDE_WRAP_RC outfiles)
|
||||
FOREACH(it ${ARGN})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py)
|
||||
#ADD_CUSTOM_TARGET(${it} ALL
|
||||
# DEPENDS ${outfile}
|
||||
#)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${PYSIDERCC4BINARY} ${infile} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH(it)
|
||||
ENDMACRO (PYSIDE_WRAP_RC)
|
||||
|
||||
IF(EXISTS ${PYSIDEUIC4BINARY} AND EXISTS ${PYSIDERCC4BINARY})
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
ENDIF(EXISTS ${PYSIDEUIC4BINARY} AND EXISTS ${PYSIDERCC4BINARY})
|
||||
|
||||
if(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)
|
||||
if (NOT PySideTools_FIND_QUIETLY)
|
||||
message(STATUS "Found PySide Tools: ${PYSIDEUIC4BINARY}, ${PYSIDERCC4BINARY}")
|
||||
endif (NOT PySideTools_FIND_QUIETLY)
|
||||
else(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)
|
||||
if(PySideTools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PySideTools could not be not found, but are required.")
|
||||
else(PySideTools_FIND_REQUIRED)
|
||||
if (NOT PySideTools_FIND_QUIETLY)
|
||||
message(STATUS "PySideTools: not found.")
|
||||
endif (NOT PySideTools_FIND_QUIETLY)
|
||||
endif(PySideTools_FIND_REQUIRED)
|
||||
endif(PYSIDERCC4BINARY AND PYSIDEUIC4BINARY)
|
||||
@@ -0,0 +1,115 @@
|
||||
#############################################################################
|
||||
# Description:
|
||||
# Try to find SoQt library.
|
||||
# Once run this will define:
|
||||
#
|
||||
# SOQT_FOUND
|
||||
# SOQT_LIBRARIES
|
||||
# SOQT_LIBRARY_RELEASE
|
||||
# SOQT_LIBRARY_DEBUG
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
IF(UNIX OR WIN32)
|
||||
|
||||
IF(WIN32)
|
||||
IF(MINGW)
|
||||
FIND_LIBRARY(SOQT_LIBRARY
|
||||
NAMES SoQt #only shared libraries under windows
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/lib
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
ELSE(MINGW)
|
||||
FIND_LIBRARY(SOQT_LIBRARY_RELEASE
|
||||
#only shared libraries under windows
|
||||
NAMES soqt1
|
||||
PATHS
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
FIND_LIBRARY(SOQT_LIBRARY_DEBUG
|
||||
NAMES soqt1d #only shared libraries under windows
|
||||
PATHS
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
|
||||
FIND_PATH(SOQT_INCLUDE_PATH Inventor/Qt/SoQt.h
|
||||
"$ENV{COINDIR}/include"
|
||||
"$ENV{INCLUDE}"
|
||||
)
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARY_DEBUG
|
||||
SOQT_LIBRARY_RELEASE
|
||||
SOQT_INCLUDE_PATH
|
||||
)
|
||||
ENDIF(MINGW)
|
||||
ELSE(WIN32)
|
||||
FIND_LIBRARY(SOQT_LIBRARY
|
||||
NAMES SoQt #only shared libraries under windows
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/lib
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
|
||||
#MESSAGE(STATUS "DBG SOQT_LIBRARY=${SOQT_LIBRARY}")
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
## --------------------------------
|
||||
|
||||
IF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
|
||||
IF(WIN32)
|
||||
IF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
|
||||
SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
|
||||
ENDIF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
|
||||
IF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
|
||||
SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
|
||||
ENDIF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
|
||||
IF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
|
||||
SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
|
||||
SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
|
||||
ENDIF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
|
||||
IF(MINGW)
|
||||
SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARIES
|
||||
SOQT_LIBRARY
|
||||
)
|
||||
ENDIF(MINGW)
|
||||
ELSE(WIN32)
|
||||
SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARIES
|
||||
SOQT_LIBRARY
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
SET(SOQT_FOUND TRUE)
|
||||
ELSE(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
SET(SOQT_FOUND FALSE)
|
||||
#MESSAGE("SoQt library not found.")
|
||||
ENDIF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
|
||||
IF(WIN32)
|
||||
IF(SOQT_INCLUDE_PATH)
|
||||
set(SOQT_INCLUDE_DIR ${SOQT_INCLUDE_PATH})
|
||||
ELSE(SOQT_INCLUDE_PATH)
|
||||
#MESSAGE("Can not find SoQt includes")
|
||||
ENDIF(SOQT_INCLUDE_PATH)
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_INCUDE_DIR
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
|
||||
#MESSAGE(STATUS "SOQT_FOUND : ${SOQT_FOUND}")
|
||||
|
||||
ELSE(UNIX OR WIN32)
|
||||
SET(SOQT_FOUND FALSE)
|
||||
ENDIF(UNIX OR WIN32)
|
||||
@@ -24,6 +24,6 @@ if(SPNAV_FOUND)
|
||||
set(SPNAV_LIBRARIES ${SPNAV_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SPNAV_LIBRARY SPNAV_INCLUDE_DIR)
|
||||
mark_as_advanced(SPANV_LIBRARY SPNAV_INCLUDE_DIR)
|
||||
|
||||
ENDIF(UNIX)
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
# - Try to find Windows Installer XML
|
||||
# See http://wix.sourceforge.net
|
||||
#
|
||||
# The follwoing variables are optionally searched for defaults
|
||||
# WIX_ROOT_DIR: Base directory of WIX2 tree to use.
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
# WIX_FOUND
|
||||
# WIX_ROOT_DIR
|
||||
# WIX_CANDLE
|
||||
# WIX_LIGHT
|
||||
#
|
||||
# 2009/02 Petr Pytelka (pyta at lightcomp.cz)
|
||||
#
|
||||
|
||||
MACRO(DBG_MSG _MSG)
|
||||
# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\n ${_MSG}")
|
||||
ENDMACRO(DBG_MSG)
|
||||
|
||||
|
||||
# typical root dirs of installations, exactly one of them is used
|
||||
SET (WIX_POSSIBLE_ROOT_DIRS
|
||||
"${WIX_ROOT_DIR}"
|
||||
"$ENV{WIX_ROOT_DIR}"
|
||||
"$ENV{ProgramFiles}/Windows Installer XML"
|
||||
)
|
||||
|
||||
|
||||
#DBG_MSG("DBG (WIX_POSSIBLE_ROOT_DIRS=${WIX_POSSIBLE_ROOT_DIRS}")
|
||||
|
||||
#
|
||||
# select exactly ONE WIX base directory/tree
|
||||
# to avoid mixing different version headers and libs
|
||||
#
|
||||
FIND_PATH(WIX_ROOT_DIR
|
||||
NAMES
|
||||
bin/candle.exe
|
||||
bin/light.exe
|
||||
PATHS ${WIX_POSSIBLE_ROOT_DIRS})
|
||||
DBG_MSG("WIX_ROOT_DIR=${WIX_ROOT_DIR}")
|
||||
|
||||
|
||||
#
|
||||
# Logic selecting required libs and headers
|
||||
#
|
||||
SET(WIX_FOUND OFF)
|
||||
IF(WIX_ROOT_DIR)
|
||||
SET(WIX_FOUND ON)
|
||||
ENDIF(WIX_ROOT_DIR)
|
||||
|
||||
|
||||
# display help message
|
||||
IF(NOT WIX_FOUND)
|
||||
# make FIND_PACKAGE friendly
|
||||
IF(NOT WIX_FIND_QUIETLY)
|
||||
IF(WIX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"Windows Installer XML required but some files not found. Please specify it's location with WIX_ROOT_DIR env. variable.")
|
||||
ELSE(WIX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS
|
||||
"ERROR: Windows Installer XML was not found.")
|
||||
ENDIF(WIX_FIND_REQUIRED)
|
||||
ENDIF(NOT WIX_FIND_QUIETLY)
|
||||
ELSE(NOT WIX_FOUND)
|
||||
SET(WIX_CANDLE ${WIX_ROOT_DIR}/bin/candle.exe)
|
||||
SET(WIX_LIGHT ${WIX_ROOT_DIR}/bin/light.exe)
|
||||
# MESSAGE(STATUS "Windows Installer XML found.")
|
||||
ENDIF(NOT WIX_FOUND)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WIX_ROOT_DIR
|
||||
WIX_CANDLE
|
||||
WIX_LIGHT
|
||||
)
|
||||
|
||||
#
|
||||
# Call wix compiler
|
||||
#
|
||||
# Parameters:
|
||||
# _sources - name of list with sources
|
||||
# _obj - name of list for target objects
|
||||
#
|
||||
MACRO(WIX_COMPILE _sources _objs _extra_dep)
|
||||
DBG_MSG("WIX compile: ${${_sources}}")
|
||||
FOREACH (_current_FILE ${${_sources}})
|
||||
GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
|
||||
|
||||
SET (SOURCE_WIX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${_current_FILE} )
|
||||
DBG_MSG("WIX source file: ${SOURCE_WIX_FILE}")
|
||||
|
||||
# Check whether source exists
|
||||
IF(EXISTS ${SOURCE_WIX_FILE})
|
||||
ELSE(EXISTS ${SOURCE_WIX_FILE})
|
||||
MESSAGE(FATAL_ERROR "Path not exists: ${SOURCE_WIX_FILE}")
|
||||
ENDIF(EXISTS ${SOURCE_WIX_FILE})
|
||||
|
||||
SET (OUTPUT_WIXOBJ ${_basename}.wixobj )
|
||||
|
||||
DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
|
||||
DBG_MSG("WIX command: ${WIX_CANDLE}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
|
||||
COMMAND ${WIX_CANDLE}
|
||||
ARGS ${WIX_CANDLE_FLAGS} ${SOURCE_WIX_FILE}
|
||||
DEPENDS ${SOURCE_WIX_FILE} ${${_extra_dep}}
|
||||
COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
|
||||
)
|
||||
SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
|
||||
DBG_MSG("WIX compile output: ${${_objs}}")
|
||||
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(WIX_COMPILE)
|
||||
|
||||
#
|
||||
# Call wix compiler
|
||||
#
|
||||
# Parameters:
|
||||
# _sources - name of list with sources
|
||||
# _obj - name of list for target objects
|
||||
#
|
||||
MACRO(WIX_COMPILE_ALL _target _sources _extra_dep)
|
||||
DBG_MSG("WIX compile all: ${${_sources}}, dependencies: ${${_extra_dep}}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_target}
|
||||
COMMAND ${WIX_CANDLE}
|
||||
ARGS ${WIX_CANDLE_FLAGS} -out "${_target}" ${${_sources}}
|
||||
DEPENDS ${${_sources}} ${${_extra_dep}}
|
||||
COMMENT "Compiling ${${_sources}} -> ${_target}"
|
||||
)
|
||||
|
||||
ENDMACRO(WIX_COMPILE_ALL)
|
||||
|
||||
|
||||
#
|
||||
# Link MSI file
|
||||
#
|
||||
# Parameters
|
||||
# _target - Name of target file
|
||||
# _sources - Name of list with sources
|
||||
#
|
||||
MACRO(WIX_LINK _target _sources _loc_files)
|
||||
DBG_MSG("WIX command: ${WIX_LIGHT}\n WIX target: ${_target} objs: ${${_sources}}")
|
||||
|
||||
SET( WIX_LINK_FLAGS_A "" )
|
||||
# Add localization
|
||||
FOREACH (_current_FILE ${${_loc_files}})
|
||||
SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS_A} -loc "${_current_FILE}" )
|
||||
DBG_MSG("WIX link localization: ${_current_FILE}")
|
||||
ENDFOREACH (_current_FILE)
|
||||
DBG_MSG("WIX link flags: ${WIX_LINK_FLAGS_A}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_target}
|
||||
COMMAND ${WIX_LIGHT}
|
||||
ARGS ${WIX_LINK_FLAGS_A} -out "${_target}" ${${_sources}}
|
||||
DEPENDS ${${_sources}}
|
||||
COMMENT "Linking ${${_sources}} -> ${_target}"
|
||||
)
|
||||
|
||||
ENDMACRO(WIX_LINK)
|
||||
@@ -0,0 +1,48 @@
|
||||
# Locate Xerces-C include paths and libraries
|
||||
# Xerces-C can be found at http://xml.apache.org/xerces-c/
|
||||
# Written by Frederic Heem, frederic.heem _at_ telsey.it
|
||||
# Modified by Jos van den Oever
|
||||
|
||||
# This module defines
|
||||
# XERCESC_INCLUDE_DIR, where to find ptlib.h, etc.
|
||||
# XERCESC_LIBRARIES, the libraries to link against to use pwlib.
|
||||
# XERCESC_FOUND, If false, don't try to use pwlib.
|
||||
|
||||
FIND_PATH(XERCESC_INCLUDE_DIR xercesc/dom/DOM.hpp
|
||||
"[HKEY_CURRENT_USER\\software\\xerces-c\\src]"
|
||||
"[HKEY_CURRENT_USER\\xerces-c\\src]"
|
||||
$ENV{XERCESCROOT}/src/
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(XERCESC_LIBRARIES
|
||||
NAMES
|
||||
xerces-c
|
||||
PATHS
|
||||
"[HKEY_CURRENT_USER\\software\\xerces-c\\lib]"
|
||||
"[HKEY_CURRENT_USER\\xerces-c\\lib]"
|
||||
$ENV{XERCESCROOT}/${LIB_DESTINATION}
|
||||
/usr/local/${LIB_DESTINATION}
|
||||
/usr/${LIB_DESTINATION}
|
||||
)
|
||||
|
||||
# if the include a the library are found then we have it
|
||||
IF(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
SET(XERCESC_FOUND "YES" )
|
||||
IF(NOT XERCESC__FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Xerces-C: ${XERCESC_LIBRARIES}")
|
||||
ENDIF(NOT XERCESC__FIND_QUIETLY)
|
||||
ELSE(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
IF(XERCESC_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Xerces-C was not found.")
|
||||
ENDIF(XERCESC_FIND_REQUIRED)
|
||||
IF(NOT XERCESC__FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Xerces-C was not found.")
|
||||
ENDIF(NOT XERCESC__FIND_QUIETLY)
|
||||
ENDIF(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
|
||||
#MARK_AS_ADVANCED(
|
||||
# XERCESC_INCLUDE_DIR
|
||||
# XERCESC_LIBRARIES
|
||||
#)
|
||||
@@ -1,9 +0,0 @@
|
||||
macro(BuildAndInstallDesignerPlugin)
|
||||
# =================================================================
|
||||
# ============= Build and install the designer plugin =============
|
||||
# =================================================================
|
||||
|
||||
if(BUILD_DESIGNER_PLUGIN)
|
||||
add_subdirectory(src/Tools/plugins/widget)
|
||||
endif(BUILD_DESIGNER_PLUGIN)
|
||||
endmacro(BuildAndInstallDesignerPlugin)
|
||||
@@ -1,8 +0,0 @@
|
||||
file(GLOB FREECAD_HELPER_CMAKE_FILES ./*.cmake)
|
||||
set(_SKIP_FILES "SetupQt.cmake")
|
||||
foreach(_CMAKE_FILE ${FREECAD_HELPER_CMAKE_FILES})
|
||||
get_filename_component(_FILENAME ${_CMAKE_FILE} NAME)
|
||||
if (NOT _FILENAME IN_LIST _SKIP_FILES)
|
||||
include(${_CMAKE_FILE})
|
||||
endif()
|
||||
endforeach(_CMAKE_FILE ${FREECAD_HELPER_CMAKE_FILES})
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(CheckInterModuleDependencies)
|
||||
# ==============================================================================
|
||||
#inter-module dependencies
|
||||
|
||||
# Takes a dependent module followed by a variable-length list of prerequisite
|
||||
# modules. Warns if any of the prerequisite modules are disabled.
|
||||
function(REQUIRES_MODS dependent)
|
||||
if(${dependent})
|
||||
foreach(prerequisite IN LISTS ARGN)
|
||||
if(NOT ${prerequisite})
|
||||
message(STATUS "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
set(${dependent} OFF PARENT_SCOPE)
|
||||
break()
|
||||
endif(NOT ${prerequisite})
|
||||
endforeach()
|
||||
endif(${dependent})
|
||||
endfunction(REQUIRES_MODS)
|
||||
|
||||
REQUIRES_MODS(BUILD_ARCH BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_FEM BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IDF BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IMPORT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_JTREADER BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
|
||||
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
|
||||
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_PATH BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
REQUIRES_MODS(BUILD_RAYTRACING BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_ROBOT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_START BUILD_WEB)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET BUILD_DRAWING)
|
||||
endmacro(CheckInterModuleDependencies)
|
||||
@@ -1,105 +0,0 @@
|
||||
# Some resources
|
||||
# https://github.com/dev-cafe/cmake-cookbook
|
||||
# https://cmake.org/cmake/help/v3.8/manual/cmake-compile-features.7.html
|
||||
|
||||
macro(CompilerChecksAndSetups)
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX TRUE)
|
||||
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
|
||||
# ================================================================================
|
||||
|
||||
# Needed for boost1.69
|
||||
# Avoid that Python (pyerrors.h) defines snprintf and vsnprintf
|
||||
if (MSVC AND NOT MSVC_VERSION VERSION_LESS 1900)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
elseif (MINGW)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
endif()
|
||||
|
||||
# Allow developers to use Boost < 1.55
|
||||
if (NOT BOOST_MIN_VERSION)
|
||||
set(BOOST_MIN_VERSION 1.55)
|
||||
endif()
|
||||
|
||||
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
|
||||
# Enabled C++17 for Freecad 0.20 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++17" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++17"
|
||||
"C++20"
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. G++ must be 7.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. Clang must be 6.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
# Escape the two plus chars as otherwise cmake complains about invalid regex
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+17")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+14")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
elseif (${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+11")
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
# Log the compiler and version
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}, version: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
include(${CMAKE_SOURCE_DIR}/cMake/ConfigureChecks.cmake)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||
if(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
endif()
|
||||
else(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
|
||||
endif()
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
# Disable warning about potentially uninstantiated static members
|
||||
# because it leads to a lot of false-positives.
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/Xcode#Latest_versions
|
||||
if (APPLE)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
elseif (UNIX)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# older boost.preprocessor turn off variadics for clang
|
||||
add_definitions(-DBOOST_PP_VARIADICS=1)
|
||||
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
|
||||
endif()
|
||||
endmacro(CompilerChecksAndSetups)
|
||||
@@ -1,37 +0,0 @@
|
||||
macro(ConfigureCMakeVariables)
|
||||
# ================================================================================
|
||||
# Output directories for install target
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
|
||||
set(CMAKE_INSTALL_BINDIR bin CACHE PATH "Output directory for executables")
|
||||
set(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
set(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
|
||||
set(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||
# Don't set it without manual adoption of LibDir variable in src/App/FreeCADInit.py
|
||||
set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
|
||||
include(GNUInstallDirs)
|
||||
endif()
|
||||
|
||||
set(PYCXX_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||
set(PYCXX_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||
|
||||
# used as compiler defines
|
||||
set(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
|
||||
set(LIBRARYDIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(DOCDIR "${CMAKE_INSTALL_DOCDIR}")
|
||||
|
||||
message(STATUS "prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "bindir: ${CMAKE_INSTALL_BINDIR}")
|
||||
message(STATUS "datadir: ${CMAKE_INSTALL_DATADIR}")
|
||||
message(STATUS "docdir: ${CMAKE_INSTALL_DOCDIR}")
|
||||
message(STATUS "includedir: ${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
message(STATUS "libdir: ${CMAKE_INSTALL_LIBDIR}")
|
||||
message(STATUS "cmake: ${CMAKE_VERSION}")
|
||||
endmacro(ConfigureCMakeVariables)
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(CreatePackagingTargets)
|
||||
# ================================================================================
|
||||
# == Packaging ===================================================================
|
||||
#
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--dfsg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--dfsg
|
||||
--check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
endmacro(CreatePackagingTargets)
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(FreeCADLibpackChecks)
|
||||
# ==============================================================================
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
|
||||
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
|
||||
|
||||
# don't show them in the GUI
|
||||
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
|
||||
|
||||
if (FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPackCLbundler.cmake)
|
||||
else(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
endif(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
# -------------------------------- PyCXX --------------------------------
|
||||
|
||||
find_package(PyCXX REQUIRED)
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
if(NOT SWIG_FOUND)
|
||||
message("==================================================\n"
|
||||
"SWIG not found, don't build SWIG binding for pivy.\n"
|
||||
"==================================================\n")
|
||||
endif(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
endif()
|
||||
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
|
||||
endmacro(FreeCADLibpackChecks)
|
||||
@@ -1,190 +0,0 @@
|
||||
macro(InitializeFreeCADBuildOptions)
|
||||
# ==============================================================================
|
||||
# ================= All the options for the build process =================
|
||||
# ==============================================================================
|
||||
|
||||
option(BUILD_FORCE_DIRECTORY "The build directory must be different to the source directory." OFF)
|
||||
option(BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line and the Python import module." ON)
|
||||
option(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
|
||||
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" OFF)
|
||||
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
else()
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." ON)
|
||||
endif()
|
||||
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
option(FREECAD_RELEASE_PDB "Create PDB files for Release version." ON)
|
||||
option(FREECAD_RELEASE_SEH "Enable Structured Exception Handling for Release version." ON)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
|
||||
option(FREECAD_LIBPACK_USEPYSIDE "Use PySide in LibPack rather to PyQt and Swig." ON)
|
||||
option(FREECAD_USE_PCH "Activate precompiled headers where it's used." ON)
|
||||
|
||||
if (DEFINED ENV{FREECAD_LIBPACK_DIR})
|
||||
set(FREECAD_LIBPACK_DIR $ENV{FREECAD_LIBPACK_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
message(STATUS "Found libpack env variable: ${FREECAD_LIBPACK_DIR}")
|
||||
else()
|
||||
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif()
|
||||
|
||||
set(LIBPACK_FOUND OFF )
|
||||
if (EXISTS ${FREECAD_LIBPACK_DIR}/plugins/imageformats/qsvg.dll)
|
||||
set(LIBPACK_FOUND ON )
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD OFF )
|
||||
# Create install commands for dependencies for INSTALL target in FreeCAD solution
|
||||
option(FREECAD_INSTALL_DEPEND_DIRS "Create install dependency commands for the INSTALL target found
|
||||
in the FreeCAD solution." ON)
|
||||
# Copy libpack smaller dependency folders to build folder per user request - if non-existent at destination
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/imageformats/qsvg.dll)
|
||||
option(FREECAD_COPY_DEPEND_DIRS_TO_BUILD "Copy smaller libpack dependency directories to build directory." OFF)
|
||||
endif()
|
||||
# Copy libpack 'bin' directory contents to build 'bin' per user request - only IF NOT EXISTS already
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs)
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD ON )
|
||||
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF)
|
||||
# Copy only the minimum number of files to get a working application
|
||||
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
|
||||
endif()
|
||||
else()
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
message(STATUS "Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.")
|
||||
endif()
|
||||
else(MSVC)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif(MSVC)
|
||||
option(BUILD_QT5 "Build with Qt5." ON)
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
set_property(CACHE FREECAD_USE_OCC_VARIANT PROPERTY STRINGS
|
||||
"Official Version"
|
||||
"Community Edition"
|
||||
)
|
||||
|
||||
if (BUILD_QT5)
|
||||
set(FREECAD_USE_QTWEBMODULE "Automatic" CACHE STRING "Qt Webkit or Qt WebEngine")
|
||||
set_property(CACHE FREECAD_USE_QTWEBMODULE PROPERTY STRINGS
|
||||
"Automatic"
|
||||
"Qt Webkit"
|
||||
"Qt WebEngine"
|
||||
)
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
|
||||
|
||||
if(APPLE)
|
||||
option(FREECAD_CREATE_MAC_APP "Create app bundle on install" OFF)
|
||||
|
||||
if(FREECAD_CREATE_MAC_APP)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}/src/MacAppBundle/FreeCAD.app/
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app
|
||||
)
|
||||
|
||||
# It should be safe to assume we've got sed on OSX...
|
||||
install(CODE "
|
||||
execute_process(COMMAND
|
||||
sed -i \"\" -e s/VERSION_STRING_FROM_CMAKE/${PACKAGE_VERSION}/
|
||||
-e s/NAME_STRING_FROM_CMAKE/${PROJECT_NAME}/
|
||||
${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/Info.plist)
|
||||
")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents)
|
||||
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib )
|
||||
endif(FREECAD_CREATE_MAC_APP)
|
||||
set(CMAKE_MACOSX_RPATH TRUE )
|
||||
endif(APPLE)
|
||||
|
||||
option(BUILD_FEM "Build the FreeCAD FEM module" ON)
|
||||
option(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
|
||||
option(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
|
||||
option(BUILD_ADDONMGR "Build the FreeCAD addon manager module" ON)
|
||||
option(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
|
||||
option(BUILD_COMPLETE "Build the FreeCAD complete module" OFF)
|
||||
option(BUILD_DRAFT "Build the FreeCAD draft module" ON)
|
||||
option(BUILD_DRAWING "Build the FreeCAD drawing module" ON)
|
||||
option(BUILD_IDF "Build the FreeCAD idf module" ON)
|
||||
option(BUILD_IMAGE "Build the FreeCAD image module" ON)
|
||||
option(BUILD_IMPORT "Build the FreeCAD import module" ON)
|
||||
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" OFF)
|
||||
option(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON)
|
||||
option(BUILD_PART "Build the FreeCAD part module" ON)
|
||||
option(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON)
|
||||
option(BUILD_PATH "Build the FreeCAD path module" ON)
|
||||
option(BUILD_PLOT "Build the FreeCAD plot module" ON)
|
||||
option(BUILD_POINTS "Build the FreeCAD points module" ON)
|
||||
option(BUILD_RAYTRACING "Build the FreeCAD ray tracing module" ON)
|
||||
option(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
|
||||
option(BUILD_ROBOT "Build the FreeCAD robot module" ON)
|
||||
option(BUILD_SHOW "Build the FreeCAD Show module (helper module for visibility automation)" ON)
|
||||
option(BUILD_SKETCHER "Build the FreeCAD sketcher module" ON)
|
||||
option(BUILD_SPREADSHEET "Build the FreeCAD spreadsheet module" ON)
|
||||
option(BUILD_START "Build the FreeCAD start module" ON)
|
||||
option(BUILD_TEST "Build the FreeCAD test module" ON)
|
||||
option(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
|
||||
option(BUILD_TUX "Build the FreeCAD Tux module" ON)
|
||||
option(BUILD_WEB "Build the FreeCAD web module" ON)
|
||||
option(BUILD_SURFACE "Build the FreeCAD surface module" ON)
|
||||
option(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
|
||||
option(BUILD_CLOUD "Build the FreeCAD cloud module" OFF)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
elseif(APPLE)
|
||||
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
|
||||
if(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
else(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." OFF)
|
||||
endif(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
else(MSVC)
|
||||
set(FREECAD_USE_3DCONNEXION OFF )
|
||||
endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
endif(NOT MSVC)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
# A Debian package for SMESH doesn't exist
|
||||
#set(FREECAD_USE_EXTERNAL_SMESH ON )
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
if(BUILD_FEM)
|
||||
set(BUILD_SMESH ON )
|
||||
endif()
|
||||
|
||||
# for Windows the minimum required cmake version is 3.4.3 to build the Path module
|
||||
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
|
||||
message(WARNING "Disable Path, requires cmake >= 3.4.3 in order to build this module")
|
||||
set(BUILD_PATH OFF )
|
||||
endif()
|
||||
|
||||
# force build directory to be different to source directory
|
||||
if (BUILD_FORCE_DIRECTORY)
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "The build directory (${CMAKE_BINARY_DIR}) must be different to the source directory (${CMAKE_SOURCE_DIR}).\n"
|
||||
"Please choose another build directory! Or disable the option BUILD_FORCE_DIRECTORY.")
|
||||
endif()
|
||||
endif()
|
||||
endmacro(InitializeFreeCADBuildOptions)
|
||||
@@ -1,267 +0,0 @@
|
||||
macro(PrintFinalReport)
|
||||
# -------------------------------- The final report ----------------------------------
|
||||
|
||||
message(STATUS "\n==============\n"
|
||||
"Summary report\n"
|
||||
"==============\n")
|
||||
if (DEFINED CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
message(STATUS "Flags: ${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "Standard: Requires C++${CMAKE_CXX_STANDARD}")
|
||||
|
||||
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
|
||||
message(STATUS "Python: ${PYTHON_VERSION_STRING} [${PYTHON_EXECUTABLE}] [${PYTHON_CONFIG_SUFFIX}]")
|
||||
|
||||
if(DEFINED PCL_FOUND)
|
||||
message(STATUS "PCL: ${PCL_VERSION}")
|
||||
else(DEFINED PCL_FOUND)
|
||||
message(STATUS "PCL: not enabled")
|
||||
endif(DEFINED PCL_FOUND)
|
||||
|
||||
if(DEFINED pybind11_FOUND)
|
||||
message(STATUS "pybind11: ${pybind11_VERSION}")
|
||||
else(DEFINED pybind11_FOUND)
|
||||
message(STATUS "pybind11: not enabled")
|
||||
endif(DEFINED pybind11_FOUND)
|
||||
|
||||
message(STATUS "Boost: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} (${Boost_VERSION})")
|
||||
|
||||
message(STATUS "XercesC: ${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
|
||||
message(STATUS "ZLIB: ${ZLIB_VERSION_STRING}")
|
||||
|
||||
message(STATUS "PyCXX: ${PYCXX_VERSION} [${PYCXX_INCLUDE_DIR}]")
|
||||
|
||||
message(STATUS "OCC: ${OCC_VERSION_STRING} [${OCC_LIBRARIES}] [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
|
||||
if(BUILD_SMESH)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
message(STATUS "SMESH: ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else(FREECAD_USE_EXTERNAL_SMESH)
|
||||
message(STATUS "SMESH: build internal")
|
||||
message(STATUS " MEDFile: ${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
message(STATUS " HDF5: ${HDF5_VERSION}")
|
||||
message(STATUS " VTK: ${VTK_VERSION}")
|
||||
endif(FREECAD_USE_EXTERNAL_SMESH)
|
||||
else(BUILD_SMESH)
|
||||
message(STATUS "SMESH: do not build")
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
if(DEFINED NETGEN_FOUND)
|
||||
message(STATUS "NETGEN: ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]")
|
||||
else(DEFINED NETGEN_FOUND)
|
||||
message(STATUS "NETGEN: not enabled")
|
||||
endif(DEFINED NETGEN_FOUND)
|
||||
|
||||
#message(STATUS "OpenCV: ${OpenCV_VERSION}")
|
||||
|
||||
if(DEFINED SWIG_FOUND)
|
||||
message(STATUS "SWIG: ${SWIG_VERSION}")
|
||||
else(DEFINED SWIG_FOUND)
|
||||
message(STATUS "SWIG: not found")
|
||||
endif(DEFINED SWIG_FOUND)
|
||||
|
||||
if(DEFINED EIGEN3_FOUND)
|
||||
message(STATUS "Eigen3 ${EIGEN3_VERSION}")
|
||||
else(DEFINED EIGEN3_FOUND)
|
||||
message(STATUS "Eigen3: not found")
|
||||
endif(DEFINED EIGEN3_FOUND)
|
||||
|
||||
message(STATUS "Qt5Core: ${Qt5Core_VERSION}")
|
||||
message(STATUS "Qt5Network: ${Qt5Network_VERSION}")
|
||||
message(STATUS "Qt5Xml: ${Qt5Xml_VERSION}")
|
||||
message(STATUS "Qt5XmlPatterns: ${Qt5XmlPatterns_VERSION}")
|
||||
if (BUILD_GUI)
|
||||
message(STATUS "Qt5Widgets: ${Qt5Widgets_VERSION}")
|
||||
message(STATUS "Qt5PrintSupport: ${Qt5PrintSupport_VERSION}")
|
||||
message(STATUS "Qt5OpenGL: ${Qt5OpenGL_VERSION}")
|
||||
message(STATUS "Qt5Svg: ${Qt5Svg_VERSION}")
|
||||
message(STATUS "Qt5UiTools: ${Qt5UiTools_VERSION}")
|
||||
message(STATUS "Qt5Concurrent: ${Qt5Concurrent_VERSION}")
|
||||
if(BUILD_WEB)
|
||||
if (Qt5WebKitWidgets_FOUND)
|
||||
message(STATUS "Qt5WebKitWidgets: ${Qt5WebKitWidgets_VERSION}")
|
||||
endif()
|
||||
if (Qt5WebEngineWidgets_FOUND)
|
||||
message(STATUS "Qt5WebEngineWidgets: ${Qt5WebEngineWidgets_VERSION}")
|
||||
endif()
|
||||
else(BUILD_WEB)
|
||||
message(STATUS "Qt5WebKitWidgets: not needed (BUILD_WEB)")
|
||||
message(STATUS "Qt5WebEngineWidgets: not needed (BUILD_WEB)")
|
||||
endif(BUILD_WEB)
|
||||
if(BUILD_DESIGNER_PLUGIN)
|
||||
message(STATUS "Designer plugin: ${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}")
|
||||
else(BUILD_DESIGNER_PLUGIN)
|
||||
message(STATUS "Designer plugin: not built per user request (BUILD_DESIGNER_PLUGIN)")
|
||||
endif(BUILD_DESIGNER_PLUGIN)
|
||||
if(${Qt5WinExtras_FOUND})
|
||||
message(STATUS "Qt5WinExtras: ${Qt5WinExtras_VERSION}")
|
||||
endif()
|
||||
|
||||
else(BUILD_GUI)
|
||||
message(STATUS "Qt5Widgets: not needed")
|
||||
message(STATUS "Qt5PrintSupport: not needed")
|
||||
message(STATUS "Qt5OpenGL: not needed")
|
||||
message(STATUS "Qt5Svg: not needed")
|
||||
message(STATUS "Qt5UiTools: not needed")
|
||||
message(STATUS "Qt5Concurrent: not needed")
|
||||
message(STATUS "Qt5WebKitWidgets: not needed")
|
||||
endif(BUILD_GUI)
|
||||
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
if(DEFINED Shiboken_FOUND)
|
||||
message(STATUS "Shiboken: ${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
else(DEFINED Shiboken_FOUND)
|
||||
message(STATUS "Shiboken: not found (only searched if MACPORTS_PREFIX is defined)")
|
||||
endif(DEFINED Shiboken_FOUND)
|
||||
if(DEFINED PySide_FOUND)
|
||||
message(STATUS "PySide: ${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
else(DEFINED PySide_FOUND)
|
||||
message(STATUS "PySide: not found (only searched if MACPORTS_PREFIX is defined)")
|
||||
endif(DEFINED PySide_FOUND)
|
||||
endif(DEFINED MACPORTS_PREFIX)
|
||||
|
||||
if(DEFINED Shiboken2_FOUND)
|
||||
message(STATUS "Shiboken2: ${Shiboken2_VERSION} [${Shiboken2_DIR}] [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
else(DEFINED Shiboken2_FOUND)
|
||||
message(STATUS "Shiboken2: not found")
|
||||
endif(DEFINED Shiboken2_FOUND)
|
||||
if(DEFINED PySide2_FOUND)
|
||||
message(STATUS "PySide2: ${PySide2_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
message(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
else(DEFINED PySide2_FOUND)
|
||||
message(STATUS "PySide2: not found")
|
||||
endif(DEFINED PySide2_FOUND)
|
||||
if(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
message(STATUS "PySide2Tools: [${PYSIDE2UICBINARY}] [${PYSIDE2RCCBINARY}]")
|
||||
else(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
message(STATUS "PySide2Tools: not found")
|
||||
endif(DEFINED PYSIDE2_TOOLS_FOUND)
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
if(DEFINED FREETYPE_FOUND)
|
||||
message(STATUS "Freetype: ${FREETYPE_VERSION_STRING}")
|
||||
else(DEFINED FREETYPE_FOUND)
|
||||
message(STATUS "Freetype: not found")
|
||||
endif(DEFINED FREETYPE_FOUND)
|
||||
else(FREECAD_USE_FREETYPE)
|
||||
message(STATUS "Freetype: disabled")
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
message(STATUS "OpenGL: ${OPENGL_gl_LIBRARY}")
|
||||
message(STATUS "OpenGLU: [${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")
|
||||
|
||||
message(STATUS "Coin3D: ${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
message(STATUS "Pivy: ${PIVY_VERSION}")
|
||||
|
||||
|
||||
if (WIN32)
|
||||
#message(STATUS "SPNAV: not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
|
||||
else(WIN32)
|
||||
if(DEFINED SPNAV_FOUND)
|
||||
message(STATUS "SPNAV: [${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
|
||||
else(DEFINED SPNAV_FOUND)
|
||||
message(STATUS "SPNAV: not found")
|
||||
endif(DEFINED SPNAV_FOUND)
|
||||
endif(WIN32)
|
||||
|
||||
if(MATPLOTLIB_FOUND)
|
||||
message(STATUS "Matplotlib: ${MATPLOTLIB_VERSION}")
|
||||
else(MATPLOTLIB_FOUND)
|
||||
message(STATUS "Matplotlib: not found")
|
||||
endif(MATPLOTLIB_FOUND)
|
||||
|
||||
if(BUILD_VR)
|
||||
if(DEFINED RIFT_FOUND)
|
||||
message(STATUS "Rift: ${Rift_VERSION}")
|
||||
else(DEFINED RIFT_FOUND)
|
||||
message(STATUS "Rift: not found")
|
||||
endif(DEFINED RIFT_FOUND)
|
||||
else(BUILD_VR)
|
||||
message(STATUS "Rift: not enabled (BUILD_VR)")
|
||||
endif(BUILD_VR)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen: ${DOXYGEN_VERSION}")
|
||||
message(STATUS " Language: ${DOXYGEN_LANGUAGE}")
|
||||
if(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Coin3D_DOC: found [${COIN3D_DOC_PATH}]")
|
||||
else(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Coin3D_DOC: not found")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
else(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen: not found")
|
||||
endif(DOXYGEN_FOUND)
|
||||
|
||||
if(MSVC)
|
||||
# Copy libpack dependency directories to build folder for user as part of overall build process
|
||||
if(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying libpack dependency directories to build directory for Windows MSVC build.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
message(STATUS "... end copying.\n=======================================\n")
|
||||
endif(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
|
||||
if(COPY_LIBPACK_BIN_TO_BUILD)
|
||||
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
|
||||
message("=======================================\n"
|
||||
"Copying libpack 'bin' directory to build directory.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message("... done copying libpack 'bin' directory.\n=======================================\n")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
# Test install command for installing/copying directories
|
||||
message(STATUS "=======================================")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_INSTALL_PREFIX}/translations)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
message(STATUS "Created install commands for INSTALL target.\n")
|
||||
endif(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
endif(FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
endif()
|
||||
|
||||
# Print message to start build process
|
||||
message("=================================================\n"
|
||||
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
|
||||
"=================================================\n")
|
||||
endmacro(PrintFinalReport)
|
||||
@@ -1,19 +0,0 @@
|
||||
This folder will contain an individual cmake file for each FreeCAD "helper".
|
||||
|
||||
A "helper" should be a macro or function that tries (as much as possible) to adhere to the
|
||||
UNIX philosophy - in other words, it should strive to do one thing and do it well.
|
||||
|
||||
The idea here is to break up the cmake build system into smaller, more manageable chunks.
|
||||
This should make maintenance easier, and should also make troubleshooting a bit less
|
||||
painful. Finally, it should also clean up our top-level CMakeLists.txt file a bit, making
|
||||
it bit easier for new developers to jump in and see what's what.
|
||||
|
||||
NOTE: CMake has a very distinct difference between its macros and its functions. Namely, a
|
||||
function creates its own SCOPE, whereas a macro essentially executes in the calling scope.
|
||||
There are also some specifics of how arguments are managed.
|
||||
|
||||
In general:
|
||||
|
||||
1) If you use a macro, be careful modifying arguments - you may get surprises.
|
||||
2) If you use a function, make sure to use set(.... PARENT_SCOPE) for variables that
|
||||
should be available outside of the function.
|
||||
@@ -1,86 +0,0 @@
|
||||
macro(SetGlobalCompilerAndLinkerSettings)
|
||||
# ================================================================================
|
||||
# == Global Compiler and Linker Settings =========================================
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# check for 64-bit platform
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Platform is 64-bit, set -D_OCC64")
|
||||
add_definitions(-D_OCC64 )
|
||||
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Platform is 32-bit")
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
# check for mips64 platform
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "mips64")
|
||||
message(STATUS "Architecture: mips64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# set default compiler settings
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zm150 /bigobj")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG /Zm150 /bigobj")
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
if(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
endif(FREECAD_RELEASE_PDB)
|
||||
if(FREECAD_RELEASE_SEH)
|
||||
# remove /EHsc or /EHs flags because they are incompatible with /EHa
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES "Release")
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
|
||||
endif()
|
||||
endif(FREECAD_RELEASE_SEH)
|
||||
|
||||
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
|
||||
if(FREECAD_USE_MP_COMPILE_FLAG)
|
||||
# set "Build with Multiple Processes"
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
||||
endif()
|
||||
|
||||
# Mark 32 bit executables large address aware so they can use > 2GB address space
|
||||
# NOTE: This setting only has an effect on machines with at least 3GB of RAM, although it sets the linker option it doesn't set the linker switch 'Enable Large Addresses'
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
else(MSVC)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
#message(STATUS "DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif(MSVC)
|
||||
|
||||
if(MINGW)
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
# clang for MSYS doesn't support -mthreads
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
#set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
else()
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
|
||||
# Actually '-Wno-inline-dllimport' should work to suppress warnings of the form:
|
||||
# inline function 'foo' is declared as dllimport: attribute ignored
|
||||
# But it doesn't work with MinGW gcc 4.5.0 while using '-Wno-attributes' seems to
|
||||
# do the trick.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
#set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
# http://stackoverflow.com/questions/8375310/warning-auto-importing-has-been-activated-without-enable-auto-import-specifie
|
||||
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
link_libraries(-lgdi32)
|
||||
endif()
|
||||
endif(MINGW)
|
||||
endmacro(SetGlobalCompilerAndLinkerSettings)
|
||||
@@ -1,10 +0,0 @@
|
||||
macro(SetLibraryVersions)
|
||||
# version information of libraries
|
||||
#
|
||||
if(OCC_INCLUDE_DIR AND EXISTS ${OCC_INCLUDE_DIR}/Standard_Version.hxx)
|
||||
set(HAVE_OCC_VERSION 1)
|
||||
endif(OCC_INCLUDE_DIR AND EXISTS ${OCC_INCLUDE_DIR}/Standard_Version.hxx)
|
||||
|
||||
configure_file(LibraryVersions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibraryVersions.h)
|
||||
|
||||
endmacro(SetLibraryVersions)
|
||||
@@ -1,31 +0,0 @@
|
||||
macro(SetupBoost)
|
||||
# -------------------------------- Boost --------------------------------
|
||||
|
||||
set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
|
||||
|
||||
set (BOOST_COMPONENTS filesystem program_options regex system thread date_time)
|
||||
find_package(Boost ${BOOST_MIN_VERSION}
|
||||
COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Boost.Thread 1.67+ headers reference pthread_condattr_*
|
||||
list(APPEND Boost_LIBRARIES pthread)
|
||||
endif()
|
||||
|
||||
if(NOT Boost_FOUND)
|
||||
set (NO_BOOST_COMPONENTS)
|
||||
foreach (comp ${BOOST_COMPONENTS})
|
||||
string(TOUPPER ${comp} uppercomp)
|
||||
if (NOT Boost_${uppercomp}_FOUND)
|
||||
list(APPEND NO_BOOST_COMPONENTS ${comp})
|
||||
endif()
|
||||
endforeach()
|
||||
message(FATAL_ERROR "=============================================\n"
|
||||
"Required components:\n"
|
||||
" ${BOOST_COMPONENTS}\n"
|
||||
"Not found, install the components:\n"
|
||||
" ${NO_BOOST_COMPONENTS}\n"
|
||||
"=============================================\n")
|
||||
endif(NOT Boost_FOUND)
|
||||
|
||||
endmacro(SetupBoost)
|
||||
@@ -1,11 +0,0 @@
|
||||
macro(SetupCoin3D)
|
||||
# -------------------------------- Coin3D --------------------------------
|
||||
|
||||
find_package(Coin3D REQUIRED)
|
||||
if(NOT COIN3D_FOUND)
|
||||
message(FATAL_ERROR "=================\n"
|
||||
"Coin3D not found.\n"
|
||||
"=================\n")
|
||||
endif(NOT COIN3D_FOUND)
|
||||
|
||||
endmacro(SetupCoin3D)
|
||||
@@ -1,12 +0,0 @@
|
||||
macro(SetupDoxygen)
|
||||
# -------------------------------- Doxygen ----------------------------------
|
||||
|
||||
find_package(Doxygen)
|
||||
|
||||
if (NOT DOXYGEN_FOUND)
|
||||
message("=====================================================\n"
|
||||
"Doxygen not found, will not build documentation. \n"
|
||||
"=====================================================\n")
|
||||
endif(NOT DOXYGEN_FOUND)
|
||||
|
||||
endmacro(SetupDoxygen)
|
||||
@@ -1,29 +0,0 @@
|
||||
macro(SetupEigen)
|
||||
# -------------------------------- Eigen --------------------------------
|
||||
|
||||
# necessary for Sketcher module
|
||||
# necessary for Robot module
|
||||
|
||||
find_package(Eigen3)
|
||||
if(NOT EIGEN3_FOUND)
|
||||
message("=================\n"
|
||||
"Eigen3 not found.\n"
|
||||
"=================\n")
|
||||
endif(NOT EIGEN3_FOUND)
|
||||
|
||||
if (${EIGEN3_VERSION} VERSION_LESS "3.3.1")
|
||||
message(WARNING "Disable module flatmesh because it requires "
|
||||
"minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found")
|
||||
set (BUILD_FLAT_MESH OFF)
|
||||
endif()
|
||||
|
||||
# Older versions raise the warning -Wdeprecated-copy with clang10/gcc10
|
||||
if (${EIGEN3_VERSION} VERSION_LESS "3.3.8")
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
set (EIGEN3_NO_DEPRECATED_COPY "-Wno-deprecated-copy")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
endmacro(SetupEigen)
|
||||
@@ -1,13 +0,0 @@
|
||||
macro(SetupFreetype)
|
||||
#--------------------FreeType-----------------------
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
find_package(Freetype)
|
||||
if(NOT FREETYPE_FOUND)
|
||||
message("===============================================================\n"
|
||||
"FreeType2 not found. Part module will lack of makeWireString().\n"
|
||||
"===============================================================\n")
|
||||
endif(NOT FREETYPE_FOUND)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
endmacro(SetupFreetype)
|
||||
@@ -1,13 +0,0 @@
|
||||
macro(SetupMatplotlib)
|
||||
# ------------------------------ Matplotlib ------------------------------
|
||||
|
||||
find_package(Matplotlib)
|
||||
if (MATPLOTLIB_FOUND)
|
||||
message(STATUS "Found Matplotlib: ${MATPLOTLIB_PATH_DIRS} (found version \"${MATPLOTLIB_VERSION}\")")
|
||||
else(MATPLOTLIB_FOUND)
|
||||
message("=====================================================\n"
|
||||
"Matplotlib not found, Plot module won't be available.\n"
|
||||
"=====================================================\n")
|
||||
endif(MATPLOTLIB_FOUND)
|
||||
|
||||
endmacro(SetupMatplotlib)
|
||||
@@ -1,11 +0,0 @@
|
||||
macro(SetupOpenCasCade)
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
find_package(OpenCasCade)
|
||||
if(NOT OCC_FOUND)
|
||||
message(FATAL_ERROR "================================================================\n"
|
||||
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
|
||||
"================================================================\n")
|
||||
endif(NOT OCC_FOUND)
|
||||
|
||||
endmacro(SetupOpenCasCade)
|
||||
@@ -1,16 +0,0 @@
|
||||
macro(SetupOpenGL)
|
||||
# -------------------------------- OpenGL --------------------------------
|
||||
|
||||
find_package(OpenGL)
|
||||
include(FindPackageMessage)
|
||||
if(OPENGL_GLU_FOUND)
|
||||
find_package_message(OPENGL_GLU
|
||||
"Found OpenGLU: ${OPENGL_glu_LIBRARY}"
|
||||
"[${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")
|
||||
else(OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "======================\n"
|
||||
"GLU library not found.\n"
|
||||
"======================\n")
|
||||
endif(OPENGL_GLU_FOUND)
|
||||
|
||||
endmacro(SetupOpenGL)
|
||||
@@ -1,14 +0,0 @@
|
||||
macro(SetupPCL)
|
||||
# -------------------------------- pcl ----------------------------------
|
||||
|
||||
# Can be used by ReverseEngineering module"
|
||||
#
|
||||
# PCL needs to be found before boost because the PCLConfig also calls find_package(Boost ...),
|
||||
# but with different components
|
||||
if(FREECAD_USE_PCL)
|
||||
# pcl overrides the compiler flags by adding -Wno-deprecated
|
||||
set (SAVE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
find_package(PCL REQUIRED COMPONENTS common kdtree features surface io filters segmentation sample_consensus)
|
||||
set (CMAKE_CXX_FLAGS ${SAVE_CXX_FLAGS})
|
||||
endif(FREECAD_USE_PCL)
|
||||
endmacro(SetupPCL)
|
||||
@@ -1,10 +0,0 @@
|
||||
macro(SetupPybind11)
|
||||
# -------------------------------- PyBind11 -----------------------------
|
||||
|
||||
# necessary for flat-mesh feature
|
||||
option(FREECAD_USE_PYBIND11 "Use pybind11" OFF)
|
||||
if (FREECAD_USE_PYBIND11)
|
||||
find_package(pybind11 REQUIRED)
|
||||
endif()
|
||||
|
||||
endmacro(SetupPybind11)
|
||||
@@ -1,162 +0,0 @@
|
||||
macro(SetupPython)
|
||||
# -------------------------------- Python --------------------------------
|
||||
|
||||
# For building on OS X
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA)
|
||||
|
||||
# If the user doesn't tell us which package manager they're using
|
||||
if(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
# Try to find MacPorts path
|
||||
find_program(MACPORTS_EXECUTABLE port)
|
||||
if(EXISTS ${MACPORTS_EXECUTABLE})
|
||||
string(REPLACE "/bin/port" ""
|
||||
MACPORTS_PREFIX ${MACPORTS_EXECUTABLE})
|
||||
message(STATUS "Detected MacPorts install at ${MACPORTS_PREFIX}")
|
||||
endif(EXISTS ${MACPORTS_EXECUTABLE})
|
||||
|
||||
# Try to find Homebrew path
|
||||
find_program(HOMEBREW_EXECUTABLE brew)
|
||||
if(EXISTS ${HOMEBREW_EXECUTABLE})
|
||||
string(REPLACE "/bin/brew" ""
|
||||
HOMEBREW_PREFIX ${HOMEBREW_EXECUTABLE})
|
||||
message(STATUS "Detected Homebrew install at ${HOMEBREW_PREFIX}")
|
||||
endif()
|
||||
|
||||
endif(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
# In case someone tries to shoot themselves in the foot
|
||||
if(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
|
||||
message(SEND_ERROR
|
||||
"Multiple package management systems detected - ")
|
||||
message(SEND_ERROR
|
||||
"define either MACPORTS_PREFIX or HOMEBREW_PREFIX")
|
||||
|
||||
# No package manager
|
||||
elseif(NOT DEFINED MACPORTS_PREFIX AND NOT DEFINED HOMEBREW_PREFIX)
|
||||
message(SEND_ERROR
|
||||
"No package manager detected - install MacPorts or Homebrew")
|
||||
|
||||
# The hopefully-normal case - one package manager identified
|
||||
else(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
# Construct a list like python;python2.9;python2.8;...
|
||||
set(Python_ADDITIONAL_VERSIONS_REV ${Python_ADDITIONAL_VERSIONS})
|
||||
list(REVERSE Python_ADDITIONAL_VERSIONS_REV)
|
||||
set(_PYTHON_NAMES "python")
|
||||
foreach(_PYTHON_VERSION IN LISTS Python_ADDITIONAL_VERSIONS_REV)
|
||||
list(APPEND _PYTHON_NAMES "python${_PYTHON_VERSION}")
|
||||
endforeach(_PYTHON_VERSION)
|
||||
|
||||
# Find python in the package management systems, using names in that
|
||||
# list in decreasing priority. Note that a manually specified
|
||||
# PYTHON_EXECUTABLE still has prescedence over this.
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES ${_PYTHON_NAMES}
|
||||
PATHS ${MACPORTS_PREFIX} ${HOMEBREW_PREFIX}
|
||||
PATH_SUFFIXES /bin
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
endif(DEFINED MACPORTS_PREFIX AND DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
# Warn user if we still only have the system Python
|
||||
string(FIND ${PYTHON_EXECUTABLE} "/usr/bin/python" _FIND_SYS_PYTHON)
|
||||
if(_FIND_SYS_PYTHON EQUAL 0)
|
||||
message(SEND_ERROR
|
||||
"Only found the stock Python, that's probably bad.")
|
||||
endif(_FIND_SYS_PYTHON EQUAL 0)
|
||||
|
||||
# Ask Python to tell us it's include directory, if nobody else has
|
||||
if(NOT DEFINED PYTHON_INCLUDE_DIR)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
|
||||
"from distutils.sysconfig import get_python_inc;print(get_python_inc())"
|
||||
OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
|
||||
RESULT_VARIABLE PYTHON_INCLUDE_DIR_RESULT
|
||||
ERROR_QUIET)
|
||||
if(NOT PYTHON_INCLUDE_DIR_RESULT MATCHES 0)
|
||||
message(SEND_ERROR "Failed to determine PYTHON_INCLUDE_DIR")
|
||||
endif(NOT PYTHON_INCLUDE_DIR_RESULT MATCHES 0)
|
||||
endif(NOT DEFINED PYTHON_INCLUDE_DIR)
|
||||
|
||||
# Similar for the Python library - there must be an easier way...
|
||||
if(NOT DEFINED PYTHON_LIBRARY)
|
||||
# Get the library path
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
|
||||
"from distutils import sysconfig;print(sysconfig.get_config_var('LIBDIR'))"
|
||||
OUTPUT_VARIABLE PYTHON_LIBRARY_DIR
|
||||
RESULT_VARIABLE PYTHON_LIBRARY_DIR_RESULT
|
||||
ERROR_QUIET)
|
||||
string(STRIP ${PYTHON_LIBRARY_DIR} PYTHON_LIBRARY_DIR)
|
||||
if(NOT PYTHON_LIBRARY_DIR_RESULT MATCHES 0)
|
||||
message(SEND_ERROR "Failed to determine PYTHON_LIBRARY")
|
||||
endif(NOT PYTHON_LIBRARY_DIR_RESULT MATCHES 0)
|
||||
|
||||
# Get library filename - might not be safe to assume .dylib extension?
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
|
||||
"import sys;print('libpython%d.%d.dylib'%sys.version_info[0:2])"
|
||||
OUTPUT_VARIABLE PYTHON_LIBRARY_FILE
|
||||
RESULT_VARIABLE PYTHON_LIBRARY_FILE_RESULT
|
||||
ERROR_QUIET)
|
||||
string(STRIP ${PYTHON_LIBRARY_FILE} PYTHON_LIBRARY_FILE)
|
||||
if(NOT PYTHON_LIBRARY_FILE_RESULT MATCHES 0)
|
||||
message(SEND_ERROR "Failed to determine PYTHON_LIBRARY")
|
||||
endif(NOT PYTHON_LIBRARY_FILE_RESULT MATCHES 0)
|
||||
|
||||
set(PYTHON_LIBRARY "${PYTHON_LIBRARY_DIR}/${PYTHON_LIBRARY_FILE}")
|
||||
|
||||
else(NOT DEFINED PYTHON_LIBRARY)
|
||||
# Used on MacPorts systems for finding Shiboken and PySide
|
||||
# TODO: When we start requiring minimum CMake version above
|
||||
# 2.8.11, change PATH below to DIRECTORY
|
||||
get_filename_component(PYTHON_LIBRARY_DIR ${PYTHON_LIBRARY} PATH)
|
||||
endif(NOT DEFINED PYTHON_LIBRARY)
|
||||
|
||||
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.12")
|
||||
set(Python_ADDITIONAL_VERSIONS ${Python_ADDITIONAL_VERSIONS} "3.10" "3.9" "3.8" "3.7" "3.6")
|
||||
find_package(PythonInterp REQUIRED)
|
||||
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
if (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
else (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
||||
endif(NOT DEFINED PYTHON_VERSION_STRING)
|
||||
if(NOT PYTHONLIBS_FOUND)
|
||||
message(FATAL_ERROR "=================================\n"
|
||||
"Python not found, install Python!\n"
|
||||
"=================================\n")
|
||||
endif()
|
||||
|
||||
# For forward compatibility with new CMake scripts
|
||||
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
|
||||
set(Python3_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
|
||||
set(Python3_LIBRARY_DIRS ${PYTHON_LIBRARY_DIRS})
|
||||
set(Python3_VERSION ${PYTHON_VERSION_STRING})
|
||||
set(Python3_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
|
||||
set(Python3_VERSION_MINOR ${PYTHON_VERSION_MINOR})
|
||||
set(Python3_VERSION_PATCH ${PYTHON_VERSION_PATCH})
|
||||
set(Python3_Interpreter_FOUND ${PYTHONINTERP_FOUND})
|
||||
else()
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
|
||||
# For backwards compatibility with old CMake scripts
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
|
||||
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
|
||||
set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
|
||||
set(PYTHON_VERSION_STRING ${Python3_VERSION})
|
||||
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
|
||||
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
|
||||
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
|
||||
endif()
|
||||
|
||||
# prevent python3 lower than 3.6
|
||||
if (${PYTHON_VERSION_STRING} VERSION_LESS "3.6")
|
||||
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.6\n")
|
||||
endif()
|
||||
|
||||
endmacro(SetupPython)
|
||||
@@ -1,38 +0,0 @@
|
||||
# -------------------------------- Qt --------------------------------
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
|
||||
# For FreeCAD 0.20, pegged to Ubuntu 18.04 LTS:
|
||||
if(${Qt5Core_VERSION} VERSION_LESS "5.9")
|
||||
message (FATAL_ERROR "FreeCAD v0.20 requires Qt5 5.9 or later")
|
||||
endif()
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5XmlPatterns REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
if(BUILD_GUI)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5PrintSupport REQUIRED)
|
||||
find_package(Qt5OpenGL REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
if (BUILD_WEB)
|
||||
if (${FREECAD_USE_QTWEBMODULE} MATCHES "Qt Webkit")
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
elseif(${FREECAD_USE_QTWEBMODULE} MATCHES "Qt WebEngine")
|
||||
find_package(Qt5WebEngineWidgets REQUIRED)
|
||||
else() # Automatic
|
||||
find_package(Qt5WebEngineWidgets QUIET)
|
||||
if(NOT Qt5WebEngineWidgets_FOUND)
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_DESIGNER_PLUGIN)
|
||||
find_package(Qt5Designer REQUIRED)
|
||||
endif()
|
||||
if(MSVC)
|
||||
find_package(Qt5WinExtras QUIET)
|
||||
endif()
|
||||
endif(BUILD_GUI)
|
||||
@@ -1,136 +0,0 @@
|
||||
macro(SetupSalomeSMESH)
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
if(BUILD_SMESH)
|
||||
# set the internal smesh version:
|
||||
# see src/3rdParty/salomonemesh/CMakeLists.txt and commit https://github.com/FreeCAD/FreeCAD/commit/666a3e5 and https://forum.freecadweb.org/viewtopic.php?f=10&t=30838
|
||||
set(SMESH_VERSION_MAJOR 7)
|
||||
set(SMESH_VERSION_MINOR 7)
|
||||
set(SMESH_VERSION_PATCH 1)
|
||||
set(SMESH_VERSION_TWEAK 0)
|
||||
|
||||
#if we use smesh we definitely also need vtk, no matter of external or internal smesh
|
||||
set (VTK_COMPONENTS
|
||||
vtkCommonCore
|
||||
vtkCommonDataModel
|
||||
vtkFiltersVerdict
|
||||
vtkIOXML
|
||||
vtkFiltersCore
|
||||
vtkFiltersGeneral
|
||||
vtkIOLegacy
|
||||
vtkFiltersExtraction
|
||||
vtkFiltersSources
|
||||
vtkFiltersGeometry
|
||||
)
|
||||
|
||||
# check which modules are available
|
||||
if(UNIX OR WIN32)
|
||||
find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
|
||||
if(${VTK_MAJOR_VERSION} LESS 9)
|
||||
list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_MODULES_ENABLED ${_module} _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(VTK_COMPONENTS "CommonCore;CommonDataModel;FiltersVerdict;IOXML;FiltersCore;FiltersGeneral;IOLegacy;FiltersExtraction;FiltersSources;FiltersGeometry")
|
||||
list(APPEND VTK_COMPONENTS "IOMPIParallel;ParallelMPI;hdf5;FiltersParallelDIY2;RenderingCore;InteractionStyle;RenderingFreeType;RenderingOpenGL2")
|
||||
foreach(_module ${VTK_COMPONENTS})
|
||||
list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# don't check VERSION 6 as this would exclude VERSION 7
|
||||
if(AVAILABLE_VTK_COMPONENTS)
|
||||
message(STATUS "VTK components: ${AVAILABLE_VTK_COMPONENTS}")
|
||||
find_package(VTK COMPONENTS ${AVAILABLE_VTK_COMPONENTS} REQUIRED NO_MODULE)
|
||||
else()
|
||||
message(STATUS "VTK components: not found or used")
|
||||
find_package(VTK REQUIRED NO_MODULE)
|
||||
endif()
|
||||
|
||||
set(BUILD_FEM_VTK ON)
|
||||
if(${VTK_MAJOR_VERSION} LESS 6)
|
||||
message( FATAL_ERROR "Found VTK version is <6, this is not compatible" )
|
||||
endif()
|
||||
if(${VTK_MAJOR_VERSION} EQUAL 6)
|
||||
if(${VTK_MINOR_VERSION} LESS 2)
|
||||
set(VTK_OPTIONS -DVTK_NO_QUAD_POLY)
|
||||
endif()
|
||||
if(${VTK_MINOR_VERSION} EQUAL 0)
|
||||
message(WARNING "VTK equal to 6.0 cannot be used with c++11, FEM postprocessing is disabled")
|
||||
set(BUILD_FEM_VTK OFF)
|
||||
endif()
|
||||
endif()
|
||||
# on openSUSE 13.1 VTK_LIBRARIES ends with "optimized" keyword
|
||||
list(REMOVE_ITEM VTK_LIBRARIES "optimized" "debug")
|
||||
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
find_package(MEDFile REQUIRED)
|
||||
# See https://www.hdfgroup.org/HDF5/release/cmakebuild.html
|
||||
if (WIN32)
|
||||
find_package(HDF5 COMPONENTS NO_MODULE REQUIRED static)
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
file(READ ${meddotH} TMPTXT)
|
||||
string(FIND "${TMPTXT}" "#define MED_HAVE_MPI" matchres)
|
||||
if(${matchres} EQUAL -1)
|
||||
message(STATUS "We guess that libmed was built using hdf5-serial version")
|
||||
set(HDF5_VARIANT "hdf5-serial")
|
||||
else()
|
||||
message(STATUS "We guess that libmed was built using hdf5-openmpi version")
|
||||
set(HDF5_VARIANT "hdf5-openmpi")
|
||||
set(HDF5_PREFER_PARALLEL TRUE) # if pkg-config fails, find_package(HDF5) needs this
|
||||
endif()
|
||||
pkg_search_module(HDF5 ${HDF5_VARIANT})
|
||||
if(NOT HDF5_FOUND)
|
||||
find_package(HDF5 REQUIRED)
|
||||
else()
|
||||
add_compile_options(${HDF5_CFLAGS})
|
||||
link_directories(${HDF5_LIBRARY_DIRS})
|
||||
link_libraries(${HDF5_LIBRARIES})
|
||||
find_file(Hdf5dotH hdf5.h PATHS ${HDF5_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
if(NOT Hdf5dotH)
|
||||
message( FATAL_ERROR "${HDF5_VARIANT} development header not found.")
|
||||
endif()
|
||||
endif()
|
||||
check_include_file_cxx(hdf5.h HDF5_FOUND)
|
||||
if(NOT HDF5_FOUND)
|
||||
message( FATAL_ERROR "hdf5.h was not found.")
|
||||
endif()
|
||||
|
||||
# Med Fichier can require MPI
|
||||
pkg_search_module(OPENMPI ompi-cxx)
|
||||
add_compile_options(${OPENMPI_CFLAGS})
|
||||
link_directories(${OPENMPI_LIBRARY_DIRS})
|
||||
link_libraries(${OPENMPI_LIBRARIES})
|
||||
if(NOT OPENMPI_FOUND)
|
||||
message( WARNING "ompi-cxx was not found. Check for error above.")
|
||||
endif()
|
||||
endif()
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
|
||||
else(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
find_package(SMESH CONFIG)
|
||||
set (SMESH_INCLUDE_DIR ${SMESH_INCLUDE_PATH})
|
||||
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
|
||||
if(NOT SMESH_FOUND)
|
||||
message(ERROR "================\n"
|
||||
"SMESH not found.\n"
|
||||
"================\n")
|
||||
endif()
|
||||
include_directories(${SMESH_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
configure_file(SMESH_Version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/SMESH_Version.h)
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
endmacro(SetupSalomeSMESH)
|
||||
@@ -1,133 +0,0 @@
|
||||
macro(SetupShibokenAndPyside)
|
||||
# -------------------------------- Shiboken/PySide ------------------------
|
||||
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
find_package(Shiboken REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
|
||||
find_package(PySide REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
|
||||
endif(DEFINED MACPORTS_PREFIX)
|
||||
|
||||
# Shiboken2Config.cmake may explicitly set CMAKE_BUILD_TYPE to Release which causes
|
||||
# CMake to fail to create Makefiles for a debug build.
|
||||
# So as a workaround we save and restore the value after checking for Shiboken2.
|
||||
set (SAVE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
|
||||
find_package(Shiboken2 QUIET)# REQUIRED
|
||||
set (CMAKE_BUILD_TYPE ${SAVE_BUILD_TYPE})
|
||||
if (Shiboken2_FOUND)
|
||||
# Shiboken2 config file was found but it may use the wrong Python version
|
||||
# Try to get the matching config suffix and repeat finding the package
|
||||
set(SHIBOKEN_PATTERN .cpython-${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||
|
||||
file(GLOB SHIBOKEN_CONFIG "${Shiboken2_DIR}/Shiboken2Config${SHIBOKEN_PATTERN}*.cmake")
|
||||
if (SHIBOKEN_CONFIG)
|
||||
get_filename_component(SHIBOKEN_CONFIG_SUFFIX ${SHIBOKEN_CONFIG} NAME)
|
||||
string(SUBSTRING ${SHIBOKEN_CONFIG_SUFFIX} 15 -1 SHIBOKEN_CONFIG_SUFFIX)
|
||||
string(REPLACE ".cmake" "" PYTHON_CONFIG_SUFFIX ${SHIBOKEN_CONFIG_SUFFIX})
|
||||
message(STATUS "PYTHON_CONFIG_SUFFIX: ${PYTHON_CONFIG_SUFFIX}")
|
||||
find_package(Shiboken2 QUIET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# pyside2 changed its cmake files, this is the dance we have
|
||||
# to dance to be compatible with the old (<5.12) and the new versions (>=5.12)
|
||||
if(NOT SHIBOKEN_INCLUDE_DIR AND TARGET Shiboken2::libshiboken)
|
||||
get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT SHIBOKEN_INCLUDE_DIR AND TARGET Shiboken2::libshiboken)
|
||||
|
||||
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
message("====================\n"
|
||||
"shiboken2 not found.\n"
|
||||
"====================\n")
|
||||
endif(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
|
||||
find_package(PySide2 QUIET)# REQUIRED
|
||||
|
||||
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide2::pyside2)
|
||||
get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide2::pyside2)
|
||||
|
||||
if(NOT PYSIDE_INCLUDE_DIR)
|
||||
message("==================\n"
|
||||
"PySide2 not found.\n"
|
||||
"==================\n")
|
||||
endif(NOT PYSIDE_INCLUDE_DIR)
|
||||
|
||||
find_package(PySide2Tools QUIET) #REQUIRED # PySide2 utilities (pyside2-uic & pyside2-rcc)
|
||||
if(NOT PYSIDE2_TOOLS_FOUND)
|
||||
message("=======================\n"
|
||||
"PySide2Tools not found.\n"
|
||||
"=======================\n")
|
||||
endif(NOT PYSIDE2_TOOLS_FOUND)
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Ext/PySide)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/__init__.py "# PySide wrapper\n"
|
||||
"from PySide2 import __version__\n"
|
||||
"from PySide2 import __version_info__\n")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtCore.py "from PySide2.QtCore import *\n\n"
|
||||
"#QCoreApplication.CodecForTr=0\n"
|
||||
"#QCoreApplication.UnicodeUTF8=1\n")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtGui.py "from PySide2.QtGui import *\n"
|
||||
"from PySide2.QtWidgets import *\n"
|
||||
"QHeaderView.setResizeMode = QHeaderView.setSectionResizeMode\n")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtSvg.py "from PySide2.QtSvg import *\n")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/Ext/PySide/QtUiTools.py "from PySide2.QtUiTools import *\n")
|
||||
|
||||
if(APPLE AND NOT BUILD_WITH_CONDA)
|
||||
install(
|
||||
DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/Ext/PySide
|
||||
DESTINATION
|
||||
MacOS
|
||||
)
|
||||
else()
|
||||
install(
|
||||
DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/Ext/PySide
|
||||
DESTINATION
|
||||
Ext
|
||||
)
|
||||
endif()
|
||||
|
||||
# If shiboken cannot be found the build option will be set to OFF
|
||||
if(SHIBOKEN_INCLUDE_DIR)
|
||||
option(FREECAD_USE_SHIBOKEN "Links to the shiboken library at build time. If OFF its Python module is imported at runtime" ON)
|
||||
else()
|
||||
option(FREECAD_USE_SHIBOKEN "Links to the shiboken library at build time. If OFF its Python module is imported at runtime" OFF)
|
||||
|
||||
# Now try to import the shiboken Python module and print a warning if it can't be loaded
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shiboken2"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
|
||||
if(FAILURE)
|
||||
message("=================================\n"
|
||||
"shiboken Python module not found.\n"
|
||||
"=================================\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If PySide cannot be found the build option will be set to OFF
|
||||
if(PYSIDE_INCLUDE_DIR)
|
||||
option(FREECAD_USE_PYSIDE "Links to the PySide libraries at build time." ON)
|
||||
else()
|
||||
option(FREECAD_USE_PYSIDE "Links to the PySide libraries at build time." OFF)
|
||||
endif()
|
||||
|
||||
# Independent of the build option PySide modules must be loaded at runtime. Print a warning if it fails.
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import PySide2;import os;print(os.path.dirname(PySide2.__file__), end='')"
|
||||
RESULT_VARIABLE FAILURE
|
||||
OUTPUT_VARIABLE PRINT_OUTPUT
|
||||
)
|
||||
if(FAILURE)
|
||||
message("================================\n"
|
||||
"PySide2 Python module not found.\n"
|
||||
"================================\n")
|
||||
else()
|
||||
message(STATUS "===============================================\n"
|
||||
"PySide2 Python module found at ${PRINT_OUTPUT}.\n"
|
||||
"===============================================\n")
|
||||
endif()
|
||||
|
||||
endmacro(SetupShibokenAndPyside)
|
||||
@@ -1,10 +0,0 @@
|
||||
macro(SetupSpaceball)
|
||||
# ------------------------------ Spaceball -------------------------------
|
||||
|
||||
if (WIN32)
|
||||
#future
|
||||
else(WIN32)
|
||||
find_package(Spnav)
|
||||
endif(WIN32)
|
||||
|
||||
endmacro(SetupSpaceball)
|
||||
@@ -1,12 +0,0 @@
|
||||
macro(SetupSwig)
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
if (NOT SWIG_FOUND)
|
||||
message("=====================================================\n"
|
||||
"SWIG not found, will not build SWIG binding for pivy.\n"
|
||||
"=====================================================\n")
|
||||
endif(NOT SWIG_FOUND)
|
||||
|
||||
endmacro(SetupSwig)
|
||||
@@ -1,11 +0,0 @@
|
||||
macro(SetupXercesC)
|
||||
# -------------------------------- XercesC --------------------------------
|
||||
|
||||
find_package(XercesC REQUIRED)
|
||||
if(NOT XercesC_FOUND)
|
||||
message(FATAL_ERROR "==================\n"
|
||||
"XercesC not found.\n"
|
||||
"==================\n")
|
||||
endif(NOT XercesC_FOUND)
|
||||
|
||||
endmacro(SetupXercesC)
|
||||
+135
-150
@@ -3,177 +3,171 @@ include (CheckCXXSourceRuns)
|
||||
# ================================================================================
|
||||
# == Macros, mostly for special targets ==========================================
|
||||
|
||||
MACRO(COPY_IF_DIFFERENT FROM_DIR TO_DIR FILES TARGETS TAGS)
|
||||
# Macro to implement copy_if_different for a list of files
|
||||
# Arguments -
|
||||
# FROM_DIR - this is the source directory
|
||||
# TO_DIR - this is the destination directory
|
||||
# FILES - names of the files to copy
|
||||
# TODO: add globing.
|
||||
# TARGETS - List of targets
|
||||
# TAGS - Since only the file name is used
|
||||
# to generate rules, pre-pend a user
|
||||
# supplied tag to prevent duplicate rule errors.
|
||||
SET(AddTargets "")
|
||||
FOREACH(SRC ${FILES})
|
||||
GET_FILENAME_COMPONENT(SRCFILE ${SRC} NAME)
|
||||
# Command to copy the files to ${STEP1}/src, if changed.
|
||||
SET(TARGET "${TAGS}/${SRCFILE}")
|
||||
IF("${FROM_DIR}" STREQUAL "")
|
||||
SET(FROM ${SRC})
|
||||
ELSE("${FROM_DIR}" STREQUAL "")
|
||||
SET(FROM ${FROM_DIR}/${SRC})
|
||||
ENDIF("${FROM_DIR}" STREQUAL "")
|
||||
IF("${TO_DIR}" STREQUAL "")
|
||||
SET(TO ${SRCFILE})
|
||||
ELSE("${TO_DIR}" STREQUAL "")
|
||||
SET(TO ${TO_DIR}/${SRCFILE})
|
||||
ENDIF("${TO_DIR}" STREQUAL "")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${TARGET}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different ${FROM} ${TO}
|
||||
COMMENT "Copying ${SRCFILE} ${TO_DIR}"
|
||||
)
|
||||
SET(AddTargets ${AddTargets} ${TARGET})
|
||||
ENDFOREACH(SRC ${FILES})
|
||||
SET(${TARGETS} ${AddTargets})
|
||||
ENDMACRO(COPY_IF_DIFFERENT FROM_DIR TO_DIR FILES TARGETS TAGS)
|
||||
|
||||
MACRO (fc_copy_sources target_name outpath)
|
||||
if(BUILD_VERBOSE_GENERATION)
|
||||
set(fc_details " (fc_copy_sources called from ${CMAKE_CURRENT_SOURCE_DIR})")
|
||||
else()
|
||||
set(fc_details "")
|
||||
endif()
|
||||
foreach(it ${ARGN})
|
||||
file(TO_NATIVE_PATH "${outpath}/${it}" outfile)
|
||||
get_filename_component(infile ${it} ABSOLUTE)
|
||||
get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
get_filename_component(outfile ${outfile} ABSOLUTE)
|
||||
add_file_dependencies(${infile} ${outfile})
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
SOURCE ${infile}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy ${infile} ${outfile}
|
||||
TARGET ${target_name}
|
||||
OUTPUTS ${outfile}
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE ${target_name}
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_copy_sources)
|
||||
|
||||
MACRO (fc_copy_file_if_different inputfile outputfile)
|
||||
if (EXISTS ${inputfile})
|
||||
if (EXISTS ${outputfile})
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${inputfile}
|
||||
${outputfile}
|
||||
RESULT_VARIABLE DIFFERENT_FILES
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
|
||||
if (DIFFERENT_FILES)
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${inputfile}"
|
||||
"${outputfile}")
|
||||
endif()
|
||||
else()
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${inputfile}"
|
||||
"${outputfile}")
|
||||
endif()
|
||||
endif()
|
||||
ENDMACRO(fc_copy_file_if_different)
|
||||
|
||||
MACRO (fc_target_copy_resource target_name inpath outpath)
|
||||
# Macro to copy a list of files into a nested directory structure
|
||||
# Arguments -
|
||||
# target_name - name of the target the files will be added to
|
||||
# inpath - name of the source directory
|
||||
# outpath - name of the destination directory
|
||||
# ARGN - a list of relative file names that will be copied
|
||||
#
|
||||
# If a relative file name is foo/bar.txt then the foo directory
|
||||
# part will be kept so that the destination file name will be
|
||||
# ${outpath}/foo/bar.txt
|
||||
#
|
||||
if(BUILD_VERBOSE_GENERATION)
|
||||
set(fc_details " (fc_target_copy_resource called from ${CMAKE_CURRENT_SOURCE_DIR})")
|
||||
else()
|
||||
set(fc_details "")
|
||||
endif()
|
||||
foreach(it ${ARGN})
|
||||
get_filename_component(infile "${inpath}/${it}" ABSOLUTE)
|
||||
get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
file(TO_NATIVE_PATH "${inpath}/${it}" infile)
|
||||
file(TO_NATIVE_PATH "${outpath}/${it}" outfile)
|
||||
get_filename_component(infile ${infile} ABSOLUTE)
|
||||
get_filename_component(outfile ${outfile} ABSOLUTE)
|
||||
add_file_dependencies(${infile} ${outfile})
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
SOURCE ${infile}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy ${infile} ${outfile}
|
||||
TARGET ${target_name}
|
||||
OUTPUTS ${outfile}
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE ${target_name}
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource)
|
||||
|
||||
MACRO (fc_target_copy_resource_flat target_name inpath outpath)
|
||||
# Macro to copy a list of files into a flat directory structure
|
||||
# Arguments -
|
||||
# target_name - name of the target the files will be added to
|
||||
# inpath - name of the source directory
|
||||
# outpath - name of the destination directory
|
||||
# ARGN - a list of relative file names that will be copied
|
||||
#
|
||||
# If a relative file name is foo/bar.txt then the foo directory
|
||||
# part will be removed so that the destination file name will be
|
||||
# ${outpath}/bar.txt
|
||||
#
|
||||
if(BUILD_VERBOSE_GENERATION)
|
||||
set(fc_details " (fc_target_copy_resource_flat called from ${CMAKE_CURRENT_SOURCE_DIR})")
|
||||
else()
|
||||
set(fc_details "")
|
||||
endif()
|
||||
foreach(it ${ARGN})
|
||||
get_filename_component(infile "${inpath}/${it}" ABSOLUTE)
|
||||
get_filename_component(outfile "${it}" NAME)
|
||||
get_filename_component(outfile "${outpath}/${outfile}" ABSOLUTE)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target_name}
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
ENDMACRO(fc_target_copy_resource_flat)
|
||||
macro(copy_to_local_output_paths SOURCE_PATHS)
|
||||
if(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
# No Debug/Release output paths
|
||||
set(DEBUG_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(RELEASE_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
else(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
#set(DEBUG_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
#set(RELEASE_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/Release)
|
||||
set(DEBUG_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(RELEASE_LOCAL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
file(TO_NATIVE_PATH ${SOURCE_PATHS} NATIVE_SOURCE)
|
||||
file(TO_NATIVE_PATH ${DEBUG_LOCAL_OUTPUT_PATH}/ NATIVE_DEBUG_DESTINATION)
|
||||
file(TO_NATIVE_PATH ${RELEASE_LOCAL_OUTPUT_PATH}/ NATIVE_RELESE_DESTINATION)
|
||||
message(STATUS "${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_DEBUG_DESTINATION}")
|
||||
execute_process(
|
||||
COMMAND ${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_DEBUG_DESTINATION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
if(NOT ${DEBUG_LOCAL_OUTPUT_PATH} STREQUAL ${RELEASE_LOCAL_OUTPUT_PATH})
|
||||
message(STATUS "${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_RELESE_DESTINATION}")
|
||||
execute_process(
|
||||
COMMAND ${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_RELESE_DESTINATION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif(NOT ${DEBUG_LOCAL_OUTPUT_PATH} STREQUAL ${RELEASE_LOCAL_OUTPUT_PATH})
|
||||
endmacro(copy_to_local_output_paths)
|
||||
|
||||
macro(copy_to_main_output_paths SOURCE_PATHS)
|
||||
file(TO_NATIVE_PATH ${SOURCE_PATHS} NATIVE_SOURCE)
|
||||
file(TO_NATIVE_PATH ${DEBUG_MAIN_OUTPUT_PATH}/ NATIVE_DEBUG_DESTINATION)
|
||||
file(TO_NATIVE_PATH ${RELEASE_MAIN_OUTPUT_PATH}/ NATIVE_RELESE_DESTINATION)
|
||||
message(STATUS "${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_DEBUG_DESTINATION}")
|
||||
execute_process(
|
||||
COMMAND ${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_DEBUG_DESTINATION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
if(NOT ${DEBUG_MAIN_OUTPUT_PATH} STREQUAL ${RELEASE_MAIN_OUTPUT_PATH})
|
||||
message(STATUS "${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_RELESE_DESTINATION}")
|
||||
execute_process(
|
||||
COMMAND ${PLATFORM_CP} ${NATIVE_SOURCE} ${NATIVE_RELESE_DESTINATION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif(NOT ${DEBUG_MAIN_OUTPUT_PATH} STREQUAL ${RELEASE_MAIN_OUTPUT_PATH})
|
||||
endmacro(copy_to_main_output_paths)
|
||||
|
||||
# It would be a bit cleaner to generate these files in ${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
||||
macro(generate_from_xml BASE_NAME)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/generate.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml" SOURCE_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/src/Tools/generate.py TOOL_PATH)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml SOURCE_PATH)
|
||||
|
||||
set(SOURCE_CPP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp" )
|
||||
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp SOURCE_CPP_PATH)
|
||||
# BASE_NAME may include also a path name
|
||||
GET_FILENAME_COMPONENT(OUTPUT_PATH "${SOURCE_CPP_PATH}" PATH)
|
||||
file(TO_NATIVE_PATH "${OUTPUT_PATH}" OUTPUT_NATIVE_PATH)
|
||||
if(NOT EXISTS "${SOURCE_CPP_PATH}")
|
||||
GET_FILENAME_COMPONENT(OUTPUT_PATH ${SOURCE_CPP_PATH} PATH)
|
||||
if (NOT EXISTS ${SOURCE_CPP_PATH})
|
||||
# assures the source files are generated at least once
|
||||
message(STATUS "${SOURCE_CPP_PATH}")
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${TOOL_PATH} --outputPath ${OUTPUT_PATH} ${SOURCE_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif (NOT EXISTS ${SOURCE_CPP_PATH})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp"
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY "${BASE_NAME}.xml"
|
||||
DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py"
|
||||
"${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building ${BASE_NAME}.h/.cpp out of ${BASE_NAME}.xml"
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h ${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${TOOL_PATH} --outputPath ${OUTPUT_PATH} ${BASE_NAME}.xml
|
||||
MAIN_DEPENDENCY ${BASE_NAME}.xml
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT Building ${BASE_NAME}.h/.cpp out of ${BASE_NAME}.xml
|
||||
)
|
||||
endmacro(generate_from_xml)
|
||||
|
||||
macro(generate_from_py BASE_NAME OUTPUT_FILE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Building files out of ${BASE_NAME}.py")
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py TOOL_PATH)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py SOURCE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${TOOL_PATH} ${SOURCE_PATH} ${OUTPUT_FILE}
|
||||
MAIN_DEPENDENCY ${BASE_NAME}.py
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT Building files out of ${BASE_NAME}.py)
|
||||
endmacro(generate_from_py)
|
||||
|
||||
macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
|
||||
set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py")
|
||||
file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}" SOURCE_NATIVE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}"
|
||||
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}"
|
||||
DEPENDS "${TOOL_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Building files out of ${INPUT_FILE}")
|
||||
endmacro(generate_from_any)
|
||||
|
||||
# generates the ui -> cpp h files
|
||||
#macro(qt4_wrap_ui infiles )
|
||||
#
|
||||
#endmacro(qt4_wrap_ui)
|
||||
|
||||
|
||||
MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar)
|
||||
@@ -228,31 +222,25 @@ MACRO(SET_BIN_DIR ProjectName OutputName)
|
||||
set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2})
|
||||
set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}${ARGV2})
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${ARGV2})
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2})
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}${ARGV2})
|
||||
else(${ARGC} GREATER 2)
|
||||
set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
|
||||
set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib)
|
||||
set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib)
|
||||
endif(${ARGC} GREATER 2)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d)
|
||||
else(WIN32)
|
||||
# FreeCADBase, SMDS, Driver, MEFISTO2 and area-native libs don't depend on parts from CMAKE_INSTALL_LIBDIR
|
||||
if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area-native)$")
|
||||
if(${ARGC} STREQUAL 4)
|
||||
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${ARGV3})
|
||||
elseif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
endif(WIN32)
|
||||
# FreeCADBase, SMDS, Driver and MEFISTO2 libs don't depend on parts from CMAKE_INSTALL_LIBDIR
|
||||
if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$")
|
||||
if(${ARGC} STREQUAL 4)
|
||||
set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
|
||||
else(${ARGC} STREQUAL 4)
|
||||
set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
|
||||
endif(${ARGC} STREQUAL 4)
|
||||
endif(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$")
|
||||
endif(WIN32)
|
||||
ENDMACRO(SET_BIN_DIR)
|
||||
|
||||
# Set python prefix & suffix together
|
||||
@@ -263,8 +251,5 @@ MACRO(SET_PYTHON_PREFIX_SUFFIX ProjectName)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${ProjectName} PROPERTIES SUFFIX ".pyd")
|
||||
# 0000661: cmake build on Mac OS: dealing with dylib versus so
|
||||
elseif(APPLE)
|
||||
set_target_properties(${ProjectName} PROPERTIES SUFFIX ".so")
|
||||
endif(WIN32)
|
||||
ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
|
||||
ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
|
||||
|
||||
@@ -0,0 +1,526 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_LIBRARY optimized python27.lib debug python27_d.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.7.5)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xerces-c-3.1.1)
|
||||
set(XERCESC_LIBRARIES xerces-c_3.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_3D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/boost-1_55)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc110-mt-1_55.lib
|
||||
optimized boost_system-vc110-mt-1_55.lib
|
||||
optimized boost_graph-vc110-mt-1_55.lib
|
||||
optimized boost_program_options-vc110-mt-1_55.lib
|
||||
optimized boost_regex-vc110-mt-1_55.lib
|
||||
optimized boost_signals-vc110-mt-1_55.lib
|
||||
optimized boost_thread-vc110-mt-1_55.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc110-mt-gd-1_55.lib
|
||||
debug boost_system-vc110-mt-gd-1_55.lib
|
||||
debug boost_graph-vc110-mt-gd-1_55.lib
|
||||
debug boost_program_options-vc110-mt-gd-1_55.lib
|
||||
debug boost_regex-vc110-mt-gd-1_55.lib
|
||||
debug boost_signals-vc110-mt-gd-1_55.lib
|
||||
debug boost_thread-vc110-mt-gd-1_55.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib-1.2.7)
|
||||
set(ZLIB_LIBRARIES zlib.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
#set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
#set(SMESH_LIBRARIES
|
||||
# StdMeshers.lib
|
||||
# MEFISTO2.lib
|
||||
# SMESH.lib
|
||||
# DriverUNV.lib
|
||||
# SMESHDS.lib
|
||||
# DriverSTL.lib
|
||||
# DriverDAT.lib
|
||||
# Driver.lib
|
||||
# SMDS.lib
|
||||
#)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
|
||||
find_path(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
${FREECAD_LIBPACK_DIR}/include/Coin-4.0.0
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin4
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin4d
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/QtCore
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.6/Qt3Support
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY_DEBUG
|
||||
debug Qt3Supportd4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY
|
||||
optimized Qt3Support4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
set(QT_HELPCOMPILER_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qhelpgenerator.exe)
|
||||
set(QT_COLLECTIOMGENERATOR_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qcollectiongenerator.exe)
|
||||
|
||||
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/SoQt-1.6.0)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV2_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV2_LIBRARIES
|
||||
optimized opencv_calib3d249.lib
|
||||
debug opencv_calib3d249d.lib
|
||||
optimized opencv_contrib249.lib
|
||||
debug opencv_contrib249d.lib
|
||||
optimized opencv_core249.lib
|
||||
debug opencv_core249d.lib
|
||||
optimized opencv_features2d249.lib
|
||||
debug opencv_features2d249d.lib
|
||||
optimized opencv_flann249.lib
|
||||
debug opencv_flann249d.lib
|
||||
optimized opencv_gpu249.lib
|
||||
debug opencv_gpu249d.lib
|
||||
optimized opencv_highgui249.lib
|
||||
debug opencv_highgui249d.lib
|
||||
optimized opencv_imgproc249.lib
|
||||
debug opencv_imgproc249d.lib
|
||||
optimized opencv_legacy249.lib
|
||||
debug opencv_legacy249d.lib
|
||||
optimized opencv_ml249.lib
|
||||
debug opencv_ml249d.lib
|
||||
optimized opencv_nonfree249.lib
|
||||
debug opencv_nonfree249d.lib
|
||||
optimized opencv_objdetect249.lib
|
||||
debug opencv_objdetect249d.lib
|
||||
optimized opencv_ocl249.lib
|
||||
debug opencv_ocl249d.lib
|
||||
optimized opencv_photo249.lib
|
||||
debug opencv_photo249d.lib
|
||||
optimized opencv_stitching249.lib
|
||||
debug opencv_stitching249d.lib
|
||||
optimized opencv_superres249.lib
|
||||
debug opencv_superres249d.lib
|
||||
optimized opencv_ts249.lib
|
||||
debug opencv_ts249d.lib
|
||||
optimized opencv_video249.lib
|
||||
debug opencv_video249d.lib
|
||||
optimized opencv_videostab249.lib
|
||||
debug opencv_videostab249d.lib
|
||||
)
|
||||
set(OPENCV2_FOUND TRUE)
|
||||
|
||||
# NGLIB (NetGen)
|
||||
|
||||
set(NGLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/nglib/include)
|
||||
set(NGLIB_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(NGLIB_LIBRARIES
|
||||
optimized nglib
|
||||
)
|
||||
set(NGLIB_DEBUG_LIBRARIES
|
||||
debug nglibd
|
||||
)
|
||||
|
||||
|
||||
# Pointscloud library
|
||||
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7)
|
||||
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)
|
||||
|
||||
set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
|
||||
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
|
||||
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
|
||||
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
|
||||
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
|
||||
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
|
||||
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
|
||||
set(PCL_ML_LIBRARIES optimized pcl_ml_release debug pcl_ml_debug)
|
||||
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
|
||||
set(PCL_RECOGNITION_LIBRARIES optimized pcl_recognition_release debug pcl_recognition_debug)
|
||||
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
|
||||
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
|
||||
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
|
||||
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
|
||||
set(PCL_STEREO_LIBRARIES optimized pcl_stereo_release debug pcl_stereo_debug)
|
||||
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
|
||||
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)
|
||||
|
||||
set(PCL_LIBRARIES
|
||||
${PCL_COMMON_LIBRARIES}
|
||||
${PCL_FEATURES_LIBRARIES}
|
||||
${PCL_FILTERS_LIBRARIES}
|
||||
${PCL_IO_LIBRARIES}
|
||||
${PCL_IO_PLY_LIBRARIES}
|
||||
${PCL_KDTREE_LIBRARIES}
|
||||
${PCL_KEYPOINTS_LIBRARIES}
|
||||
${PCL_ML_LIBRARIES}
|
||||
${PCL_OCTREE_LIBRARIES}
|
||||
${PCL_RECOGNITION_LIBRARIES}
|
||||
${PCL_REGISTRATION_LIBRARIES}
|
||||
${PCL_SAMPLE_CONSENSUS_LIBRARIES}
|
||||
${PCL_SEARCH_LIBRARIES}
|
||||
${PCL_SEGMENTATION_LIBRARIES}
|
||||
${PCL_STEREO_LIBRARIES}
|
||||
${PCL_SURFACE_LIBRARIES}
|
||||
${PCL_TRACKING_LIBRARIES}
|
||||
)
|
||||
set(PCL_FOUND TRUE)
|
||||
set(PCL_COMMON_FOUND TRUE)
|
||||
set(PCL_FEATURES_FOUND TRUE)
|
||||
set(PCL_FILTERS_FOUND TRUE)
|
||||
set(PCL_IO_FOUND TRUE)
|
||||
set(PCL_IO_PLY_FOUND TRUE)
|
||||
set(PCL_KDTREE_FOUND TRUE)
|
||||
set(PCL_KEYPOINTS_FOUND TRUE)
|
||||
set(PCL_ML_FOUND TRUE)
|
||||
set(PCL_OCTREE_FOUND TRUE)
|
||||
set(PCL_RECOGNITION_FOUND TRUE)
|
||||
set(PCL_REGISTRATION_FOUND TRUE)
|
||||
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
|
||||
set(PCL_SEARCH_FOUND TRUE)
|
||||
set(PCL_SEGMENTATION_FOUND TRUE)
|
||||
set(PCL_STEREO_FOUND TRUE)
|
||||
set(PCL_SURFACE_FOUND TRUE)
|
||||
set(PCL_TRACKING_FOUND TRUE)
|
||||
|
||||
set(FLANN_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/flann-1.8)
|
||||
|
||||
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/oce-0.15)
|
||||
set(OCC_LIBRARY_DIR ${FREECAD_LIBPACK_DIR}/lib)
|
||||
set(OCC_LIBRARIES
|
||||
optimized TKFillet
|
||||
optimized TKMesh
|
||||
optimized TKernel
|
||||
optimized TKG2d
|
||||
optimized TKG3d
|
||||
optimized TKMath
|
||||
optimized TKIGES
|
||||
optimized TKSTL
|
||||
optimized TKShHealing
|
||||
optimized TKXSBase
|
||||
optimized TKBool
|
||||
optimized TKBO
|
||||
optimized TKBRep
|
||||
optimized TKTopAlgo
|
||||
optimized TKGeomAlgo
|
||||
optimized TKGeomBase
|
||||
optimized TKOffset
|
||||
optimized TKPrim
|
||||
optimized TKSTEP
|
||||
optimized TKSTEPBase
|
||||
optimized TKSTEPAttr
|
||||
optimized TKHLR
|
||||
optimized TKFeat
|
||||
)
|
||||
set(OCC_DEBUG_LIBRARIES
|
||||
debug TKFilletd
|
||||
debug TKMeshd
|
||||
debug TKerneld
|
||||
debug TKG2dd
|
||||
debug TKG3dd
|
||||
debug TKMathd
|
||||
debug TKIGESd
|
||||
debug TKSTLd
|
||||
debug TKShHealingd
|
||||
debug TKXSBased
|
||||
debug TKBoold
|
||||
debug TKBOd
|
||||
debug TKBRepd
|
||||
debug TKTopAlgod
|
||||
debug TKGeomAlgod
|
||||
debug TKGeomBased
|
||||
debug TKOffsetd
|
||||
debug TKPrimd
|
||||
debug TKSTEPd
|
||||
debug TKSTEPBased
|
||||
debug TKSTEPAttrd
|
||||
debug TKHLRd
|
||||
debug TKFeatd
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
optimized TKCAF
|
||||
optimized TKXCAF
|
||||
optimized TKLCAF
|
||||
optimized TKXDESTEP
|
||||
optimized TKXDEIGES
|
||||
optimized TKMeshVS
|
||||
optimized TKAdvTools
|
||||
)
|
||||
set(OCC_OCAF_DEBUG_LIBRARIES
|
||||
debug TKCAFd
|
||||
debug TKXCAFd
|
||||
debug TKLCAFd
|
||||
debug TKXDESTEPd
|
||||
debug TKXDEIGESd
|
||||
debug TKMeshVSd
|
||||
debug TKAdvToolsd
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
|
||||
|
||||
set(EIGEN3_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen3)
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
|
||||
set(ODE_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/ode-0.11.1)
|
||||
set(ODE_LIBRARIES ${FREECAD_LIBPACK_DIR}/lib/ode_double.lib)
|
||||
set(ODE_FOUND TRUE)
|
||||
|
||||
# FreeType
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
set(FREETYPE_LIBRARIES
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/freetype.lib
|
||||
debug ${FREECAD_LIBPACK_DIR}/lib/freetyped.lib
|
||||
)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${FREECAD_LIBPACK_DIR}/include/FreeType-2.4.12
|
||||
)
|
||||
set(FREETYPE_VERSION_STRING
|
||||
"2.4.12"
|
||||
)
|
||||
set(FREETYPE_FOUND
|
||||
TRUE
|
||||
)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
|
||||
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||
# SHIBOKEN_BINARY - Executable name
|
||||
|
||||
SET(SHIBOKEN_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/shiboken-1.2.2)
|
||||
SET(SHIBOKEN_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.7.lib debug ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.7_d.lib)
|
||||
set(SHIBOKEN_BINARY ${FREECAD_LIBPACK_DIR}/bin/shiboken)
|
||||
|
||||
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide
|
||||
# PYSIDE_LIBRARY - Files to link against to use PySide
|
||||
# PYSIDE_PYTHONPATH - Path to where the PySide Python module files could be found
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
|
||||
|
||||
SET(PYSIDE_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/PySide-1.2.2)
|
||||
SET(PYSIDE_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.7.lib debug ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.7_d.lib)
|
||||
SET(PYSIDE_PYTHONPATH ${FREECAD_LIBPACK_DIR}/pyside/Lib/site-packages)
|
||||
SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems)
|
||||
@@ -0,0 +1,317 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_DEBUG_LIBRARY python25_d.lib)
|
||||
set(PYTHON_LIBRARY python25.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xercesc)
|
||||
set(XERCESC_LIBRARIES xerces-c_2.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_2D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/boost)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc80-mt.lib
|
||||
#optimized boost_graph-vc80-mt.lib
|
||||
optimized boost_program_options-vc80-mt.lib
|
||||
optimized boost_regex-vc80-mt.lib
|
||||
optimized boost_signals-vc80-mt.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc80-mt-gd.lib
|
||||
#debug boost_graph-vc80-mt-gd.lib
|
||||
debug boost_program_options-vc80-mt-gd.lib
|
||||
debug boost_regex-vc80-mt-gd.lib
|
||||
debug boost_signals-vc80-mt-gd.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib)
|
||||
set(ZLIB_LIBRARIES zlib1.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
set(SMESH_LIBRARIES
|
||||
StdMeshers.lib
|
||||
MEFISTO2.lib
|
||||
SMESH.lib
|
||||
DriverUNV.lib
|
||||
SMESHDS.lib
|
||||
DriverSTL.lib
|
||||
DriverDAT.lib
|
||||
Driver.lib
|
||||
SMDS.lib
|
||||
)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
set(COIN3D_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/coin)
|
||||
set(COIN3D_LIBRARY_DEBUG coin2d.lib)
|
||||
set(COIN3D_LIBRARY_RELEASE coin2.lib)
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY_DEBUG
|
||||
debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
|
||||
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/soqt)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV_LIBRARIES cv.lib cvaux.lib cxcore.lib cxts.lib highgui.lib)
|
||||
set(OPENCV_FOUND TRUE)
|
||||
|
||||
# ODE
|
||||
set(ODE_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include)
|
||||
set(ODE_LIBRARIES ode_double.lib)
|
||||
set(ODE_FOUND TRUE)
|
||||
|
||||
# OCC
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/OpenCascade)
|
||||
set(OCC_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEP
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
@@ -0,0 +1,333 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_DEBUG_LIBRARY python26_d.lib)
|
||||
set(PYTHON_LIBRARY python26.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xercesc)
|
||||
set(XERCESC_LIBRARIES xerces-c_2.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_2D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/boost)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc90-mt-1_39.lib
|
||||
optimized boost_system-vc90-mt-1_39.lib
|
||||
optimized boost_graph-vc90-mt-1_39.lib
|
||||
optimized boost_program_options-vc90-mt-1_39.lib
|
||||
optimized boost_regex-vc90-mt-1_39.lib
|
||||
optimized boost_signals-vc90-mt-1_39.lib
|
||||
optimized boost_thread-vc90-mt-1_39.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc90-mt-gd-1_39.lib
|
||||
debug boost_date_time-vc90-mt-gd-1_39.lib
|
||||
debug boost_filesystem-vc90-mt-gd-1_39.lib
|
||||
debug boost_iostreams-vc90-mt-gd-1_39.lib
|
||||
debug boost_math_c99f-vc90-mt-gd-1_39.lib
|
||||
debug boost_math_tr1f-vc90-mt-gd-1_39.lib
|
||||
debug boost_thread-vc90-mt-gd-1_39.lib
|
||||
debug boost_system-vc90-mt-gd-1_39.lib
|
||||
debug boost_graph-vc90-mt-gd-1_39.lib
|
||||
debug boost_program_options-vc90-mt-gd-1_39.lib
|
||||
debug boost_regex-vc90-mt-gd-1_39.lib
|
||||
debug boost_signals-vc90-mt-gd-1_39.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib)
|
||||
set(ZLIB_LIBRARIES zdll.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
set(SMESH_LIBRARIES
|
||||
StdMeshers.lib
|
||||
MEFISTO2.lib
|
||||
SMESH.lib
|
||||
DriverUNV.lib
|
||||
SMESHDS.lib
|
||||
DriverSTL.lib
|
||||
DriverDAT.lib
|
||||
Driver.lib
|
||||
SMDS.lib
|
||||
)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
set(COIN3D_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/coin)
|
||||
set(COIN3D_LIBRARY_DEBUG coin3d.lib)
|
||||
set(COIN3D_LIBRARY_RELEASE coin3.lib)
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY_DEBUG
|
||||
debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
set(QT_HELPCOMPILER_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qhelpgenerator.exe)
|
||||
set(QT_COLLECTIOMGENERATOR_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qcollectiongenerator.exe)
|
||||
|
||||
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/soqt)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV_LIBRARIES cv.lib cvaux.lib cxcore.lib cxts.lib highgui.lib)
|
||||
set(OPENCV_FOUND TRUE)
|
||||
|
||||
# OCC
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/OpenCascade)
|
||||
set(OCC_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEP
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
|
||||
SET(EIGEN2_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen2)
|
||||
set(EIGEN2_FOUND TRUE)
|
||||
|
||||
SET(EIGEN3_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen3)
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_DEBUG_LIBRARY python26_d.lib)
|
||||
set(PYTHON_LIBRARY python26.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xercesc)
|
||||
set(XERCESC_LIBRARIES xerces-c_2.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_2D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/boost)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc90-mt-1_48.lib
|
||||
optimized boost_system-vc90-mt-1_48.lib
|
||||
optimized boost_graph-vc90-mt-1_48.lib
|
||||
optimized boost_program_options-vc90-mt-1_48.lib
|
||||
optimized boost_regex-vc90-mt-1_48.lib
|
||||
optimized boost_signals-vc90-mt-1_48.lib
|
||||
optimized boost_thread-vc90-mt-1_48.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc90-mt-gd-1_48.lib
|
||||
debug boost_date_time-vc90-mt-gd-1_48.lib
|
||||
debug boost_filesystem-vc90-mt-gd-1_48.lib
|
||||
debug boost_iostreams-vc90-mt-gd-1_48.lib
|
||||
debug boost_math_c99f-vc90-mt-gd-1_48.lib
|
||||
debug boost_math_tr1f-vc90-mt-gd-1_48.lib
|
||||
debug boost_thread-vc90-mt-gd-1_48.lib
|
||||
debug boost_system-vc90-mt-gd-1_48.lib
|
||||
debug boost_graph-vc90-mt-gd-1_48.lib
|
||||
debug boost_program_options-vc90-mt-gd-1_48.lib
|
||||
debug boost_regex-vc90-mt-gd-1_48.lib
|
||||
debug boost_signals-vc90-mt-gd-1_48.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib)
|
||||
set(ZLIB_LIBRARIES zdll.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
#set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
#set(SMESH_LIBRARIES
|
||||
# optimized StdMeshers.lib
|
||||
# optimized MEFISTO2.lib
|
||||
# optimized SMESH.lib
|
||||
# optimized DriverUNV.lib
|
||||
# optimized SMESHDS.lib
|
||||
# optimized NETGENPlugin.lib
|
||||
# optimized DriverSTL.lib
|
||||
# optimized DriverDAT.lib
|
||||
# optimized Driver.lib
|
||||
# optimized SMDS.lib
|
||||
#)
|
||||
#set(SMESH_DEBUG_LIBRARIES
|
||||
# debug StdMeshersd.lib
|
||||
# debug MEFISTO2d.lib
|
||||
# debug SMESHd.lib
|
||||
# debug DriverUNVd.lib
|
||||
# debug SMESHDSd.lib
|
||||
# debug NETGENPlugind.lib
|
||||
# debug DriverSTLd.lib
|
||||
# debug DriverDATd.lib
|
||||
# debug Driverd.lib
|
||||
# debug SMDSd.lib
|
||||
#)
|
||||
#set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
set(COIN3D_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/coin)
|
||||
set(COIN3D_LIBRARY_DEBUG coin3d.lib)
|
||||
set(COIN3D_LIBRARY_RELEASE coin3.lib)
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/
|
||||
${FREECAD_LIBPACK_DIR}/include/QT/QtCore
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib
|
||||
debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
set(QT_HELPCOMPILER_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qhelpgenerator.exe)
|
||||
set(QT_COLLECTIOMGENERATOR_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qcollectiongenerator.exe)
|
||||
|
||||
if(FREECAD_LIBPACK_USEPYSIDE)
|
||||
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||
# SHIBOKEN_BINARY - Executable name
|
||||
|
||||
SET(SHIBOKEN_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/shiboken)
|
||||
SET(SHIBOKEN_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.6.lib debug ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.6_d.lib)
|
||||
set(SHIBOKEN_BINARY ${FREECAD_LIBPACK_DIR}/bin/shiboken)
|
||||
|
||||
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide
|
||||
# PYSIDE_LIBRARY - Files to link against to use PySide
|
||||
# PYSIDE_PYTHONPATH - Path to where the PySide Python module files could be found
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
|
||||
|
||||
SET(PYSIDE_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/PySide)
|
||||
SET(PYSIDE_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.6.lib debug ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.6_d.lib)
|
||||
#SET(PYSIDE_PYTHONPATH ${FREECAD_LIBPACK_DIR}/pyside/Lib/site-packages)
|
||||
#SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems)
|
||||
endif(FREECAD_LIBPACK_USEPYSIDE)
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/soqt)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV_LIBRARIES cv.lib cvaux.lib cxcore.lib cxts.lib highgui.lib)
|
||||
set(OPENCV_FOUND TRUE)
|
||||
|
||||
# NGLIB (NetGen)
|
||||
|
||||
set(NGLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/nglib/Include)
|
||||
set(NGLIB_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(NGLIB_LIBRARIES
|
||||
optimized nglib
|
||||
)
|
||||
set(NGLIB_DEBUG_LIBRARIES
|
||||
debug nglibd
|
||||
)
|
||||
|
||||
|
||||
|
||||
# OCC
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/OpenCascade)
|
||||
set(OCC_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(OCC_LIBRARIES
|
||||
optimized TKFillet
|
||||
optimized TKMesh
|
||||
optimized TKernel
|
||||
optimized TKG2d
|
||||
optimized TKG3d
|
||||
optimized TKMath
|
||||
optimized TKIGES
|
||||
optimized TKSTL
|
||||
optimized TKShHealing
|
||||
optimized TKXSBase
|
||||
optimized TKBool
|
||||
optimized TKXSBase
|
||||
optimized TKBO
|
||||
optimized TKBRep
|
||||
optimized TKTopAlgo
|
||||
optimized TKGeomAlgo
|
||||
optimized TKGeomBase
|
||||
optimized TKOffset
|
||||
optimized TKPrim
|
||||
optimized TKSTEP
|
||||
optimized TKSTEPBase
|
||||
optimized TKSTEPAttr
|
||||
optimized TKHLR
|
||||
optimized TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
optimized TKCAF
|
||||
optimized TKXCAF
|
||||
optimized TKLCAF
|
||||
optimized TKXDESTEP
|
||||
optimized TKXDEIGES
|
||||
optimized TKMeshVS
|
||||
optimized TKAdvTools
|
||||
)
|
||||
set(OCC_DEBUG_LIBRARIES
|
||||
debug TKFilletd
|
||||
debug TKMeshd
|
||||
debug TKerneld
|
||||
debug TKG2dd
|
||||
debug TKG3dd
|
||||
debug TKMathd
|
||||
debug TKIGESd
|
||||
debug TKSTLd
|
||||
debug TKShHealingd
|
||||
debug TKXSBased
|
||||
debug TKBoold
|
||||
debug TKXSBased
|
||||
debug TKBOd
|
||||
debug TKBRepd
|
||||
debug TKTopAlgod
|
||||
debug TKGeomAlgod
|
||||
debug TKGeomBased
|
||||
debug TKOffsetd
|
||||
debug TKPrimd
|
||||
debug TKSTEPd
|
||||
debug TKSTEPBased
|
||||
debug TKSTEPAttrd
|
||||
debug TKHLRd
|
||||
debug TKFeatd
|
||||
)
|
||||
set(OCC_OCAF_DEBUG_LIBRARIES
|
||||
debug TKCAFd
|
||||
debug TKXCAFd
|
||||
debug TKLCAFd
|
||||
debug TKXDESTEPd
|
||||
debug TKXDEIGESd
|
||||
debug TKMeshVSd
|
||||
debug TKAdvToolsd
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
|
||||
SET(EIGEN2_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen2)
|
||||
set(EIGEN2_FOUND TRUE)
|
||||
|
||||
SET(EIGEN3_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen3)
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
|
||||
|
||||
# FreeType
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
set(FREETYPE_LIBRARIES
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/freetype.lib
|
||||
debug ${FREECAD_LIBPACK_DIR}/lib/freetyped.lib
|
||||
)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${FREECAD_LIBPACK_DIR}/include/FreeType-2.4.12
|
||||
)
|
||||
set(FREETYPE_VERSION_STRING
|
||||
"2.4.12"
|
||||
)
|
||||
set(FREETYPE_FOUND
|
||||
TRUE
|
||||
)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
@@ -0,0 +1,524 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_LIBRARY optimized python27.lib debug python27_d.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.7.6)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xerces-c-3.1.0)
|
||||
set(XERCESC_LIBRARIES xerces-c_3.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_3D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/boost-1_54)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc90-mt-1_54.lib
|
||||
optimized boost_system-vc90-mt-1_54.lib
|
||||
optimized boost_graph-vc90-mt-1_54.lib
|
||||
optimized boost_program_options-vc90-mt-1_54.lib
|
||||
optimized boost_regex-vc90-mt-1_54.lib
|
||||
optimized boost_signals-vc90-mt-1_54.lib
|
||||
optimized boost_thread-vc90-mt-1_54.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc90-mt-gd-1_54.lib
|
||||
debug boost_system-vc90-mt-gd-1_54.lib
|
||||
debug boost_graph-vc90-mt-gd-1_54.lib
|
||||
debug boost_program_options-vc90-mt-gd-1_54.lib
|
||||
debug boost_regex-vc90-mt-gd-1_54.lib
|
||||
debug boost_signals-vc90-mt-gd-1_54.lib
|
||||
debug boost_thread-vc90-mt-gd-1_54.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib-1.2.3)
|
||||
set(ZLIB_LIBRARIES zdll.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
set(SMESH_LIBRARIES
|
||||
StdMeshers.lib
|
||||
MEFISTO2.lib
|
||||
SMESH.lib
|
||||
DriverUNV.lib
|
||||
SMESHDS.lib
|
||||
DriverSTL.lib
|
||||
DriverDAT.lib
|
||||
Driver.lib
|
||||
SMDS.lib
|
||||
)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
find_path(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
${FREECAD_LIBPACK_DIR}/include/Coin-2.4.5
|
||||
)
|
||||
find_path(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
${FREECAD_LIBPACK_DIR}/include/Coin-4.0.0
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin2
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin2d
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin4
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin4d
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtCore
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/Qt3Support
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib
|
||||
debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY_DEBUG
|
||||
debug Qt3Supportd4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY
|
||||
optimized Qt3Support4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
set(QT_HELPCOMPILER_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qhelpgenerator.exe)
|
||||
set(QT_COLLECTIOMGENERATOR_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qcollectiongenerator.exe)
|
||||
|
||||
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/SoQt-1.6.0)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV_LIBRARIES cv.lib cvaux.lib cxcore.lib cxts.lib highgui.lib)
|
||||
set(OPENCV_FOUND TRUE)
|
||||
|
||||
# NGLIB (NetGen)
|
||||
|
||||
set(NGLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/nglib/include)
|
||||
set(NGLIB_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(NGLIB_LIBRARIES
|
||||
optimized nglib
|
||||
)
|
||||
set(NGLIB_DEBUG_LIBRARIES
|
||||
debug nglibd
|
||||
)
|
||||
|
||||
# OCC
|
||||
#set(OCC_INCLUDE_DIR C:/Projects/LibPack/oce-0.10.0/include/oce)
|
||||
#set(OCC_LIBRARY_DIR C:/Projects/LibPack/oce-0.10.0/Win64/lib)
|
||||
#set(OCC_LIBRARIES
|
||||
# ${OCC_LIBRARY_DIR}/TKFillet.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKMesh.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKernel.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKG2d.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKG3d.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKMath.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKIGES.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTL.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKShHealing.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXSBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBool.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBO.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBRep.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKTopAlgo.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKGeomAlgo.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKGeomBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKOffset.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKPrim.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEP.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEPBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEPAttr.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKHLR.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKFeat.lib
|
||||
#)
|
||||
#set(OCC_OCAF_LIBRARIES
|
||||
# ${OCC_LIBRARY_DIR}/TKCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKLCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXDESTEP.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXDEIGES.lib
|
||||
#)
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/oce-0.13)
|
||||
set(OCC_LIBRARY_DIR ${FREECAD_LIBPACK_DIR}/lib)
|
||||
set(OCC_LIBRARIES
|
||||
optimized TKFillet
|
||||
optimized TKMesh
|
||||
optimized TKernel
|
||||
optimized TKG2d
|
||||
optimized TKG3d
|
||||
optimized TKMath
|
||||
optimized TKIGES
|
||||
optimized TKSTL
|
||||
optimized TKShHealing
|
||||
optimized TKXSBase
|
||||
optimized TKBool
|
||||
optimized TKBO
|
||||
optimized TKBRep
|
||||
optimized TKTopAlgo
|
||||
optimized TKGeomAlgo
|
||||
optimized TKGeomBase
|
||||
optimized TKOffset
|
||||
optimized TKPrim
|
||||
optimized TKSTEP
|
||||
optimized TKSTEPBase
|
||||
optimized TKSTEPAttr
|
||||
optimized TKHLR
|
||||
optimized TKFeat
|
||||
)
|
||||
set(OCC_DEBUG_LIBRARIES
|
||||
debug TKFilletd
|
||||
debug TKMeshd
|
||||
debug TKerneld
|
||||
debug TKG2dd
|
||||
debug TKG3dd
|
||||
debug TKMathd
|
||||
debug TKIGESd
|
||||
debug TKSTLd
|
||||
debug TKShHealingd
|
||||
debug TKXSBased
|
||||
debug TKBoold
|
||||
debug TKBOd
|
||||
debug TKBRepd
|
||||
debug TKTopAlgod
|
||||
debug TKGeomAlgod
|
||||
debug TKGeomBased
|
||||
debug TKOffsetd
|
||||
debug TKPrimd
|
||||
debug TKSTEPd
|
||||
debug TKSTEPBased
|
||||
debug TKSTEPAttrd
|
||||
debug TKHLRd
|
||||
debug TKFeatd
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
optimized TKCAF
|
||||
optimized TKXCAF
|
||||
optimized TKLCAF
|
||||
optimized TKXDESTEP
|
||||
optimized TKXDEIGES
|
||||
optimized TKMeshVS
|
||||
optimized TKAdvTools
|
||||
)
|
||||
set(OCC_OCAF_DEBUG_LIBRARIES
|
||||
debug TKCAFd
|
||||
debug TKXCAFd
|
||||
debug TKLCAFd
|
||||
debug TKXDESTEPd
|
||||
debug TKXDEIGESd
|
||||
debug TKMeshVSd
|
||||
debug TKAdvToolsd
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
|
||||
set(EIGEN2_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen2)
|
||||
set(EIGEN2_FOUND TRUE)
|
||||
|
||||
set(EIGEN3_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen3)
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
|
||||
set(ODE_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/ode-0.11.1)
|
||||
set(ODE_LIBRARIES ${FREECAD_LIBPACK_DIR}/lib/ode_double.lib)
|
||||
set(ODE_FOUND TRUE)
|
||||
|
||||
# FreeType
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
set(FREETYPE_LIBRARIES
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/freetype.lib
|
||||
debug ${FREECAD_LIBPACK_DIR}/lib/freetyped.lib
|
||||
)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${FREECAD_LIBPACK_DIR}/include/FreeType-2.4.12
|
||||
)
|
||||
set(FREETYPE_VERSION_STRING
|
||||
"2.4.12"
|
||||
)
|
||||
set(FREETYPE_FOUND
|
||||
TRUE
|
||||
)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
|
||||
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||
# SHIBOKEN_BINARY - Executable name
|
||||
|
||||
SET(SHIBOKEN_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/shiboken-1.2.1)
|
||||
SET(SHIBOKEN_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.7.lib debug ${FREECAD_LIBPACK_DIR}/lib/shiboken-python2.7_d.lib)
|
||||
set(SHIBOKEN_BINARY ${FREECAD_LIBPACK_DIR}/bin/shiboken)
|
||||
|
||||
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide
|
||||
# PYSIDE_LIBRARY - Files to link against to use PySide
|
||||
# PYSIDE_PYTHONPATH - Path to where the PySide Python module files could be found
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
|
||||
|
||||
SET(PYSIDE_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/PySide-1.2.1)
|
||||
SET(PYSIDE_LIBRARY optimized ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.7.lib debug ${FREECAD_LIBPACK_DIR}/lib/pyside-python2.7_d.lib)
|
||||
SET(PYSIDE_PYTHONPATH ${FREECAD_LIBPACK_DIR}/pyside/Lib/site-packages)
|
||||
SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems)
|
||||
SET(PYSIDE_BIN_DIR ${FREECAD_LIBPACK_DIR}/pyside-tools/bin)
|
||||
|
||||
# Pointscloud library
|
||||
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.6)
|
||||
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)
|
||||
|
||||
set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
|
||||
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
|
||||
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
|
||||
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
|
||||
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
|
||||
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
|
||||
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
|
||||
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
|
||||
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
|
||||
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
|
||||
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
|
||||
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
|
||||
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
|
||||
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)
|
||||
|
||||
set(PCL_LIBRARIES
|
||||
${PCL_COMMON_LIBRARIES}
|
||||
${PCL_FEATURES_LIBRARIES}
|
||||
${PCL_FILTERS_LIBRARIES}
|
||||
${PCL_IO_LIBRARIES}
|
||||
${PCL_IO_PLY_LIBRARIES}
|
||||
${PCL_KDTREE_LIBRARIES}
|
||||
${PCL_KEYPOINTS_LIBRARIES}
|
||||
${PCL_OCTREE_LIBRARIES}
|
||||
${PCL_REGISTRATION_LIBRARIES}
|
||||
${PCL_SAMPLE_CONSENSUS_LIBRARIES}
|
||||
${PCL_SEARCH_LIBRARIES}
|
||||
${PCL_SEGMENTATION_LIBRARIES}
|
||||
${PCL_SURFACE_LIBRARIES}
|
||||
${PCL_TRACKING_LIBRARIES}
|
||||
)
|
||||
set(PCL_FOUND TRUE)
|
||||
set(PCL_COMMON_FOUND TRUE)
|
||||
set(PCL_FEATURES_FOUND TRUE)
|
||||
set(PCL_FILTERS_FOUND TRUE)
|
||||
set(PCL_IO_FOUND TRUE)
|
||||
set(PCL_IO_PLY_FOUND TRUE)
|
||||
set(PCL_KDTREE_FOUND TRUE)
|
||||
set(PCL_KEYPOINTS_FOUND TRUE)
|
||||
set(PCL_OCTREE_FOUND TRUE)
|
||||
set(PCL_REGISTRATION_FOUND TRUE)
|
||||
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
|
||||
set(PCL_SEARCH_FOUND TRUE)
|
||||
set(PCL_SEGMENTATION_FOUND TRUE)
|
||||
set(PCL_SURFACE_FOUND TRUE)
|
||||
set(PCL_TRACKING_FOUND TRUE)
|
||||
|
||||
set(FLANN_LIBRARIES optimized flann debug flann)
|
||||
set(FLANN_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/flann-1.7.1)
|
||||
@@ -7,49 +7,17 @@ set(OCE_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake CACHE PATH "" FORCE)
|
||||
|
||||
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/swig/swig.exe CACHE FILEPATH "Swig" FORCE)
|
||||
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe CACHE FILEPATH "" FORCE)
|
||||
set(PYTHON_LIBRARY ${FREECAD_LIBPACK_DIR}/lib/python27.lib CACHE FILEPATH "" FORCE)
|
||||
set(PYTHON_DEBUG_LIBRARY ${FREECAD_LIBPACK_DIR}/lib/python27_d.lib CACHE FILEPATH "" FORCE)
|
||||
set(PYTHON_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/python2.7 CACHE PATH "" FORCE)
|
||||
|
||||
# Set paths to cmake config files for each Qt module
|
||||
set(Qt5_ROOT_DIR ${FREECAD_LIBPACK_DIR} CACHE PATH "")
|
||||
|
||||
set (Qt5_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5 CACHE PATH "")
|
||||
set (Qt5AxBase_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxBase CACHE PATH "")
|
||||
set (Qt5AxContainer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxContainer CACHE PATH "")
|
||||
set (Qt5AxServer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxServer CACHE PATH "")
|
||||
set (Qt5Concurrent_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Concurrent CACHE PATH "")
|
||||
set (Qt5Core_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Core CACHE PATH "")
|
||||
set (Qt5DBus_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5DBus CACHE PATH "")
|
||||
set (Qt5Designer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Designer CACHE PATH "")
|
||||
set (Qt5Gui_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Gui CACHE PATH "")
|
||||
set (Qt5Help_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Help CACHE PATH "")
|
||||
set (Qt5LinguistTools_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5LinguistTools CACHE PATH "")
|
||||
set (Qt5Multimedia_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Multimedia CACHE PATH "")
|
||||
set (Qt5MultimediaWidgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5MultimediaWidgets CACHE PATH "")
|
||||
set (Qt5Network_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Network CACHE PATH "")
|
||||
set (Qt5OpenGL_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5OpenGL CACHE PATH "")
|
||||
set (Qt5OpenGLExtensions_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5OpenGLExtensions CACHE PATH "")
|
||||
set (Qt5PrintSupport_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5PrintSupport CACHE PATH "")
|
||||
set (Qt5Qml_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Qml CACHE PATH "")
|
||||
set (Qt5Quick_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Quick CACHE PATH "")
|
||||
set (Qt5QuickTest_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5QuickTest CACHE PATH "")
|
||||
set (Qt5QuickWidgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5QuickWidgets CACHE PATH "")
|
||||
set (Qt5Sql_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Sql CACHE PATH "")
|
||||
set (Qt5Svg_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Svg CACHE PATH "")
|
||||
set (Qt5Test_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Test CACHE PATH "")
|
||||
set (Qt5UiPlugin_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiPlugin CACHE PATH "")
|
||||
set (Qt5UiTools_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiTools CACHE PATH "")
|
||||
set (Qt5Widgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Widgets CACHE PATH "")
|
||||
set (Qt5Xml_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Xml CACHE PATH "")
|
||||
set (Qt5XmlPatterns_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5XmlPatterns CACHE PATH "")
|
||||
|
||||
find_library(XercesC_LIBRARY_RELEASE xerces-c_3 "${FREECAD_LIBPACK_DIR}/lib")
|
||||
find_library(XercesC_LIBRARY_DEBUG xerces-c_3D "${FREECAD_LIBPACK_DIR}/lib")
|
||||
set (XercesC_LIBRARIES debug ${XercesC_LIBRARY_DEBUG} optimized ${XercesC_LIBRARY_RELEASE})
|
||||
set(XercesC_FOUND TRUE)
|
||||
find_library(XERCESC_LIBRARIES xerces-c_3 "${FREECAD_LIBPACK_DIR}/lib")
|
||||
find_library(XERCESC_DEBUG_LIBRARIES xerces-c_3D "${FREECAD_LIBPACK_DIR}/lib")
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin4 "${FREECAD_LIBPACK_DIR}/lib")
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin4d "${FREECAD_LIBPACK_DIR}/lib")
|
||||
set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
set(NETGENDATA ${FREECAD_LIBPACK_DIR}/include/netgen)
|
||||
@@ -59,3 +27,61 @@ if(FREECAD_USE_FREETYPE)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7)
|
||||
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)
|
||||
|
||||
set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
|
||||
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
|
||||
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
|
||||
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
|
||||
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
|
||||
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
|
||||
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
|
||||
set(PCL_ML_LIBRARIES optimized pcl_ml_release debug pcl_ml_debug)
|
||||
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
|
||||
set(PCL_RECOGNITION_LIBRARIES optimized pcl_recognition_release debug pcl_recognition_debug)
|
||||
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
|
||||
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
|
||||
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
|
||||
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
|
||||
set(PCL_STEREO_LIBRARIES optimized pcl_stereo_release debug pcl_stereo_debug)
|
||||
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
|
||||
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)
|
||||
|
||||
set(PCL_LIBRARIES
|
||||
${PCL_COMMON_LIBRARIES}
|
||||
${PCL_FEATURES_LIBRARIES}
|
||||
${PCL_FILTERS_LIBRARIES}
|
||||
${PCL_IO_LIBRARIES}
|
||||
${PCL_IO_PLY_LIBRARIES}
|
||||
${PCL_KDTREE_LIBRARIES}
|
||||
${PCL_KEYPOINTS_LIBRARIES}
|
||||
${PCL_ML_LIBRARIES}
|
||||
${PCL_OCTREE_LIBRARIES}
|
||||
${PCL_RECOGNITION_LIBRARIES}
|
||||
${PCL_REGISTRATION_LIBRARIES}
|
||||
${PCL_SAMPLE_CONSENSUS_LIBRARIES}
|
||||
${PCL_SEARCH_LIBRARIES}
|
||||
${PCL_SEGMENTATION_LIBRARIES}
|
||||
${PCL_STEREO_LIBRARIES}
|
||||
${PCL_SURFACE_LIBRARIES}
|
||||
${PCL_TRACKING_LIBRARIES}
|
||||
)
|
||||
set(PCL_FOUND TRUE)
|
||||
set(PCL_COMMON_FOUND TRUE)
|
||||
set(PCL_FEATURES_FOUND TRUE)
|
||||
set(PCL_FILTERS_FOUND TRUE)
|
||||
set(PCL_IO_FOUND TRUE)
|
||||
set(PCL_IO_PLY_FOUND TRUE)
|
||||
set(PCL_KDTREE_FOUND TRUE)
|
||||
set(PCL_KEYPOINTS_FOUND TRUE)
|
||||
set(PCL_ML_FOUND TRUE)
|
||||
set(PCL_OCTREE_FOUND TRUE)
|
||||
set(PCL_RECOGNITION_FOUND TRUE)
|
||||
set(PCL_REGISTRATION_FOUND TRUE)
|
||||
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
|
||||
set(PCL_SEARCH_FOUND TRUE)
|
||||
set(PCL_SEGMENTATION_FOUND TRUE)
|
||||
set(PCL_STEREO_FOUND TRUE)
|
||||
set(PCL_SURFACE_FOUND TRUE)
|
||||
set(PCL_TRACKING_FOUND TRUE)
|
||||
|
||||
@@ -0,0 +1,420 @@
|
||||
# ================================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ============
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# General includes
|
||||
|
||||
link_directories(${FREECAD_LIBPACK_DIR}/lib)
|
||||
include_directories(${FREECAD_LIBPACK_DIR}/include)
|
||||
|
||||
# OpenGL
|
||||
set(OPENGL_gl_LIBRARY opengl32 glu32)
|
||||
|
||||
# Python
|
||||
set(PYTHON_DEBUG_LIBRARY python26_d.lib)
|
||||
set(PYTHON_LIBRARY python26.lib)
|
||||
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.6.4)
|
||||
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
|
||||
set(PYTHONLIBS_FOUND TRUE)
|
||||
|
||||
# XercesC
|
||||
set(XERCESC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/xerces-c-3.1.0)
|
||||
set(XERCESC_LIBRARIES xerces-c_3.lib)
|
||||
set(XERCESC_DEBUG_LIBRARIES xerces-c_3D.lib)
|
||||
set(XERCESC_FOUND TRUE)
|
||||
|
||||
# Boost
|
||||
set(Boost_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/boost-1_41)
|
||||
set(Boost_LIBRARIES
|
||||
optimized boost_filesystem-vc90-mt-1_41.lib
|
||||
optimized boost_system-vc90-mt-1_41.lib
|
||||
optimized boost_graph-vc90-mt-1_41.lib
|
||||
optimized boost_program_options-vc90-mt-1_41.lib
|
||||
optimized boost_regex-vc90-mt-1_41.lib
|
||||
optimized boost_signals-vc90-mt-1_41.lib
|
||||
optimized boost_thread-vc90-mt-1_41.lib
|
||||
)
|
||||
set(Boost_DEBUG_LIBRARIES
|
||||
debug boost_filesystem-vc90-mt-gd-1_41.lib
|
||||
debug boost_system-vc90-mt-gd-1_41.lib
|
||||
debug boost_graph-vc90-mt-gd-1_41.lib
|
||||
debug boost_program_options-vc90-mt-gd-1_41.lib
|
||||
debug boost_regex-vc90-mt-gd-1_41.lib
|
||||
debug boost_signals-vc90-mt-gd-1_41.lib
|
||||
debug boost_thread-vc90-mt-gd-1_41.lib
|
||||
)
|
||||
set(Boost_FOUND TRUE)
|
||||
|
||||
# Zlib
|
||||
set(ZLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/zlib-1.2.3)
|
||||
set(ZLIB_LIBRARIES zdll.lib)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
|
||||
# SMESH
|
||||
set(SMESH_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/smesh)
|
||||
set(SMESH_LIBRARIES
|
||||
StdMeshers.lib
|
||||
MEFISTO2.lib
|
||||
SMESH.lib
|
||||
DriverUNV.lib
|
||||
SMESHDS.lib
|
||||
DriverSTL.lib
|
||||
DriverDAT.lib
|
||||
Driver.lib
|
||||
SMDS.lib
|
||||
)
|
||||
|
||||
set(SMESH_FOUND TRUE)
|
||||
|
||||
# Coin3D
|
||||
find_path(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
${FREECAD_LIBPACK_DIR}/include/Coin-2.4.5
|
||||
)
|
||||
find_path(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
${FREECAD_LIBPACK_DIR}/include/Coin-3.1.3
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin2
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin2d
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_RELEASE coin3
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
find_library(COIN3D_LIBRARY_DEBUG coin3d
|
||||
"${FREECAD_LIBPACK_DIR}/lib"
|
||||
)
|
||||
|
||||
set(COIN3D_FOUND TRUE)
|
||||
|
||||
|
||||
# QT
|
||||
set(QT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/Qt
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtCore
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtGui
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtDesigner
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtSvg
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtNetwork
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtSql
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtTest
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtUiTools
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtXml
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtOpenGl
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtWebKit
|
||||
)
|
||||
|
||||
set(QT_QTCORE_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/QtCore
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_INCLUDE_DIR
|
||||
${FREECAD_LIBPACK_DIR}/include/Qt-4.5.3/Qt3Support
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
optimized QtCore4.lib
|
||||
optimized QtGui4.lib
|
||||
optimized QtDesigner4.lib
|
||||
optimized QtSvg4.lib
|
||||
optimized QtNetwork4.lib
|
||||
optimized QtSql4.lib
|
||||
optimized QtTest4.lib
|
||||
optimized QtXml4.lib
|
||||
optimized QtOpenGl4.lib
|
||||
optimized QtWebKit4.lib
|
||||
)
|
||||
set(QT_DEBUG_LIBRARIES
|
||||
debug QtCored4.lib
|
||||
debug QtGuid4.lib
|
||||
debug QtDesignerd4.lib
|
||||
debug QtSvgd4.lib
|
||||
debug QtNetworkd4.lib
|
||||
debug QtSqld4.lib
|
||||
debug QtTestd4.lib
|
||||
debug QtXmld4.lib
|
||||
debug QtOpenGld4.lib
|
||||
debug QtWebKitd4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY_DEBUG
|
||||
debug QtCored4.lib
|
||||
)
|
||||
|
||||
set(QT_QTCORE_LIBRARY
|
||||
optimized QtCore4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY_DEBUG
|
||||
debug Qt3Supportd4.lib
|
||||
)
|
||||
|
||||
set(QT_QT3SUPPORT_LIBRARY
|
||||
optimized Qt3Support4.lib
|
||||
)
|
||||
|
||||
set(QT_UIC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/uic.exe)
|
||||
set(QT_MOC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/moc.exe)
|
||||
set(QT_RCC_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/rcc.exe)
|
||||
set(QT_HELPCOMPILER_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qhelpgenerator.exe)
|
||||
set(QT_COLLECTIOMGENERATOR_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/qcollectiongenerator.exe)
|
||||
|
||||
|
||||
|
||||
MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
|
||||
SET(${_qt4_files})
|
||||
SET(${_qt4_options})
|
||||
#SET(_QT4_DOING_OPTIONS FALSE)
|
||||
FOREACH(_currentArg ${ARGN})
|
||||
# IF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# SET(_QT4_DOING_OPTIONS TRUE)
|
||||
# ELSE ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
# IF(_QT4_DOING_OPTIONS)
|
||||
# LIST(APPEND ${_qt4_options} "${_currentArg}")
|
||||
# ELSE(_QT4_DOING_OPTIONS)
|
||||
LIST(APPEND ${_qt4_files} "${_currentArg}")
|
||||
# ENDIF(_QT4_DOING_OPTIONS)
|
||||
# ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
|
||||
ENDFOREACH(_currentArg)
|
||||
ENDMACRO (QT4_EXTRACT_OPTIONS)
|
||||
|
||||
# macro used to create the names of output files preserving relative dirs
|
||||
MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
||||
STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
|
||||
STRING(LENGTH ${infile} _infileLength)
|
||||
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(_infileLength GREATER _binlength)
|
||||
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
|
||||
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
|
||||
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ELSE(_infileLength GREATER _binlength)
|
||||
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
ENDIF(_infileLength GREATER _binlength)
|
||||
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
STRING(REPLACE ".." "__" _outfile ${_outfile})
|
||||
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
|
||||
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
|
||||
FILE(MAKE_DIRECTORY ${outpath})
|
||||
SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||
ENDMACRO (QT4_MAKE_OUTPUT_FILE )
|
||||
|
||||
MACRO (QT4_WRAP_CPP outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
endforeach(it)
|
||||
ENDMACRO (QT4_WRAP_CPP)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
|
||||
include(AddFileDependencies)
|
||||
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
SET(ARGN)
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${moc_options} ${it} -o ${outfile}
|
||||
MAIN_DEPENDENCY ${it}
|
||||
)
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
|
||||
MACRO (QT4_ADD_RESOURCES outfiles )
|
||||
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
|
||||
SET(ARGN)
|
||||
FOREACH (it ${rcc_files})
|
||||
GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||
# parse file for dependencies
|
||||
# all files are absolute paths or relative to the location of the qrc file
|
||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||
SET(_RC_DEPENDS)
|
||||
FOREACH(_RC_FILE ${_RC_FILES})
|
||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||
STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
|
||||
IF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||
ENDIF(NOT _ABS_PATH_INDICATOR)
|
||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||
ENDFOREACH(_RC_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile}
|
||||
DEPENDS ${_RC_DEPENDS})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_ADD_RESOURCES)
|
||||
|
||||
MACRO (QT4_WRAP_UI outfiles )
|
||||
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
|
||||
|
||||
FOREACH (it ${ui_files})
|
||||
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
|
||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${outfile} ${infile}
|
||||
MAIN_DEPENDENCY ${infile})
|
||||
SET(${outfiles} ${${outfiles}} ${outfile})
|
||||
ENDFOREACH (it)
|
||||
ENDMACRO (QT4_WRAP_UI)
|
||||
|
||||
|
||||
set(QT4_FOUND TRUE)
|
||||
|
||||
# SoQt
|
||||
set(SOQT_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/SoQt-1.4.1)
|
||||
set(SOQT_LIBRARY_RELEASE soqt1.lib)
|
||||
set(SOQT_LIBRARY_DEBUG soqt1d.lib)
|
||||
set(SOQT_FOUND TRUE)
|
||||
|
||||
# OpenCV
|
||||
set(OPENCV_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/opencv)
|
||||
set(OPENCV_LIBRARIES cv.lib cvaux.lib cxcore.lib cxts.lib highgui.lib)
|
||||
set(OPENCV_FOUND TRUE)
|
||||
|
||||
# NGLIB (NetGen)
|
||||
|
||||
set(NGLIB_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/nglib/include)
|
||||
set(NGLIB_LIBRARY_DIR
|
||||
${FREECAD_LIBPACK_DIR}/lib
|
||||
)
|
||||
set(NGLIB_LIBRARIES
|
||||
optimized nglib
|
||||
)
|
||||
set(NGLIB_DEBUG_LIBRARIES
|
||||
debug nglibd
|
||||
)
|
||||
|
||||
# OCC
|
||||
#set(OCC_INCLUDE_DIR C:/Projects/LibPack/oce-0.10.0/include/oce)
|
||||
#set(OCC_LIBRARY_DIR C:/Projects/LibPack/oce-0.10.0/Win64/lib)
|
||||
#set(OCC_LIBRARIES
|
||||
# ${OCC_LIBRARY_DIR}/TKFillet.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKMesh.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKernel.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKG2d.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKG3d.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKMath.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKIGES.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTL.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKShHealing.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXSBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBool.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBO.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKBRep.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKTopAlgo.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKGeomAlgo.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKGeomBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKOffset.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKPrim.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEP.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEPBase.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKSTEPAttr.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKHLR.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKFeat.lib
|
||||
#)
|
||||
#set(OCC_OCAF_LIBRARIES
|
||||
# ${OCC_LIBRARY_DIR}/TKCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKLCAF.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXDESTEP.lib
|
||||
# ${OCC_LIBRARY_DIR}/TKXDEIGES.lib
|
||||
#)
|
||||
set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/OpenCascade-6.3.0)
|
||||
set(OCC_LIBRARY_DIR ${FREECAD_LIBPACK_DIR}/lib)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEP
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
TKMeshVS
|
||||
TKAdvTools
|
||||
)
|
||||
set(OCC_FOUND TRUE)
|
||||
|
||||
set(EIGEN2_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen2)
|
||||
set(EIGEN2_FOUND TRUE)
|
||||
|
||||
set(EIGEN3_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/eigen3)
|
||||
set(EIGEN3_FOUND TRUE)
|
||||
|
||||
set(ODE_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/ode-0.11.1)
|
||||
set(ODE_LIBRARIES ${FREECAD_LIBPACK_DIR}/lib/ode_double.lib)
|
||||
set(ODE_FOUND TRUE)
|
||||
|
||||
# FreeType
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
set(FREETYPE_LIBRARIES
|
||||
optimized ${FREECAD_LIBPACK_DIR}/lib/freetype.lib
|
||||
debug ${FREECAD_LIBPACK_DIR}/lib/freetyped.lib
|
||||
)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${FREECAD_LIBPACK_DIR}/include/FreeType-2.4.12
|
||||
)
|
||||
set(FREETYPE_VERSION_STRING
|
||||
"2.4.12"
|
||||
)
|
||||
set(FREETYPE_FOUND
|
||||
TRUE
|
||||
)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
@@ -1,43 +0,0 @@
|
||||
# gitlab CI config file
|
||||
|
||||
# this image is on dockerhub. Dockerfile is here: https://gitlab.com/PrzemoF/FreeCAD/-/blob/gitlab-v1/ci/Dockerfile
|
||||
image: freecadci/runner
|
||||
|
||||
stages: # List of stages for jobs, and their order of execution
|
||||
- build
|
||||
- test
|
||||
|
||||
before_script:
|
||||
- apt-get update -yqq
|
||||
# CCache Config
|
||||
- mkdir -p ccache
|
||||
- export CCACHE_BASEDIR=${PWD}
|
||||
- export CCACHE_DIR=${PWD}/ccache
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- ccache/
|
||||
|
||||
build-job: # This job runs in the build stage, which runs first.
|
||||
stage: build
|
||||
|
||||
script:
|
||||
- echo "Compiling the code..."
|
||||
- mkdir build
|
||||
- cd build
|
||||
- ccache cmake ../
|
||||
- ccache cmake --build ./ -j$(nproc)
|
||||
- echo "Compile complete."
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- build/
|
||||
|
||||
test-job: # This job runs in the test stage.
|
||||
stage: test # It only starts when the job in the build stage completes successfully.
|
||||
script:
|
||||
- echo "Running unit tests... "
|
||||
- cd build/bin/
|
||||
# Testing currently doesn't work due to problems with libraries ot being visible by the binary.
|
||||
- ./FreeCADCmd -t 0
|
||||
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
FROM ubuntu:20.04
|
||||
MAINTAINER Przemo Firszt
|
||||
# This is the docker image definition used to build FreeCAD. It's currently accessible on:
|
||||
# https://hub.docker.com/repository/docker/freecadci/runner
|
||||
# on under name freecadci/runner when using docker
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get update -y && apt-get install -y gnupg2
|
||||
RUN echo "deb http://ppa.launchpad.net/freecad-maintainers/freecad-daily/ubuntu focal main" >> /etc/apt/sources.list.d/freecad-daily.list
|
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 83193AA3B52FF6FCF10A1BBF005EAE8119BB5BCA
|
||||
RUN apt-get update -y
|
||||
|
||||
# those 3 are for debugging purposes only. Not required to build FreeCAD
|
||||
RUN apt-get install -y \
|
||||
vim \
|
||||
nano \
|
||||
bash
|
||||
|
||||
# Main set of FreeCAD dependencies. To be verified.
|
||||
RUN apt-get install -y \
|
||||
ccache \
|
||||
cmake \
|
||||
debhelper \
|
||||
dh-exec \
|
||||
dh-python \
|
||||
doxygen \
|
||||
git \
|
||||
graphviz \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-filesystem1.71-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-program-options1.71-dev \
|
||||
libboost-python1.71-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-regex1.71-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-system1.71-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-thread1.71-dev \
|
||||
libboost1.71-dev \
|
||||
libcoin-dev \
|
||||
libdouble-conversion-dev \
|
||||
libeigen3-dev \
|
||||
libglew-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
liblz4-dev \
|
||||
libmedc-dev \
|
||||
libmetis-dev \
|
||||
libnglib-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5 \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5 \
|
||||
libqt5webkit5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libvtk7.1p \
|
||||
libvtk7.1p-qt \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libzipios++-dev \
|
||||
lsb-release \
|
||||
nastran \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pybind11-dev \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-matplotlib \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyqt5 \
|
||||
python3-pyside2.* \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtuitools \
|
||||
python3-pyside2.qtwidgets \
|
||||
python3-pyside2.qtxml \
|
||||
python3-requests \
|
||||
python3-yaml \
|
||||
qt5-default \
|
||||
qt5-qmake \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
swig
|
||||
|
||||
RUN apt-get update -y --fix-missing
|
||||
|
||||
# Clean
|
||||
RUN apt-get clean \
|
||||
&& rm /var/lib/apt/lists/* \
|
||||
/usr/share/doc/* \
|
||||
/usr/share/locale/* \
|
||||
/usr/share/man/* \
|
||||
/usr/share/info/* -fR
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
if "%FEATURE_DEBUG%"=="1" (
|
||||
set BUILD_TYPE="Debug"
|
||||
echo "#! building debug package !#") else (
|
||||
set BUILD_TYPE="Release")
|
||||
|
||||
|
||||
set "CFLAGS= "
|
||||
set "CXXFLAGS= "
|
||||
set "LDFLAGS_SHARED= ucrt.lib"
|
||||
|
||||
cmake -G "Ninja" ^
|
||||
-D BUID_WITH_CONDA:BOOL=ON ^
|
||||
-D CMAKE_BUILD_TYPE=%BUILD_TYPE% ^
|
||||
-D FREECAD_LIBPACK_USE:BOOL=OFF ^
|
||||
-D CMAKE_INSTALL_PREFIX:FILEPATH=%LIBRARY_PREFIX% ^
|
||||
-D CMAKE_PREFIX_PATH:FILEPATH=%LIBRARY_PREFIX% ^
|
||||
-D CMAKE_INCLUDE_PATH:FILEPATH=%LIBRARY_PREFIX%/include ^
|
||||
-D CMAKE_LIBRARY_PATH:FILEPATH=%LIBRARY_PREFIX%/lib ^
|
||||
-D CMAKE_INSTALL_LIBDIR:FILEPATH=%LIBRARY_PREFIX%/lib ^
|
||||
-D BUILD_QT5:BOOL=ON ^
|
||||
-D NETGENDATA:FILEPATH=%LIBRARY_PREFIX%/include/netgen ^
|
||||
-D NGLIB_INCLUDE_DIR:FILEPATH=%LIBRARY_PREFIX%/include/netgen ^
|
||||
-D BUILD_FEM_NETGEN:BOOL=ON ^
|
||||
-D OCC_INCLUDE_DIR:FILEPATH=%LIBRARY_PREFIX%/include/opencascade ^
|
||||
-D OCC_LIBRARY_DIR:FILEPATH=%LIBRARY_PREFIX%/lib ^
|
||||
-D OCC_LIBRARIES:FILEPATH=%LIBRARY_PREFIX%/lib ^
|
||||
-D FREECAD_USE_OCC_VARIANT="Official Version" ^
|
||||
-D OCC_OCAF_LIBRARIES:FILEPATH=%LIBRARY_PREFIX%/lib ^
|
||||
-D BUILD_REVERSEENGINEERING:BOOL=ON ^
|
||||
-D USE_BOOST_PYTHON:BOOL=OFF ^
|
||||
-D FREECAD_USE_PYBIND11:BOOL=ON ^
|
||||
-D SMESH_INCLUDE_DIR:FILEPATH=%LIBRARY_PREFIX%/include/smesh ^
|
||||
-D FREECAD_USE_EXTERNAL_SMESH:BOOL=ON ^
|
||||
-D BUILD_FLAT_MESH:BOOL=ON ^
|
||||
-D OCCT_CMAKE_FALLBACK:BOOL=ON ^
|
||||
-D PYTHON_EXECUTABLE:FILEPATH=%PREFIX%/python ^
|
||||
-D BUILD_DYNAMIC_LINK_PYTHON:BOOL=ON ^
|
||||
-D Boost_NO_BOOST_CMAKE:BOOL=ON ^
|
||||
-D FREECAD_USE_PCH:BOOL=OFF ^
|
||||
-D FREECAD_USE_PCL:BOOL=ON ^
|
||||
-D INSTALL_TO_SITEPACKAGES:BOOL=ON ^
|
||||
..
|
||||
|
||||
if errorlevel 1 exit 1
|
||||
ninja install
|
||||
if errorlevel 1 exit 1
|
||||
|
||||
rmdir /s /q "%LIBRARY_PREFIX%\doc"
|
||||
ren %LIBRARY_PREFIX%\bin\FreeCAD.exe freecad.exe
|
||||
ren %LIBRARY_PREFIX%\bin\FreeCADCmd.exe freecadcmd.exe
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
HOST=$(uname)
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
if [[ ${FEATURE_DEBUG} = 1 ]]; then
|
||||
BUILD_TYPE="Debug"
|
||||
else
|
||||
BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
declare -a CMAKE_PLATFORM_FLAGS
|
||||
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
echo "adding hacks for linux"
|
||||
# temporary workaround for vtk-cmake setup
|
||||
# should be applied @vtk-feedstock
|
||||
sed -i 's#/home/conda/feedstock_root/build_artifacts/vtk_.*_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib.*;##g' ${PREFIX}/lib/cmake/vtk-8.2/Modules/vtkhdf5.cmake
|
||||
# temporary workaround for qt-cmake:
|
||||
sed -i 's|_qt5gui_find_extra_libs(EGL.*)|_qt5gui_find_extra_libs(EGL "EGL" "" "")|g' $PREFIX/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake
|
||||
sed -i 's|_qt5gui_find_extra_libs(OPENGL.*)|_qt5gui_find_extra_libs(OPENGL "GL" "" "")|g' $PREFIX/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake
|
||||
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_TOOLCHAIN_FILE="${RECIPE_DIR}/cross-linux.cmake")
|
||||
fi
|
||||
|
||||
|
||||
if [[ ${HOST} =~ "Darwin" ]]; then
|
||||
# add hacks for osx here!
|
||||
echo "adding hacks for osx"
|
||||
#ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
|
||||
|
||||
# install space-mouse
|
||||
if [ ! -d "/Library/Frameworks/3DconnexionClient.framework" ]; then
|
||||
echo "Installing 3D connexion spacemouse drivers."
|
||||
curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-6-6_360DF97D-ED08-4ccf-A55E-0BF905E58476/3DxWareMac_v10-6-6_r3234.dmg'
|
||||
hdiutil attach -readonly /tmp/3dFW.dmg
|
||||
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
|
||||
diskutil eject /Volumes/3Dconnexion\ Software
|
||||
fi
|
||||
CMAKE_PLATFORM_FLAGS+=(-DFREECAD_USE_3DCONNEXION:BOOL=ON)
|
||||
CMAKE_PLATFORM_FLAGS+=(-D3DCONNEXIONCLIENT_FRAMEWORK:FILEPATH="/Library/Frameworks/3DconnexionClient.framework")
|
||||
fi
|
||||
|
||||
cmake \
|
||||
-G "Ninja" \
|
||||
-D BUID_WITH_CONDA:BOOL=ON \
|
||||
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-D CMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \
|
||||
-D CMAKE_PREFIX_PATH:FILEPATH=$PREFIX \
|
||||
-D CMAKE_LIBRARY_PATH:FILEPATH=$PREFIX/lib \
|
||||
-D CMAKE_INSTALL_LIBDIR:FILEPATH=$PREFIX/lib \
|
||||
-D CMAKE_INCLUDE_PATH:FILEPATH=$PREFIX/include \
|
||||
-D BUILD_QT5:BOOL=ON \
|
||||
-D FREECAD_USE_OCC_VARIANT="Official Version" \
|
||||
-D OCC_INCLUDE_DIR:FILEPATH=$PREFIX/include \
|
||||
-D USE_BOOST_PYTHON:BOOL=OFF \
|
||||
-D FREECAD_USE_PYBIND11:BOOL=ON \
|
||||
-D BUILD_ENABLE_CXX11:BOOL=ON \
|
||||
-D SMESH_INCLUDE_DIR:FILEPATH=$PREFIX/include/smesh \
|
||||
-D FREECAD_USE_EXTERNAL_SMESH=ON \
|
||||
-D BUILD_FLAT_MESH:BOOL=ON \
|
||||
-D BUILD_WITH_CONDA:BOOL=ON \
|
||||
-D PYTHON_EXECUTABLE:FILEPATH=$PREFIX/bin/python \
|
||||
-D BUILD_FEM_NETGEN:BOOL=ON \
|
||||
-D OCCT_CMAKE_FALLBACK:BOOL=OFF \
|
||||
-D FREECAD_USE_QT_DIALOG:BOOL=ON \
|
||||
-D BUILD_DYNAMIC_LINK_PYTHON:BOOL=OFF \
|
||||
-D Boost_NO_BOOST_CMAKE:BOOL=ON \
|
||||
-D FREECAD_USE_PCL:BOOL=ON \
|
||||
-D INSTALL_TO_SITEPACKAGES:BOOL=ON \
|
||||
${CMAKE_PLATFORM_FLAGS[@]} \
|
||||
..
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "CMake failed to configure."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "FREECAD_USE_3DCONNEXION=${FREECAD_USE_3DCONNEXION}"
|
||||
|
||||
ninja install
|
||||
rm -r ${PREFIX}/share/doc/FreeCAD # smaller size of package!
|
||||
mv ${PREFIX}/bin/FreeCAD ${PREFIX}/bin/freecad
|
||||
mv ${PREFIX}/bin/FreeCADCmd ${PREFIX}/bin/freecadcmd
|
||||
@@ -1,6 +0,0 @@
|
||||
channel_sources:
|
||||
- conda-forge,defaults
|
||||
channel_targets:
|
||||
- freecad dev
|
||||
MACOSX_DEPLOYMENT_TARGET: # [osx]
|
||||
- '10.12' # [osx]
|
||||
@@ -1,16 +0,0 @@
|
||||
# this one is important
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_PLATFORM Linux)
|
||||
|
||||
# specify the cross compiler
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH $ENV{PREFIX} $ENV{BUILD_PREFIX}/$ENV{HOST}/sysroot)
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
{% set name = "freecad" %}
|
||||
{% set version = "0.19.pre" %}
|
||||
{% set build_number = 142 %}
|
||||
{% set build_number = build_number + 500 %} # [FEATURE_DEBUG]
|
||||
|
||||
package:
|
||||
name: {{ name }}
|
||||
version: {{ version }}
|
||||
|
||||
source:
|
||||
# JZ - For local building this is the setup.
|
||||
path: ../
|
||||
#git_url: https://github.com/FreeCAD/FreeCAD
|
||||
#git_tag: master
|
||||
patches:
|
||||
- windows_python_interface.patch
|
||||
|
||||
|
||||
build:
|
||||
number: {{ build_number }}
|
||||
skip: true # [py < 38]
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler("cxx") }}
|
||||
- {{ cdt('mesa-libgl-devel') }} # [linux]
|
||||
- {{ cdt('mesa-dri-drivers') }} # [linux]
|
||||
- {{ cdt('mesa-libegl-devel') }} # [linux]
|
||||
- {{ cdt('libselinux') }} # [linux]
|
||||
- {{ cdt('libxdamage') }} # [linux]
|
||||
- {{ cdt('libxfixes') }} # [linux]
|
||||
- {{ cdt('libxxf86vm') }} # [linux]
|
||||
- {{ cdt('libxcb') }} # [linux]
|
||||
- {{ cdt('libxext') }} # [linux]
|
||||
- {{ cdt('xorg-x11-server-xvfb') }} # [linux]
|
||||
- {{ cdt('libxau') }} # [linux]
|
||||
- {{ cdt('libxi-devel') }} # [linux]
|
||||
- cmake
|
||||
- ninja
|
||||
- git
|
||||
host:
|
||||
- boost-cpp
|
||||
- python
|
||||
- qt
|
||||
- occt
|
||||
- xerces-c
|
||||
- zlib
|
||||
- vtk
|
||||
- swig
|
||||
- eigen
|
||||
- pybind11
|
||||
- coin3d
|
||||
- pivy
|
||||
- pyside2
|
||||
- smesh
|
||||
- netgen 6.2.1808*
|
||||
- doxygen
|
||||
- hdf5
|
||||
- xorg-libxt # [linux]
|
||||
- freetype
|
||||
- libspnav # [linux]
|
||||
- pcl
|
||||
- six
|
||||
- ply
|
||||
- tbb-devel
|
||||
run:
|
||||
- {{ pin_compatible("pyside2") }}
|
||||
- vtk
|
||||
- occt
|
||||
- qt
|
||||
- xerces-c
|
||||
- zlib
|
||||
- boost-cpp
|
||||
- hdf5
|
||||
- python
|
||||
- coin3d
|
||||
- pivy
|
||||
- smesh
|
||||
- netgen 6.2.1808*
|
||||
- xorg-libxt # [linux]
|
||||
- freetype
|
||||
- numpy
|
||||
- six
|
||||
- pyyaml
|
||||
- libspnav # [linux]
|
||||
- pcl
|
||||
- ply
|
||||
run_constrained:
|
||||
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx]
|
||||
|
||||
#test:
|
||||
# commands:
|
||||
# - FreeCADCmd -t 0
|
||||
|
||||
about:
|
||||
home: https://www.freecadweb.org/
|
||||
license: LGPL2.1
|
||||
license_family: LGPL
|
||||
license_file: LICENSE
|
||||
summary: 'FreeCAD is a parametric 3D modeler made primarily to design real-life objects of any size. '
|
||||
description: |
|
||||
FreeCAD is a general purpose feature-based, parametric 3D modeler for
|
||||
CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering
|
||||
and product design but also fits a wider range of uses in engineering,
|
||||
such as architecture or other engineering specialities. It is 100% Open
|
||||
Source (LGPL2+ license) and extremely modular, allowing for very
|
||||
advanced extension and customization.
|
||||
FreeCAD is based on OpenCASCADE, a powerful geometry kernel, features an
|
||||
Open Inventor-compliant 3D scene representation model provided by the
|
||||
Coin 3D library, and a broad Python API. The interface is built with Qt.
|
||||
FreeCAD runs exactly the same way on Windows, Mac OSX, BSD and Linux
|
||||
platforms.
|
||||
doc_url: https://www.freecadweb.org/wiki/Main_Page
|
||||
dev_url: https://github.com/FreeCAD/FreeCAD
|
||||
|
||||
extra:
|
||||
recipe-maintainers:
|
||||
- looooo
|
||||
@@ -1,31 +0,0 @@
|
||||
diff --git a/src/Ext/freecad/CMakeLists.txt b/src/Ext/freecad/CMakeLists.txt
|
||||
index e03b5527e..d9004275b 100644
|
||||
--- a/src/Ext/freecad/CMakeLists.txt
|
||||
+++ b/src/Ext/freecad/CMakeLists.txt
|
||||
@@ -5,7 +5,9 @@ SET(PYTHON_MAIN_DIR ${python_libs})
|
||||
|
||||
set(NAMESPACE_INIT "${CMAKE_BINARY_DIR}/Ext/freecad/__init__.py")
|
||||
if (WIN32)
|
||||
- set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
+ get_filename_component(FREECAD_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}"
|
||||
+ REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
+ set( ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
diff --git a/src/Ext/freecad/__init__.py.template b/src/Ext/freecad/__init__.py.template
|
||||
index 68ca151a5..d5360b252 100644
|
||||
--- a/src/Ext/freecad/__init__.py.template
|
||||
+++ b/src/Ext/freecad/__init__.py.template
|
||||
@@ -12,9 +12,9 @@ except ModuleNotFoundError:
|
||||
except KeyError:
|
||||
|
||||
# 2. we use the default freecad defined for this package
|
||||
- _path_to_freecad_libdir = "${CMAKE_INSTALL_LIBDIR}"
|
||||
+ _path_to_freecad_libdir = "${FREECAD_LIBRARY_INSTALL_DIR}"
|
||||
print("PATH_TO_FREECAD_LIBDIR not specified, using default \
|
||||
-FreeCAD version in {}".format( "${FREECAD_LIBRARY_INSTALL_DIR}"))
|
||||
+FreeCAD version in {}".format("${FREECAD_LIBRARY_INSTALL_DIR}"))
|
||||
|
||||
_sys.path.append(_path_to_freecad_libdir) # this is the default version
|
||||
import FreeCAD as app
|
||||
@@ -1,6 +0,0 @@
|
||||
mesa-libGL
|
||||
mesa-dri-drivers
|
||||
libselinux
|
||||
libXdamage
|
||||
libXxf86vm
|
||||
libXext-devel
|
||||
@@ -114,9 +114,6 @@
|
||||
/* Define to 1 if you have the <values.h> header file. */
|
||||
#cmakedefine HAVE_VALUES_H
|
||||
|
||||
/* Define to 1 if you have a C runtime with backtrace symbols. */
|
||||
#cmakedefine HAVE_BACKTRACE_SYMBOLS
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "FreeCAD"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user