OCE and OCCT on one linux machine

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OCE and OCCT on one linux machine

Post by sgrogan »

I tried to get it working with the NAMES argument for find_package. Unfortunately if multiple versions of oce/occt are installed sometimes the system default isn't found when OCE_DIR is unset.
"fight the good fight"
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: OCE and OCCT on one linux machine

Post by wmayer »

sgrogan wrote:I tried to get it working with the NAMES argument for find_package. Unfortunately if multiple versions of oce/occt are installed sometimes the system default isn't found when OCE_DIR is unset.
I assume you used it like this: find_package(OCE NAMES OCE OpenCascade) (not sure if the syntax is right)? But then you have no explicit control if you prefer OCE or OCC
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OCE and OCCT on one linux machine

Post by sgrogan »

wmayer wrote:I assume you used it like this: find_package(OCE NAMES OCE OpenCascade) (not sure if the syntax is right)? But then you have no explicit control if you prefer OCE or OCC
Yes, it worked well when specifying OCE_DIR, but I didn't try to have OCEConfig.cmake and OpenCascadeConfig.cmake in the same directory. What I didn't like was when not setting OCE_DIR I couldn't figure out the search order to maintain the current default behavior.
With your solution of a USE_OCCT switch, I think it's straight forward to guarantee that the current default doesn't change. I don't know how to make a combo box, but it might be fun to learn. I could try to implement something if you like.
"fight the good fight"
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: OCE and OCCT on one linux machine

Post by wmayer »

I did it once. And I just have to look how it was done...
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: OCE and OCCT on one linux machine

Post by wmayer »

See new pull request: https://github.com/FreeCAD/FreeCAD/pull/341

If it succeeds I will merge it.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OCE and OCCT on one linux machine

Post by bernd »

wmayer wrote:See new pull request: https://github.com/FreeCAD/FreeCAD/pull/341

If it succeeds I will merge it.
How does it work than?

Code: Select all

cmake -DFREECAD_USE_OCC_VARIANT=“Official Version“ -DOCE_DIR=/myocctlibdir  /myfreecadsourcedir 
should find occt even if oce is installed?
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: OCE and OCCT on one linux machine

Post by wmayer »

The same way as your proposal. When e.g. the values is set to "Official Version" then the find_package(OCE) won't be executed.
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: OCE and OCCT on one linux machine

Post by saso »

Open CASCADE Technology 7.1.0 is out

https://www.opencascade.com/content/ope ... e-download
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OCE and OCCT on one linux machine

Post by bernd »

on ubuntu Xenial with oce dev packages installed and OCCT 7.0.0 self compiled and installed at /opt/... I had to use the following cmake to get it running:

Code: Select all

cmake ../FreeCAD -DFREECAD_USE_OCC_VARIANT="Official Version" -DOCC_INCLUDE_DIR=/opt/local/FreeCAD-0.17/include/opencascade -DOCC_LIBRARY=/opt/local/FreeCAD-0.17/lib/libTKernel.so
means OCE installed, OCCT installed and no code change needed to proper choose OCCT :D See German topic: viewtopic.php?f=13&t=18397&start=10#p146607

saso wrote:Open CASCADE Technology 7.1.0 is out
https://www.opencascade.com/content/ope ... e-download
:shock: I just managed to really handle OCCT 7.0.0
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: OCE and OCCT on one linux machine

Post by saso »

bernd wrote:
saso wrote:Open CASCADE Technology 7.1.0 is out
https://www.opencascade.com/content/ope ... e-download
:shock: I just managed to really handle OCCT 7.0.0
hopefully it does not bring too many unwanted changed but some useful bug fixes :roll:
Post Reply