Compare commits

..

53 Commits

Author SHA1 Message Date
wmayer 980bf9060e pre-select name filter in import/export file dialog 2019-10-22 18:53:35 +02:00
wandererfan f972b010bb [TD]Fix slow GC of QGIPrimPath 2019-10-15 19:43:51 -04:00
sliptonic 5a1527f954 Merge pull request #2489 from Jantek/patch-1
[Path] Correction of drill speed calculation for grbl_G1 of 18.3
2019-10-07 16:02:43 -05:00
Syres916 dea7d2080b [Spreadsheet] Excel File Import fix Py3 bug
Please see discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=39653
2019-09-28 12:18:33 +02:00
sliptonic a4a42b36e4 Merge pull request #2541 from Syres916/patch-4
[Path] Fix xrange bug with Py3
2019-09-24 15:36:52 -05:00
Syres916 7fa0eea88a Fix xrange bug in PathSurface.py 2019-09-20 15:28:57 +01:00
Syres916 2b28c50525 Fix xrange bug in PathCircularHoleBaseGui.py 2019-09-20 15:22:29 +01:00
wmayer 31d9283325 fix print preview function for >= Qt 5.9 2019-09-07 13:23:39 +02:00
luz.paz f07b6e3e17 Follow-up: Fixed thumbnail for problematic FEM example file
This updated FEM example has the thumbnail updated  to remove the artifacts present in the previous commit.
2019-09-06 07:38:54 -04:00
sliptonic 38e0e99579 Merge pull request #2490 from Jantek/patch-2
[Path] Fixed problems with 'pythonopen' in grbl_G81 of release 18.3
2019-09-05 17:00:29 -05:00
luz.paz 2483c467bb Backport: startwb files restored in 0.18.3 to display thumbs correctly
0.18.x displays the example files within in the Start WB without their respective thumbs. This PR restores that functionality:  Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=39038  

Props to kisolre  to the assistance :)
2019-09-04 17:22:35 -04:00
Jan Phillip Willmann d9b8faf8bf Fixed problems with 'pythonopen' 2019-09-04 10:21:15 +02:00
Jan Phillip Willmann 102b97aca7 Correction of drill speed calculation
The multiplier was missing, so the calculated drill speed was to low.
2019-09-04 10:08:49 +02:00
Bernd Hahnebach 1e9f9faa24 Material: py2 fix in depreciated mat file parser (back port from 0.19) 2019-08-26 08:31:49 +02:00
wandererfan 7320c4c448 [TD]Fix #4017 Crash on bad hatch scale 2019-07-20 11:14:23 -04:00
Yorik van Havre 3129ae4296 AddonManager: Skip non-github addons 2019-07-12 18:08:08 -03:00
Abdullah Tahiri 0572853dbd Sketcher: Fix Carbon copy leads to unsolvable sketch
====================================================

fixes #3973

https://forum.freecadweb.org/viewtopic.php?p=316251#p316198

This commit disables an old "axis orientation correction mode", which tried to
solve a problem with orientation of the axis. It never worked fine and it should
have never been introduced, as everything it intends to do should be done by
setting the appropriate placement offset.
2019-06-28 10:49:05 +02:00
Abdullah Tahiri 2f0c3a79fa Sketcher: Fix carbon copy construction points
=============================================

fixes #3926

Points made of construction type are special non-constrainable points, such as (current) bspline knots.

This was not intended in Carbon Copy.
2019-06-28 10:48:56 +02:00
wmayer 0f29891a98 fixes #0003993: Memory leak with Python3 2019-06-24 14:32:42 +02:00
wmayer 3eaf87b2dc code simplification in PythonWrapper 2019-06-22 14:38:49 +02:00
wmayer 60fd668d5c issue #0003984: Creating a Path Job object fails with 'PySide2.QtWidgets.QDialog' object has no attribute 'templateGroup' 2019-06-22 14:38:20 +02:00
Russell Johnson 4351058504 Fixes bug #4008: removes phantom path cause
Job object was base of transformations, rather than Job base(clone).
2019-06-22 14:34:51 +02:00
wmayer f2f4b44792 Fix crash in case encoding of Python paths fails 2019-06-21 16:33:18 +02:00
luz.paz 90ff921ef7 [Material] Respect unicode filenames
Fixes #4027
2019-06-21 16:27:41 +02:00
Zheng, Lei 662aebd881 BrowserView: fix QWebEngine crash 2019-06-21 16:27:12 +02:00
wmayer d2f0c4f33d Py3: no __builtin__ module available 2019-06-17 17:11:14 +02:00
wmayer b80d000aff fixes 0004010: Box Selection + Part -> MakeCompound will crash FreeCAD 2019-06-12 11:26:21 +02:00
Bernd Hahnebach 627ae70a53 FEM: solver elmer tasks, Py3 decode fix 2019-06-11 15:49:12 +02:00
wmayer a261a55adf make OpenSCAD utilities working again with Py2 2019-06-07 13:09:41 +02:00
wmayer dbb4cc6415 replace insecure use of eval() with proper use of units 2019-05-11 13:02:55 +02:00
wmayer e25cd6c71b py3/py2: use exec as function 2019-05-10 19:26:12 +02:00
Yorik van Havre 1fb7ed43cf Arch: Fixed error in roof - Fixes #3864 2019-05-07 22:49:19 -03:00
Yorik van Havre ebca0c9836 Draft: Fixed 0.18.1 bug in DXF importer 2019-05-02 16:10:12 -03:00
wmayer 476b4d5f97 Py3 fix: correctly convert a Python str to const char* 2019-04-21 10:15:13 +02:00
wmayer 3450cf9860 Py3: fix reading/writing from/to OBJ file 2019-04-21 10:14:45 +02:00
wmayer 0dc75267fe fixes 0003913: libspnav crash on linux wayland during startup 2019-04-05 17:43:53 +02:00
Bernd Hahnebach f7dccfaa90 FEM: ccx tools, set back the assignment of linux and osx ccx binary path 2019-04-04 15:42:43 +02:00
lorenz 76542ae729 FEM: osx: try to fix default ccx detection 2019-04-04 15:42:24 +02:00
wmayer 55698377f9 fix crash when checking an empty error message of an exception 2019-04-04 15:37:55 +02:00
wmayer f21cbce8cd fix crash when checking an empty error message of an exception 2019-04-04 15:37:40 +02:00
Bernd Hahnebach 9152703516 FEM: Py3 fix in result reader 2019-04-04 15:37:25 +02:00
Peter Eszlari c264c76d8f Linux/appdata: generate release info 2019-04-04 15:37:09 +02:00
sliptonic d8f5560cac Path: per Werner, fixing bug for function removed from string module
in py3
2019-04-04 15:36:53 +02:00
wmayer 442e411cf0 Py3: make string concatenation to work with Py2 and Py3 2019-04-04 15:36:39 +02:00
wmayer 55080952a8 reset expressions of a property when removing it 2019-04-04 15:36:25 +02:00
wmayer f185504b4e in case object deletion fails then make sure to re-enable updates of the main window 2019-04-04 15:36:11 +02:00
wmayer 2bc3daedcc Document::breakDependency should handle exceptions to avoid to leave document in an inconsistent state 2019-04-04 15:35:57 +02:00
Craig Marshall 2cef63f8a3 Fix #2034 with more precision attempt 2 2019-04-04 15:35:43 +02:00
triplus 81a7d937bd Fix for build failure on Ubuntu 16.04 2019-04-04 15:35:12 +02:00
wmayer 64f3424cab fix mouse selection for high DPI screens 2019-04-04 15:33:10 +02:00
wmayer 64cb745ddc fixes 0003130: FreeCAD 0.17 Qt5 bugs with external display 2019-04-04 15:32:54 +02:00
wmayer 228876f8f2 improve drawing of overlay pixmaps for high DPI screens 2019-04-04 15:32:34 +02:00
Yorik van Havre 8ece48c70b Arch: Fixed materials not updating their dicts 2019-03-20 10:01:27 -03:00
9975 changed files with 1335134 additions and 3446913 deletions
-66
View File
@@ -1,66 +0,0 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 100
CompactNamespaces: false
ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReflowComments: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
-490
View File
@@ -1,490 +0,0 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
User: florians
CheckOptions:
- key: readability-suspicious-call-argument.PrefixSimilarAbove
value: '30'
- key: cppcoreguidelines-no-malloc.Reallocations
value: '::realloc'
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
value: '::free;::realloc;::freopen;::fclose'
- key: bugprone-reserved-identifier.Invert
value: 'false'
- key: bugprone-narrowing-conversions.PedanticMode
value: 'false'
- key: bugprone-unused-return-value.CheckedFunctions
value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname'
- key: modernize-use-auto.MinTypeNameLength
value: '5'
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
value: 'false'
- key: readability-inconsistent-declaration-parameter-name.Strict
value: 'false'
- key: readability-suspicious-call-argument.DiceDissimilarBelow
value: '60'
- key: bugprone-assert-side-effect.IgnoredFunctions
value: __builtin_expect
- key: readability-suspicious-call-argument.Equality
value: 'true'
- key: bugprone-easily-swappable-parameters.QualifiersMix
value: 'false'
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
value: 'true'
- key: bugprone-argument-comment.CommentNullPtrs
value: '0'
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'true'
- key: cppcoreguidelines-init-variables.IncludeStyle
value: llvm
- key: modernize-use-nodiscard.ReplacementString
value: '[[nodiscard]]'
- key: modernize-loop-convert.MakeReverseRangeHeader
value: ''
- key: readability-suspicious-call-argument.SuffixSimilarAbove
value: '30'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
value: 'true'
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
value: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS'
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: 'true'
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
value: 'false'
- key: performance-type-promotion-in-math-fn.IncludeStyle
value: llvm
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
value: 'true'
- key: bugprone-suspicious-include.ImplementationFileExtensions
value: 'c;cc;cpp;cxx'
- key: modernize-loop-convert.MakeReverseRangeFunction
value: ''
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
value: 'true'
- key: bugprone-suspicious-missing-comma.SizeThreshold
value: '5'
- key: readability-identifier-naming.IgnoreFailedSplit
value: 'false'
- key: readability-qualified-auto.AddConstToQualified
value: 'true'
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
value: 'true'
- key: bugprone-string-constructor.WarnOnLargeLength
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.OverrideSpelling
value: override
- key: readability-uppercase-literal-suffix.IgnoreMacros
value: 'true'
- key: modernize-make-shared.IgnoreMacros
value: 'true'
- key: bugprone-dynamic-static-initializers.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: bugprone-suspicious-enum-usage.StrictMode
value: 'false'
- key: performance-unnecessary-copy-initialization.AllowedTypes
value: ''
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
value: '5'
- key: modernize-use-transparent-functors.SafeMode
value: 'false'
- key: readability-suspicious-call-argument.Levenshtein
value: 'true'
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
value: 'true'
- key: bugprone-string-constructor.LargeLengthThreshold
value: '8388608'
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: 'false'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues
value: 'false'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: 'false'
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
value: ''
- key: performance-inefficient-vector-operation.EnableProto
value: 'false'
- key: modernize-make-shared.MakeSmartPtrFunction
value: 'std::make_shared'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: readability-suspicious-call-argument.PrefixDissimilarBelow
value: '25'
- key: readability-function-size.LineThreshold
value: '4294967295'
- key: bugprone-easily-swappable-parameters.MinimumLength
value: '2'
- key: portability-simd-intrinsics.Suggest
value: 'false'
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
value: ''
- key: modernize-use-override.IgnoreDestructors
value: 'false'
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
value: '<memory>'
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
value: 'true'
- key: readability-redundant-string-init.StringNames
value: '::std::basic_string_view;::std::basic_string'
- key: modernize-make-unique.IgnoreDefaultInitialization
value: 'true'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: readability-magic-numbers.IgnoreBitFieldsWidths
value: 'true'
- key: modernize-make-unique.IncludeStyle
value: llvm
- key: modernize-use-override.OverrideSpelling
value: override
- key: readability-suspicious-call-argument.LevenshteinDissimilarBelow
value: '50'
- key: bugprone-argument-comment.CommentStringLiterals
value: '0'
- key: concurrency-mt-unsafe.FunctionSet
value: any
- key: readability-identifier-length.IgnoredExceptionVariableNames
value: '^[e]$'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: bugprone-reserved-identifier.AllowedIdentifiers
value: ''
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: 'false'
- key: readability-else-after-return.WarnOnUnfixable
value: 'true'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues
value: '1.0;100.0;'
- key: modernize-use-emplace.IgnoreImplicitConstructors
value: 'false'
- key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
value: 'true'
- key: readability-suspicious-call-argument.Substring
value: 'true'
- key: modernize-use-equals-delete.IgnoreMacros
value: 'true'
- key: readability-identifier-length.IgnoredVariableNames
value: ''
- key: readability-magic-numbers.IgnoreAllFloatingPointValues
value: 'false'
- key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
value: llvm
- key: readability-suspicious-call-argument.Abbreviations
value: 'arr=array;cnt=count;idx=index;src=source;stmt=statement;cpy=copy;dest=destination;dist=distancedst=distance;ptr=pointer;wdth=width;str=string;ln=line;srv=server;attr=attribute;ref=reference;buf=buffer;col=column;nr=number;vec=vector;len=length;elem=element;val=value;i=index;var=variable;hght=height;cl=client;num=number;pos=position;lst=list;addr=address'
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
value: 'false'
- key: readability-uppercase-literal-suffix.NewSuffixes
value: ''
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: performance-unnecessary-value-param.AllowedTypes
value: ''
- key: readability-uniqueptr-delete-release.PreferResetCall
value: 'false'
- key: readability-identifier-length.MinimumExceptionNameLength
value: '2'
- key: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues
value: 'false'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreBitFieldsWidths
value: 'true'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;'
- key: cppcoreguidelines-no-malloc.Allocations
value: '::malloc;::calloc'
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
value: ''
- key: readability-function-size.BranchThreshold
value: '4294967295'
- key: bugprone-suspicious-missing-comma.RatioThreshold
value: '0.200000'
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: 'false'
- key: readability-identifier-length.IgnoredParameterNames
value: '^[n]$'
- key: readability-function-size.StatementThreshold
value: '800'
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 'false'
- key: cppcoreguidelines-init-variables.MathHeader
value: '<math.h>'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
value: 'false'
- key: readability-suspicious-call-argument.DiceSimilarAbove
value: '70'
- key: modernize-use-equals-default.IgnoreMacros
value: 'true'
- key: readability-suspicious-call-argument.Abbreviation
value: 'true'
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 'false'
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: '2'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: cppcoreguidelines-no-malloc.Deallocations
value: '::free'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
value: 'false'
- key: readability-suspicious-call-argument.JaroWinklerSimilarAbove
value: '85'
- key: readability-simplify-subscript-expr.Types
value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
value: ''
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'true'
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
value: '3'
- key: readability-function-size.VariableThreshold
value: '4294967295'
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: bugprone-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'true'
- key: readability-identifier-naming.GetConfigPerFile
value: 'true'
- key: modernize-use-default-member-init.UseAssignment
value: 'false'
- key: readability-function-size.NestingThreshold
value: '4294967295'
- key: modernize-use-override.AllowOverrideAndFinal
value: 'false'
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
value: ''
- key: readability-function-size.ParameterThreshold
value: '4294967295'
- key: modernize-pass-by-value.ValuesOnly
value: 'false'
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 'false'
- key: modernize-loop-convert.IncludeStyle
value: llvm
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
value: 'false'
- key: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation
value: 'false'
- key: cert-err33-c.CheckedFunctions
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
value: 'false'
- key: readability-redundant-smartptr-get.IgnoreMacros
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
value: 'false'
- key: readability-identifier-naming.AggressiveDependentMemberLookup
value: 'false'
- key: readability-identifier-length.MinimumParameterNameLength
value: '2'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: 'true'
- key: cppcoreguidelines-owning-memory.LegacyResourceProducers
value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
value: 'true'
- key: bugprone-argument-comment.StrictMode
value: '0'
- key: modernize-replace-random-shuffle.IncludeStyle
value: llvm
- key: modernize-use-bool-literals.IgnoreMacros
value: 'true'
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
value: 'true'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
value: ''
- key: modernize-avoid-bind.PermissiveParameterList
value: 'false'
- key: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
value: '1'
- key: readability-suspicious-call-argument.Suffix
value: 'true'
- key: readability-suspicious-call-argument.JaroWinklerDissimilarBelow
value: '75'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-override.FinalSpelling
value: final
- key: modernize-use-using.IgnoreMacros
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.FinalSpelling
value: final
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
value: '3'
- key: bugprone-narrowing-conversions.WarnOnIntegerNarrowingConversion
value: 'true'
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
value: 'false'
- key: bugprone-suspicious-include.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: performance-no-automatic-move.AllowedTypes
value: ''
- key: readability-suspicious-call-argument.SubstringDissimilarBelow
value: '40'
- key: bugprone-argument-comment.CommentIntegerLiterals
value: '0'
- key: bugprone-stringview-nullptr.IncludeStyle
value: llvm
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: 'false'
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: bugprone-argument-comment.CommentFloatLiterals
value: '0'
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
value: '16'
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: 'false'
- key: readability-else-after-return.WarnOnConditionVariables
value: 'true'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-suspicious-call-argument.SuffixDissimilarBelow
value: '25'
- key: bugprone-argument-comment.CommentCharacterLiterals
value: '0'
- key: cppcoreguidelines-macro-usage.AllowedRegexp
value: '^DEBUG_*'
- key: readability-suspicious-call-argument.LevenshteinSimilarAbove
value: '66'
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
value: 'false'
- key: modernize-make-shared.IgnoreDefaultInitialization
value: 'true'
- key: readability-suspicious-call-argument.JaroWinkler
value: 'true'
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXHeadersInCppSources
value: 'true'
- key: modernize-make-shared.IncludeStyle
value: llvm
- key: readability-suspicious-call-argument.Prefix
value: 'true'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
value: 'false'
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXStaticCastsInCppSources
value: 'true'
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
value: ''
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: 'false'
- key: modernize-make-unique.IgnoreMacros
value: 'true'
- key: performance-for-range-copy.AllowedTypes
value: ''
- key: bugprone-argument-comment.CommentBoolLiterals
value: '0'
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
- key: bugprone-argument-comment.CommentUserDefinedLiterals
value: '0'
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: '1.0;100.0;'
- key: performance-inefficient-string-concatenation.StrictMode
value: 'false'
- key: readability-redundant-declaration.IgnoreMacros
value: 'true'
- key: bugprone-easily-swappable-parameters.IgnoredParameterTypeSuffixes
value: 'bool;Bool;_Bool;it;It;iterator;Iterator;inputit;InputIt;forwardit;ForwardIt;bidirit;BidirIt;constiterator;const_iterator;Const_Iterator;Constiterator;ConstIterator;RandomIt;randomit;random_iterator;ReverseIt;reverse_iterator;reverse_const_iterator;ConstReverseIterator;Const_Reverse_Iterator;const_reverse_iterator;Constreverseiterator;constreverseiterator'
- key: modernize-make-unique.MakeSmartPtrFunction
value: 'std::make_unique'
- key: portability-restrict-system-includes.Includes
value: '*'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 'true'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: '<memory>'
- key: bugprone-signal-handler.AsyncSafeFunctionSet
value: POSIX
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
value: 'true'
- key: readability-suspicious-call-argument.SubstringSimilarAbove
value: '50'
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
value: 'false'
- key: readability-identifier-length.MinimumVariableNameLength
value: '2'
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'true'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
value: 'false'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
value: 'false'
- key: modernize-use-noexcept.UseNoexceptFalse
value: 'true'
- key: readability-function-cognitive-complexity.Threshold
value: '25'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
- key: bugprone-argument-comment.IgnoreSingleArgument
value: '0'
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'true'
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
value: 'false'
- key: performance-faster-string-find.StringLikeClasses
value: '::std::basic_string;::std::basic_string_view'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: 'true'
- key: bugprone-assert-side-effect.CheckFunctionCalls
value: 'false'
- key: bugprone-string-constructor.StringNames
value: '::std::basic_string;::std::basic_string_view'
- key: bugprone-assert-side-effect.AssertMacros
value: assert,NSAssert,NSCAssert
- key: bugprone-exception-escape.IgnoredExceptions
value: ''
- key: bugprone-signed-char-misuse.DiagnoseSignedUnsignedCharComparisons
value: 'true'
- key: modernize-use-default-member-init.IgnoreMacros
value: 'true'
- key: llvm-qualified-auto.AddConstToQualified
value: 'false'
- key: llvm-else-after-return.WarnOnConditionVariables
value: 'false'
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
value: 'true'
- key: modernize-raw-string-literal.DelimiterStem
value: lit
- key: readability-suspicious-call-argument.Dice
value: 'true'
- key: readability-identifier-length.IgnoredLoopCounterNames
value: '^[ijk_]$'
- key: modernize-raw-string-literal.ReplaceShorterLiterals
value: 'false'
- key: readability-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;'
- key: performance-inefficient-vector-operation.VectorLikeClasses
value: '::std::vector'
- key: modernize-use-auto.RemoveStars
value: 'false'
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
value: llvm
- key: portability-simd-intrinsics.Std
value: ''
- key: performance-unnecessary-value-param.IncludeStyle
value: llvm
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: 'false'
- key: modernize-replace-disallow-copy-and-assign-macro.MacroName
value: DISALLOW_COPY_AND_ASSIGN
- key: llvm-else-after-return.WarnOnUnfixable
value: 'false'
...
-58
View File
@@ -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
-12
View File
@@ -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"]
-93
View File
@@ -1,93 +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.
**Note:** Bug reports without a prior forum discussion will most likely not be accepted.
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.20 (Release)
- 0.21 (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
-5
View File
@@ -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
+6 -10
View File
@@ -1,14 +1,10 @@
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)!
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, please confirm the following:
- [ ] 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`
- [ ] Branch rebased on latest master `git pull --rebase upstream master`
- [ ] Unit tests confirmed to pass by running `./bin/FreeCAD --run-test 0`
- [ ] Commit message is [well-written](https://chris.beams.io/posts/git-commit/)
- [ ] Commit message includes `issue #<id>` or `fixes #<id>` where `<id>` is the [associated MantisBT](https://freecadweb.org/wiki/tracker#GitHub_and_MantisBT) issue id if one exists
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 [1.0 Changelog Forum Thread](https://forum.freecad.org/viewtopic.php?f=10&t=69438).
And please remember to update the Wiki with the features added or changed once this PR is merged.
---
-74
View File
@@ -1,74 +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
itsel
lod
mantatory
mata
methode
modell
nd
nin
normale
normaly
numer
oce
ontop
ot
parm
parms
programm
propt
rady
recurrance
rougly
seh
serie
siz
som
strack
substraction
sur
te
thist
tread
ue
upto
uptodate
usind
vas
vertexes
wallthickness
zuser
-63
View File
@@ -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/**/*'
-15
View File
@@ -1,15 +0,0 @@
{
"problemMatcher": [
{
"owner": "black-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(would reformat (.*))$",
"file": 2,
"message": 1
}
]
}
]
}
-17
View File
@@ -1,17 +0,0 @@
{
"problemMatcher": [
{
"owner": "clang",
"pattern": [
{
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
-16
View File
@@ -1,16 +0,0 @@
{
"problemMatcher": [
{
"owner": "codespell-matcher",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):(\\d+):\\s+(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
-16
View File
@@ -1,16 +0,0 @@
{
"problemMatcher": [
{
"owner": "cpplint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):([0-9]+): (.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
@@ -1,16 +0,0 @@
{
"problemMatcher": [
{
"owner": "grepMatcher-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):([0-9]+):(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
-18
View File
@@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "pylint-error",
"severity": "error",
"pattern": [
{
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
-18
View File
@@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "pylint-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
File diff suppressed because it is too large Load Diff
-31
View File
@@ -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 }}
-24
View File
@@ -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
+5 -12
View File
@@ -1,10 +1,5 @@
# file types to ignore
.*
!/.gitignore
!/.clang-format
!/.git-blame-ignore-revs
!/.gitattributes
*.DS_Store
*.pyc
*.obj
*.lib
@@ -13,8 +8,6 @@
*.exp
*.dep
*.manifest
*.o
*.orig
qrc_*.cpp
BuildLog.htm
cmake_install.cmake
@@ -25,7 +18,6 @@ ui_*.h
moc_*.cpp
Makefile
CMakeCache.txt
CMakeLists.txt.user
config.h
install_manifest.txt
/bin/
@@ -38,10 +30,11 @@ install_manifest.txt
/src/Tools/offlinedoc/localwiki/
/src/Tools/offlinedoc/*.txt
OpenSCAD_rc.py
.subuser-dev
/\.idea/
.tags
tags
/\.vscode/
# crowdin file
src/Tools/freecad.zip
tsupdate_stderr.log
tsupdate_stdout.log
files_to_translate.txt
-614
View File
@@ -1,614 +0,0 @@
[MAIN]
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
#enable-all-extensions=
# In error mode, messages with a category besides ERROR or FATAL are
# suppressed, and no reports are done by default. Error mode is compatible with
# disabling specific errors.
#errors-only=
# Always return a 0 (non-error) status code, even if lint errors are found.
# This is primarily useful in continuous integration scripts.
#exit-zero=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
# for backward compatibility.)
extension-pkg-whitelist=
# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10
# Interpret the stdin as a python script, whose filename needs to be passed as
# the module_or_package argument.
#from-stdin=
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS
# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths and can be in Posix or Windows format.
ignore-paths=
# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths. The default value ignores Emacs file
# locks
ignore-patterns=^\.#
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.10
# Discover python modules and packages in the file system subtree.
recursive=no
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# In verbose mode, extra non-checker-related info will be displayed.
#verbose=
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
# 'convention', and 'info' which contain the number of messages in each
# category, as well as 'statement' which is the total number of statements
# analyzed. This score is used by the global evaluation report (RP0004).
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=
# Tells whether to display a full report or only the messages.
reports=yes
# Activate the evaluation score.
score=yes
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
confidence=HIGH,
CONTROL_FLOW,
INFERENCE,
INFERENCE_FAILURE,
UNDEFINED
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
invalid-name,
wrong-import-order,
import-error,
undefined-variable
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style. If left empty, argument names will be checked with the set
# naming style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style. If left empty, attribute names will be checked with the set naming
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style. If left empty, class attribute names will be checked
# with the set naming style.
#class-attribute-rgx=
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style. If left empty, class constant names will be checked with
# the set naming style.
#class-const-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style. If left empty, class names will be checked with the set naming style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style. If left empty, constant names will be checked with the set naming
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style. If left empty, function names will be checked with the set
# naming style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style. If left empty, inline iteration names will be checked
# with the set naming style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style. If left empty, method names will be checked with the set naming style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style. If left empty, module names will be checked with the set naming style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Regular expression matching correct type variable names. If left empty, type
# variable names will be checked with the set naming style.
#typevar-rgx=
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style. If left empty, variable names will be checked with the set
# naming style.
#variable-rgx=
[CLASSES]
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[DESIGN]
# List of regular expressions of class ancestor names to ignore when counting
# public methods (see R0903)
exclude-too-few-public-methods=
# List of qualified class names to ignore when counting class parents (see
# R0901)
ignored-parents=
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
ext-import-graph=
# Output a graph (.gv or any supported image format) of all (i.e. internal and
# external) dependencies to the given file (report RP0402 must not be
# disabled).
import-graph=
# Output a graph (.gv or any supported image format) of internal dependencies
# to the given file (report RP0402 must not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
notes-rgx=
[SIMILARITIES]
# Comments are removed from the similarity computation
ignore-comments=yes
# Docstrings are removed from the similarity computation
ignore-docstrings=yes
# Imports are removed from the similarity computation
ignore-imports=yes
# Signatures are removed from the similarity computation
ignore-signatures=yes
# Minimum lines number of a similarity.
min-similarity-lines=4
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the 'python-enchant' package.
spelling-dict=
# List of comma separated words that should be considered directives if they
# appear at the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of symbolic message names to ignore for Mixin members.
ignored-checks-for-mixins=no-member,
not-async-context-manager,
not-context-manager,
attribute-defined-outside-init
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# Regex pattern to define which classes are considered mixins.
mixin-class-rgx=.*[Mm]ixin
# List of decorators that change the signature of a decorated function.
signature-mutators=
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
+1
View File
@@ -0,0 +1 @@
{"image-sources-dir": "./subuser"}
+164 -269
View File
@@ -1,5 +1,4 @@
######
#
####
# Travis-CI configuration file for FreeCAD.
#
# This build configuration will build and test FreeCAD on both Linux
@@ -17,19 +16,67 @@
#
# 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"
- FREECAD_RELEASE="0.18"
- DEPLOY_RELEASE=${DEPLOY_RELEASE:-$FREECAD_RELEASE}
- 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:
- OSX_PORTS_CACHE=${OSX_PORTS_CACHE:-FreeCAD/FreeCAD-ports-cache}
- DEPLOY=${DEPLOY:-0}
matrix:
# 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
secure: MJu0ZU/9Yqut6bUkHoSrXTV/c/WhCLR0KnHKCsnEU081PYoukzH6ngzgKk7/trAH2In080d/ra4B2OmTNl/LAgV6DXKFY9dO1aG8QwcrHgaMPf0pHYUy/OfwQSFYFByQDV2OEMAHcIWc/dtNkzK2QUi44Kn7d0GtSEiN4s816lriWtjg0vmEGAU8MjvcAGss4gKyn05Xm1NUCYPKgpgIHsywLbpE76lv0eOYoosEuKv5Q9Pb4FMQts02+JUlqE8eY4ZZ3nV8iQbgIDdseOSA7Ixn05zWjU/ZRZ74TrYxMnzfUAwQcJe9OcqoESq+pPWQt5HYG66VmeVxQim1gmsiDASH51U/nswKt0Q4bISj3tVk0YZMFV8Ax+SzPvLEmFZJQGfgO1mg7HdNcz9N9G5JHPawrV19DwYIEFbAw8MCSAoIXFOcPQZUWXCbtjm7NO9vCjMrqyVJMDD9L8omvQajHoajuHbOT8KB250gFokeLj3z8yu++Tz+IrZX5inUMrXsARVt/ALXpi8rJPXmoFMpMUjyWmDPqPWlnqUhLtTtEtKpuOWP8ZnWVwkg4QYOUhCy95C1okJSGkG+ylHWncWfY4mS+UBT525laoh+GOhH+sRW+p2xkI21xGFRqg1oHjjgY1yIYF6nnSHPzxMBRYmZwagyXsjkFG5FPMWR2oYk0Yg
cache:
ccache: true
language: cpp
python:
- 2.7
- 3.4
# Inject osx build into matrix - needed to specify image/dist
matrix:
allow_failures:
- python: 3.7
- os: osx
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds
include:
- os: linux
dist: trusty
compiler: clang
env:
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
- PYTHON_MAJOR_VERSION=2
- os: linux
dist: trusty
compiler: gcc
env:
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
- PYTHON_MAJOR_VERSION=2
- os: linux
dist: trusty
compiler: gcc
env:
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON"
- PYTHON_MAJOR_VERSION=3
- 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
# macOS build is failing. See: https://forum.freecadweb.org/viewtopic.php?f=10&t=32272
- os: osx
compiler: clang
env:
- CMAKE_OPTS="-DBUILD_FEM_NETGEN=ON" QT=Qt5
- PYTHON_MAJOR_VERSION=2
git:
depth: 5000
@@ -43,242 +90,123 @@ notifications:
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")"
- 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 \
doxygen \
libboost1.55-dev \
libboost-filesystem1.55-dev \
libboost-program-options1.55-dev \
libboost-python1.55-dev \
libboost-regex1.55-dev \
libboost-signals1.55-dev \
libboost-system1.55-dev \
libboost-thread1.55-dev \
libcoin80 \
libcoin80-dev \
liboce-foundation-dev \
liboce-modeling-dev \
liboce-ocaf-dev \
liboce-ocaf-lite-dev \
liboce-visualization-dev \
libpyside-dev \
libqtcore4 \
libshiboken-dev \
libxerces-c-dev \
libxmu-dev \
libxmu-headers \
libxmu6 \
libxmuu-dev \
libxmuu1 \
netgen \
netgen-headers \
oce-draw \
pyside-tools \
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-dev-tools \
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
shiboken \
swig \
libvtk6-dev \
libmed-dev \
libmedc-dev \
asciidoc
# 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
# Make sure dpkg is upgraded for Ubuntu 14.04 (required for eigen3)
sudo apt-get install -y dpkg
# Use latest Eigen3 package
curl -L http://security.ubuntu.com/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.4-4_all.deb -o libeigen3.deb \
&& sudo dpkg -i libeigen3.deb
# Install ccache to reduce successive build times (use newer version to minimize issues)
# XXX: ccache <=3.4.3 always builds manuals, requiring asciidoc/xsltproc
# XXX: 3.4.4 might have --disable-man (at least its present in their git)
sudo apt install -y xsltproc
curl -L "https://codeload.github.com/ccache/ccache/tar.gz/v3.4.3" | tar xvz && cd ccache-*
./autogen.sh && ./configure CC=gcc && sudo make install
cd ${TRAVIS_BUILD_DIR}
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
export CCACHE_CPP2=YES
if [[ ${PYTHON_MAJOR_VERSION} == 2 ]]
then
export CMAKE_ARGS="${CMAKE_OPTS} -DPYTHON_EXECUTABLE=/usr/bin/python"
else
export CMAKE_ARGS="${CMAKE_OPTS} -DPYTHON_EXECUTABLE=/usr/bin/python3.4 -DPYTHON_BASENAME=.cpython-34m \
-DPYTHON_SUFFIX=.cpython-34m"
fi
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
if [ "${OSX_PORTS_CACHE}X" != "X" ]; then
brew install jq
cacheContext=$(create_helper_context repo=${OSX_PORTS_CACHE} auth_token=${GH_TOKEN} release=${FREECAD_RELEASE})
travis_wait prime_local_ports_cache $cacheContext
fi
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
brew tap FreeCAD/freecad
brew install --verbose --only-dependencies freecad --with-packaging-utils
pip install six
# Qt5: Set Qt5 build flag and CMAKE_PREFIX
QT5_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qt/*/lib/cmake)
QT5_WEBKIT_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qtwebkit/*/lib/cmake)
CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_QT5=ON -DCMAKE_PREFIX_PATH=${QT5_CMAKE_PREFIX};${QT5_WEBKIT_CMAKE_PREFIX}"
#Install the 3DConnexion frameworks
if [ "${DEPLOY}" == "1" ]; then
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then
curl -o /tmp/3dFW.dmg -L 'http://www.3dconnexion.com/index.php?eID=sdl&ext=tx_iccsoftware&oid=a273bdbc-c289-e10d-816b-567043331c9e&filename=3DxWareMac_v10-4-1_r2428.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=ON"
export INSTALLED_APP_PATH="/usr/local/FreeCAD.app/Contents/MacOS/FreeCAD"
else
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD"
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
;;
*)
@@ -291,67 +219,34 @@ 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} ../
- mkdir build && cd build && cmake ${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
- sudo make -j2 install
- ${INSTALLED_APP_PATH} --console --run-test 0
- ${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 )
#after_success:
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
##
- |
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
-6
View File
@@ -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
View File
@@ -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>
+1186 -63
View File
File diff suppressed because it is too large Load Diff
-79
View File
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

-42
View File
@@ -9,47 +9,5 @@
# 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
+47 -135
View File
@@ -1,173 +1,85 @@
<h6 align="center"><img src="FreeCAD-toponaming-logo.png"/></h6>
FreeCAD
-------
<h1 align="center">FreeCAD Topological Naming (toponaming) Branch</h1>
![screenshot](http://www.freecadweb.org/wiki/images/thumb/7/72/Freecad016_screenshot1.jpg/800px-Freecad016_screenshot1.jpg)
### About
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.
This branch is dedicated to integrating code that improves the [topological naming problem](https://wiki.freecad.org/Topological_naming_problem) in FreeCAD. There have been several attempts to address it over the years within FreeCAD. In reality, toponaming is an issue that no modern CAD software is fully immune to. This is because the solutions are complex.
Thanks to an independent developer named Zheng Lei ('realthunder'), who has gone the farthest in the effort of fixing toponaming in FreeCAD, and has provided a proof of concept fix in his own branch named 'Link' branch.
* [@Realthunder](https://github.com/realthunder)'s Link branch: https://github.com/realthunder/FreeCAD
* Official FreeCAD main ('master') branch: https://github.com/FreeCAD/FreeCAD/
* Official FreeCAD toponaming git repository: https://github.com/FreeCAD/FreeCAD/tree/development/toponaming
### Objective
Per the FreeCAD developer meetings that occurred during the pre-release of v0.20, 'toponaming' was identified as one of the main targets for merge in the v0.21/v1.0 release cycle.
### Contributing
During this development cycle there will be nightly builds provided for testers to test and report results back to the developers.
<details>
<summary>Expand this section to learn about testing toponaming on different platforms/distros</summary>
#### Linux
##### Snap packages
A nightly Snap package of the 'toponaming' branch will be available to testers. Refer to the [Snap wiki page](https://wiki.freecad.org/Ubuntu_Snap#Notes)
#### Windows
TBD
#### macOS
TBD
#### FreeBSD
N/A
</details>
<!--
[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)
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad) [![Gitter](https://img.shields.io/gitter/room/freecad/freecad.svg)](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [![Liberapay](https://img.shields.io/liberapay/receives/FreeCAD.svg?logo=liberapay)](https://liberapay.com/FreeCAD)
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
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
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](https://github.com/FreeCAD/FreeCAD)
Installing
----------
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
Precompiled (installable) packages are available for Windows and Mac on the
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
On most Linux distributions, FreeCAD is also directly installable from the
On most Linux distributions, FreeCAD is 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](http://www.freecadweb.org/wiki/Download).
Other options are described at the [wiki Download page](https://wiki.freecadweb.org/Download).
Build Status
Build Status <img src="https://blog.travis-ci.com/images/travis-mascot-200px.png" height="30"/>
------------
| Master | 0.20 | Translation |
| Master | 0.17 | Translation |
|:------:|:----:|:-----------:|
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.20][freecad-0.20-status]][gitlab-branch-0.20]|[![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)|
|[![Master][freecad-master-status]][travis-branches]|[![0.17][freecad-0.17-status]][travis-branches]|[![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)|
[freecad-0.20-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-20/pipeline.svg
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
[gitlab-branch-0.20]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-20
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
[freecad-0.17-status]: https://travis-ci.org/FreeCAD/FreeCAD.svg?branch=releases/FreeCAD-0-17
[freecad-master-status]: https://travis-ci.org/FreeCAD/FreeCAD.svg?branch=master
[travis-branches]: https://travis-ci.org/FreeCAD/FreeCAD/branches
[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
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 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.
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:
- [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](https://forum.freecadweb.org/viewforum.php?f=3)
- [Linux](http://www.freecadweb.org/wiki/CompileOnUnix)
- [Windows](http://www.freecadweb.org/wiki/CompileOnWindows)
- [Mac OSX](http://www.freecadweb.org/wiki/CompileOnMac)
- [Cygwin](http://www.freecadweb.org/wiki/CompileOnCygwin)
- [MinGW](http://www.freecadweb.org/wiki/CompileOnMinGW)
Usage & Getting help
--------------------
[![Gitter](https://img.shields.io/gitter/room/freecad/freecad.svg)](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
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)
- [Getting started](http://www.freecadweb.org/wiki/Getting_started)
- [Features list](http://www.freecadweb.org/wiki/Feature_list)
- [Frequent questions](http://www.freecadweb.org/wiki/FAQ)
- [Workbenches](http://www.freecadweb.org/wiki/Workbench_Concept)
- [Scripting](http://www.freecadweb.org/wiki/Power_users_hub)
- [Development](http://www.freecadweb.org/wiki/Developer_hub)
The [FreeCAD forum](https://forum.freecadweb.org) is also a great place
The [FreeCAD forum](http://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>
-->
+18 -19
View File
@@ -1,21 +1,23 @@
#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"
- generator: "Visual Studio 12 Win64"
ARCH: "Win64"
Compiler: "MSVC2017"
Compiler: "MSVC2013"
- generator: "Visual Studio 12"
ARCH: "Win32"
Compiler: "MSVC2013"
cache: c:\users\appveyor\clcache -> appveyor.yml
#cache: #
configuration:
#- Debug
- Release
#branches:
# only:
clone_depth: 1600
# scripts that are called at very beginning, before repo cloning
@@ -27,14 +29,15 @@ clone_depth: 1600
#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] (appveyor DownloadFile https://github.com/FreeCAD/FreeCAD-ports-cache/releases/download/v0.17/FreeCADLibs_11.5.1_x64_VC12.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
powershell -Command 7z x FreeCADLibs_11.5.1_x64_VC12.7z > nul &&
ren FreeCADLibs_11.5_x64_VC12 FreeCADLibs)
- if [%ARCH%] == [Win32] (appveyor DownloadFile https://github.com/FreeCAD/FreeCAD-ports-cache/releases/download/v0.17/FreeCADLibs_11.5.1_x86_VC12.7z)
- if [%ARCH%] == [Win32] (
powershell -Command 7z x FreeCADLibs_11.5.1_x86_VC12.7z > nul &&
ren FreeCADLibs_11.5_x86_VC12 FreeCADLibs)
- dir
build_script:
- cd C:\projects\freecad
@@ -42,14 +45,10 @@ build_script:
- 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
- msbuild /m FreeCAD_Trunk.sln
#after_build:
- cd C:\projects\freecad\build\bin\
-91
View File
@@ -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
-20
View File
@@ -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})
+3 -20
View File
@@ -9,7 +9,7 @@
SET( COIN3D_FOUND "NO" )
IF (WIN32)
IF (CYGWIN OR MINGW)
IF (CYGWIN)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
${CMAKE_INCLUDE_PATH}
@@ -24,7 +24,7 @@ IF (WIN32)
/usr/local/lib
)
ELSE (CYGWIN OR MINGW)
ELSE (CYGWIN)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
@@ -61,7 +61,7 @@ IF (WIN32)
# SET (COIN3D_LIBRARIES coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
ENDIF (COIN3D_LIBRARIES)
ENDIF (CYGWIN OR MINGW)
ENDIF (CYGWIN)
ELSE (WIN32)
IF(APPLE)
@@ -104,22 +104,5 @@ ENDIF (WIN32)
IF(COIN3D_LIBRARIES)
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)
+5 -7
View File
@@ -23,19 +23,18 @@ IF (COIN3D_FOUND)
find_path(COIN3D_DOC_PATH index.html
/usr/share/doc/libcoin80-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 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 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")
+76
View File
@@ -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)
+1 -1
View File
@@ -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)
-12
View File
@@ -5,7 +5,6 @@
# 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.
@@ -57,14 +56,3 @@ 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()
+1 -1
View File
@@ -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.
+15 -19
View File
@@ -108,7 +108,7 @@ else(Netgen_FOUND)
IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
MESSAGE(STATUS "Cannot find NETGEN header files.")
ELSEIF(NOT NETGEN_VERSION)
ELSE()
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
REGEX "#define PACKAGE_VERSION.*"
)
@@ -129,27 +129,23 @@ 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)
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()
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8)")
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>
-173
View File
@@ -1,173 +0,0 @@
# Try to find OCE / OCC
# Once done this will define
#
# OCC_FOUND - system has OCC - OpenCASCADE
# OCC_INCLUDE_DIR - where the OCC include directory can be found
# OCC_LIBRARY_DIR - where the OCC library directory can be found
# OCC_LIBRARIES - Link this to use OCC
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
# 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)
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()
if(OCE_FOUND)
message(STATUS "-- OpenCASCADE Community Edition has been found.")
# Disable this define. For more details see bug #0001872
#add_definitions (-DHAVE_CONFIG_H)
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
/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)
IF(NOT OCC_INCLUDE_DIR)
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
${OCC_LIBRARY_DIR}/../inc
)
ENDIF()
endif(OCC_LIBRARY)
endif(OpenCASCADE_FOUND)
endif(OCE_FOUND)
if(OCC_INCLUDE_DIR)
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
REGEX "#define OCC_VERSION_MAJOR.*"
)
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
REGEX "#define OCC_VERSION_MINOR.*"
)
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
REGEX "#define OCC_VERSION_MAINTENANCE.*"
)
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
endif(OCC_INCLUDE_DIR)
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
if(OCC_FOUND)
set(OCC_LIBRARIES
TKFillet
TKMesh
TKernel
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBool
TKBO
TKBRep
TKTopAlgo
TKGeomAlgo
TKGeomBase
TKOffset
TKPrim
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!")
endif(OCC_FOUND)
+160
View File
@@ -0,0 +1,160 @@
# Try to find OCE / OCC
# Once done this will define
#
# OCC_FOUND - system has OCC - OpenCASCADE
# OCC_INCLUDE_DIR - where the OCC include directory can be found
# OCC_LIBRARY_DIR - where the OCC library directory can be found
# OCC_LIBRARIES - Link this to use OCC
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
# 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)
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()
if(OCE_FOUND)
message(STATUS "-- OpenCASCADE Community Edition has been found.")
# Disable this define. For more details see bug #0001872
#add_definitions (-DHAVE_CONFIG_H)
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)
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
/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)
IF(NOT OCC_INCLUDE_DIR)
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
${OCC_LIBRARY_DIR}/../inc
)
ENDIF()
endif(OCC_LIBRARY)
endif(OpenCASCADE_FOUND)
endif(OCE_FOUND)
if(OCC_INCLUDE_DIR)
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
REGEX "#define OCC_VERSION_MAJOR.*"
)
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
REGEX "#define OCC_VERSION_MINOR.*"
)
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
REGEX "#define OCC_VERSION_MAINTENANCE.*"
)
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
endif(OCC_INCLUDE_DIR)
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
if(OCC_FOUND)
set(OCC_LIBRARIES
TKFillet
TKMesh
TKernel
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBin
TKBool
TKBO
TKCDF
TKBRep
TKTopAlgo
TKGeomAlgo
TKGeomBase
TKOffset
TKPrim
TKSTEP
TKSTEPBase
TKSTEPAttr
TKHLR
TKFeat
)
set(OCC_OCAF_LIBRARIES
TKCAF
TKXCAF
TKLCAF
TKXDESTEP
TKXDEIGES
TKMeshVS
)
if(OCC_VERSION_STRING VERSION_LESS 6.7.3)
list(APPEND OCC_OCAF_LIBRARIES TKAdvTools)
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!")
endif(OCC_FOUND)
-1
View File
@@ -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.
+13 -36
View File
@@ -20,33 +20,10 @@ if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
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)
FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
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)
@@ -56,16 +33,16 @@ MACRO(PYSIDE_WRAP_UI outfiles)
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
COMMAND ${PYSIDE2UICBINARY} ${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.
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
@@ -74,9 +51,6 @@ MACRO(PYSIDE_WRAP_UI outfiles)
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)
@@ -86,7 +60,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else()
@@ -94,8 +68,8 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# 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}"
COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
@@ -103,8 +77,11 @@ MACRO(PYSIDE_WRAP_RC outfiles)
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_RC)
IF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
set(PYSIDE2_TOOLS_FOUND TRUE)
ENDIF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY})
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)
+101
View File
@@ -0,0 +1,101 @@
# 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 ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
#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 ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FIND_PROGRAM(PYSIDEUIC4BINARY NAMES python2-pyside-uic pyside-uic pyside-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
FIND_PROGRAM(PYSIDERCC4BINARY NAMES pyside-rcc pyside-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
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}
#)
if(WIN32)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDEUIC4BINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else(WIN32)
# Especially on Open Build Service we don't want changing date like
# pyside-uic generates in comments at beginning, which is why
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND "${PYSIDEUIC4BINARY}" "${infile}" -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif(WIN32)
list(APPEND ${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}
#)
if (${PYTHON_VERSION_MAJOR} LESS 3)
SET(PY_ATTRIBUTE "")
else (${PYTHON_VERSION_MAJOR} LESS 3)
SET(PY_ATTRIBUTE "-py3")
endif (${PYTHON_VERSION_MAJOR} LESS 3)
if(WIN32)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDERCC4BINARY} ${infile} ${PY_ATTRIBUTE} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else(WIN32)
# 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 "${PYSIDERCC4BINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif(WIN32)
list(APPEND ${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 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)
+9 -39
View File
@@ -5,55 +5,28 @@
# SMESH_INCLUDE_DIR - where the Salome SMESH include directory can be found
# SMESH_LIBRARIES - Link this to use Salome SMESH
#
# SMESH needs VTK
find_package(VTK REQUIRED)
# If this definition is not set, linker errors will occur against SMESH on 64 bit machines.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DSALOME_USE_64BIT_IDS)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
IF (CMAKE_COMPILER_IS_GNUCC)
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx
# These are default search paths, why specify them?
PATH_SUFFIXES smesh SMESH smesh/SMESH
# /usr/include
# /usr/local/include
PATH_SUFFIXES smesh
)
FIND_LIBRARY(SMESH_LIBRARY SMESH
# /usr/lib
# /usr/local/lib
)
FIND_LIBRARY(SMESH_LIBRARY SMESH)
ELSE (CMAKE_COMPILER_IS_GNUCC)
# Not yet implemented
ENDIF (CMAKE_COMPILER_IS_GNUCC)
IF(SMESH_INCLUDE_DIR)
SET(SMESH_INC_ROOT "${SMESH_INCLUDE_DIR}/..")
# Append extra include dirs
SET(SMESH_INCLUDE_DIR
"${SMESH_INCLUDE_DIR};
${SMESH_INC_ROOT}/Controls;
${SMESH_INC_ROOT}/Driver;
${SMESH_INC_ROOT}/DriverDAT;
${SMESH_INC_ROOT}/DriverGMF;
${SMESH_INC_ROOT}/DriverSTL;
${SMESH_INC_ROOT}/DriverUNV;
${SMESH_INC_ROOT}/Geom;
${SMESH_INC_ROOT}/Kernel;
${SMESH_INC_ROOT}/MEFISTO2;
${SMESH_INC_ROOT}/MeshVSLink;
${SMESH_INC_ROOT}/Netgen;
${SMESH_INC_ROOT}/NETGENPlugin;
${SMESH_INC_ROOT}/SMDS;
${SMESH_INC_ROOT}/SMESHDS;
${SMESH_INC_ROOT}/SMESHUtils;
${SMESH_INC_ROOT}/StdMeshers;")
ELSE(SMESH_INCLUDE_DIR)
message(FATAL_ERROR "SMESH include directories not found!")
ENDIF(SMESH_INCLUDE_DIR)
SET(SMESH_FOUND FALSE)
IF(SMESH_LIBRARY)
SET(SMESH_FOUND TRUE)
GET_FILENAME_COMPONENT(SMESH_LIBRARY_DIR ${SMESH_LIBRARY} PATH)
set(SMESH_LIBRARIES
set(SMESH_LIBRARIES
${SMESH_LIBRARY_DIR}/libDriver.so
${SMESH_LIBRARY_DIR}/libDriverDAT.so
${SMESH_LIBRARY_DIR}/libDriverSTL.so
@@ -63,8 +36,5 @@ IF(SMESH_LIBRARY)
${SMESH_LIBRARY_DIR}/libSMESHDS.so
${SMESH_LIBRARY_DIR}/libStdMeshers.so
)
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
ELSE(SMESH_LIBRARY)
message(FATAL_ERROR "SMESH libraries NOT FOUND!")
ENDIF(SMESH_LIBRARY)
+1 -1
View File
@@ -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)
+164
View File
@@ -0,0 +1,164 @@
# - Try to find Windows Installer XML
# See http://wix.sourceforge.net
#
# The following 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)
+51
View File
@@ -0,0 +1,51 @@
# 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_DIRS, 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_DIRS xercesc/dom/DOM.hpp
${CMAKE_INCLUDE_PATH}
"[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
xerces-c_3
PATHS
${CMAKE_LIBRARY_PATH}
"[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_DIRS 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_DIRS 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_DIRS AND XercesC_LIBRARIES)
#MARK_AS_ADVANCED(
# XercesC_INCLUDE_DIRS
# 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)
-8
View File
@@ -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)
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,191 +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(FREECAD_TOPONAMING_BRANDING "Enable branding for TopoNaming branch" ON)
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" OFF)
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_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: ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} 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)
-19
View File
@@ -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)
-31
View File
@@ -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)
-11
View File
@@ -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)
-12
View File
@@ -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)
-29
View File
@@ -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)
-13
View File
@@ -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(OCC)
if(NOT OCC_FOUND)
message(FATAL_ERROR "================================================================\n"
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
"================================================================\n")
endif(NOT OCC_FOUND)
endmacro(SetupOpenCasCade)
-16
View File
@@ -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)
-14
View File
@@ -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)
-10
View File
@@ -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)
-162
View File
@@ -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)
-38
View File
@@ -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,144 +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)
# If this definition is not set, linker errors will occur against SMESH on 64 bit machines.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DSALOME_USE_64BIT_IDS)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(NOT SMESH_FOUND)
find_package(SMESH REQUIRED)
if(NOT SMESH_FOUND)
message(ERROR "================\n"
"SMESH not found.\n"
"================\n")
endif()
endif()
set (SMESH_INCLUDE_DIR ${SMESH_INCLUDE_PATH})
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
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)
-12
View File
@@ -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)
-11
View File
@@ -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)
+6 -16
View File
@@ -161,19 +161,11 @@ macro(generate_from_py BASE_NAME OUTPUT_FILE)
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)
@@ -245,10 +237,8 @@ MACRO(SET_BIN_DIR ProjectName OutputName)
# 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_PREFIX}${ARGV3})
else(${ARGC} STREQUAL 4)
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
+533
View File
@@ -0,0 +1,533 @@
# ================================================================================
# == 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_LIBRARIES optimized python27.lib debug python27_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.7.5)
set(PYTHON_INCLUDE_DIRS ${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_DIRS ${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_python-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
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_python-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_DIRS 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_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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
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_QTXML_LIBRARY
optimized QtXml4.lib debug QtXmld4.lib
)
set(QT_QT3SUPPORT_LIBRARY
optimized Qt3Support4.lib debug Qt3Supportd4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib optimized qtmain.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 TKBin
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 TKBind
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)
# 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)
+325
View File
@@ -0,0 +1,325 @@
# ================================================================================
# == 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_LIBRARIES optimized python25.lib debug python25_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
set(PYTHONLIBS_FOUND TRUE)
# XercesC
set(XercesC_INCLUDE_DIRS ${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_python-vc80-mt.lib
optimized boost_regex-vc80-mt.lib
optimized boost_signals-vc80-mt.lib
debug boost_filesystem-vc80-mt-gd.lib
#debug boost_graph-vc80-mt-gd.lib
debug boost_program_options-vc80-mt-gd.lib
debug boost_python-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_DIRS ${FREECAD_LIBPACK_DIR}/include/coin)
set(COIN3D_LIBRARY_DEBUG coin2d.lib)
set(COIN3D_LIBRARY_RELEASE coin2.lib)
set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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
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_QTXML_LIBRARY
optimized QtXml4.lib
debug QtXmld4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib
debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib
optimized qtmain.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)
# 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
TKBin
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)
+346
View File
@@ -0,0 +1,346 @@
# ================================================================================
# == 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_LIBRARIES optimized python26.lib debug python26_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
set(PYTHONLIBS_FOUND TRUE)
# XercesC
set(XercesC_INCLUDE_DIRS ${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_python-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
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_python-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_DIRS ${FREECAD_LIBPACK_DIR}/include/coin)
set(COIN3D_LIBRARY_DEBUG coin3d.lib)
set(COIN3D_LIBRARY_RELEASE coin3.lib)
set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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
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_QTXML_LIBRARY
optimized QtXml4.lib
debug QtXmld4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib
debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib
optimized qtmain.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
TKBin
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)
+444
View File
@@ -0,0 +1,444 @@
# ================================================================================
# == 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_LIBRARIES optimized python26.lib debug python26_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/python)
set(PYTHON_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/python.exe)
set(PYTHONLIBS_FOUND TRUE)
# XercesC
set(XercesC_INCLUDE_DIRS ${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_python-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
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_python-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_DIRS ${FREECAD_LIBPACK_DIR}/include/coin)
set(COIN3D_LIBRARY_DEBUG coin3d.lib)
set(COIN3D_LIBRARY_RELEASE coin3.lib)
set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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
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_QTXML_LIBRARY
optimized QtXml4.lib
debug QtXmld4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib
debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib
optimized qtmain.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 TKBin
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 TKBind
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)
+530
View File
@@ -0,0 +1,530 @@
# ================================================================================
# == 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_LIBRARIES optimized python27.lib debug python27_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.7.6)
set(PYTHON_INCLUDE_DIRS ${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_DIRS ${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_python-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
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_python-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_DIRS 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_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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_QTXML_INCLUDE_DIR
${FREECAD_LIBPACK_DIR}/include/Qt-4.8.5/QtXml
)
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
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_QTXML_LIBRARY
optimized QtXml4.lib
debug QtXmld4.lib
)
set(QT_QT3SUPPORT_LIBRARY
optimized Qt3Support4.lib
debug Qt3Supportd4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib
debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib
optimized qtmain.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 TKBin
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 TKBind
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)
# 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)
+69 -3
View File
@@ -7,7 +7,14 @@ 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)
if (BUILD_QT5)
# default Qt5 stuff
# Set paths to cmake config files for each Qt module
set(Qt5_ROOT_DIR ${FREECAD_LIBPACK_DIR} CACHE PATH "")
@@ -41,9 +48,10 @@ 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})
endif (BUILD_QT5)
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")
@@ -59,3 +67,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)
+426
View File
@@ -0,0 +1,426 @@
# ================================================================================
# == 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_LIBRARIES optimized python26.lib debug python26_d.lib)
set(PYTHON_INCLUDE_PATH ${FREECAD_LIBPACK_DIR}/include/Python-2.6.4)
set(PYTHON_INCLUDE_DIRS ${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_DIRS ${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_python-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
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_python-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_DIRS Inventor/So.h
${FREECAD_LIBPACK_DIR}/include/Coin-2.4.5
)
find_path(COIN3D_INCLUDE_DIRS 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_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
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
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_QTXML_LIBRARY
optimized QtXml4.lib
debug QtXmld4.lib
)
set(QT_QT3SUPPORT_LIBRARY
optimized Qt3Support4.lib
debug Qt3Supportd4.lib
)
set(QT_QTUITOOLS_LIBRARY
optimized QtUiTools.lib
debug QtUiToolsd.lib
)
set(QT_QTMAIN_LIBRARY
debug qtmaind.lib
optimized qtmain.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
TKBin
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)
# 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)
-43
View File
@@ -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
View File
@@ -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
-53
View File
@@ -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
-84
View File
@@ -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
-6
View File
@@ -1,6 +0,0 @@
channel_sources:
- conda-forge,defaults
channel_targets:
- freecad dev
MACOSX_DEPLOYMENT_TARGET: # [osx]
- '10.12' # [osx]
-16
View File
@@ -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
View File
@@ -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
-31
View File
@@ -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
-6
View File
@@ -1,6 +0,0 @@
mesa-libGL
mesa-dri-drivers
libselinux
libXdamage
libXxf86vm
libXext-devel
-3
View File
@@ -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"
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
SET(Examples_Files
Schenkel.stp
draft_test_objects.FCStd
DrawingExample.FCStd
EngineBlock.FCStd
PartDesignExample.FCStd
RobotExample.FCStd
Binary file not shown.

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