OCE and OCCT on one linux machine
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: OCE and OCCT on one linux machine
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"
Re: OCE and OCCT on one linux machine
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 OCCsgrogan 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.
Re: OCE and OCCT on one linux machine
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.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
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"
Re: OCE and OCCT on one linux machine
I did it once. And I just have to look how it was done...
Re: OCE and OCCT on one linux machine
How does it work than?wmayer wrote:See new pull request: https://github.com/FreeCAD/FreeCAD/pull/341
If it succeeds I will merge it.
Code: Select all
cmake -DFREECAD_USE_OCC_VARIANT=“Official Version“ -DOCE_DIR=/myocctlibdir /myfreecadsourcedir
Re: OCE and OCCT on one linux machine
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.
Re: OCE and OCCT on one linux machine
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:
means OCE installed, OCCT installed and no code change needed to proper choose OCCT See German topic: viewtopic.php?f=13&t=18397&start=10#p146607
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
I just managed to really handle OCCT 7.0.0saso wrote:Open CASCADE Technology 7.1.0 is out
https://www.opencascade.com/content/ope ... e-download
Re: OCE and OCCT on one linux machine
hopefully it does not bring too many unwanted changed but some useful bug fixesbernd wrote:I just managed to really handle OCCT 7.0.0saso wrote:Open CASCADE Technology 7.1.0 is out
https://www.opencascade.com/content/ope ... e-download