I got this to compile on Kubuntu 18.04, i.e. both OCC master (7.5) and then FreeCAD master against that self compiled OCC 7.5.
I have had some bugs, not sure if it's to do with how I configured/compiled or if its just due to occ7.5. For example I get an error if I run the PartDesign WB shaft wizard.
MasterCATZ wrote: ↑Thu Oct 08, 2020 11:42 pm
CMake Error at /SnapRaidArray/DATA/git/occt/occt-278da16/build/OpenCASCADEConfig.cmake:101 (include):
include could not find load file:
The trick to get Cmake to find the installed self compiled OCC was to tick the box in the option you can see 4 down from the top in your Cmake-gui screen shot, its called OCCT_CMAKE_FALLBACK, you will then get three new occt directory options, they will be pointing to the correct directories for the installed default OCCT so you have to change them to the correct sub directories under the custom "install directory" that you set when you compiled OCCT.
So in summary again, to compile Occ,
build out of tree (meaning not in the sourcecode directory),
run cmake gui,
make sure you set a new custom install directory (best to simple add a new directory name to the end of the default directory, you create the name but do not have to create the directory as "Make install" will do that for you at install time)
Decide if you want to use TBB or not (the mouse pop up says OCCT will still run in multi threaded mode even without TBB selected)
run "make" to compile occ
then run "sudo make install"
When configuring FreeCAD,
click on OCCT_CMAKE_FALLBACK
then find and select the correct subdirectories for the three OCCT directory settings that show up.
On Ubuntu 18.04, you have to specifically select Python 3 as by default it finds Python 2.7, don't know about on 20.04.
Select TBB if you want it.
Unlike OCC FreeCAD does not need to be installed after compilation, it will run as and where compiled. However if you do want ot install FreECAD for some reason then don't forget top consider changing the default install path.
These are some screen shots of my cmake-gui when configuring to compile FreeCAD, not the settings, for Opencascade and OCCT, I selected OCCT offical rather than OCE community edition in the appropriate setting.
- Screenshot_20201012_152633.png (37.47 KiB) Viewed 458 times
and these directory settings, plus another, need to be set to your previous configured non-default occt install directory, as you can see I used the default install directory but added another subdirector to the end of it, this makes finding the correct subdirectories easier. Two are shown here the third is further down named "opencascade directory". The default "install directory" for OCCT when you configured OCC is /usr/local so I just added "/occt_mnaster" to the end so that my occ compiled from occ master would then install every thing into subdirecotries under "/usr/local/occt_master", you can see this isn these pictures.
- Screenshot_20201012_152816.png (15.5 KiB) Viewed 458 times
I did a search for OCCT so that you can see all occ directory path settings
- Screenshot_20201012_152938.png (42.47 KiB) Viewed 458 times
This is the fiorst time that I have compiled OCC fror many years so it always possible that I have missed something and also thta there are changes made over the years as well.
I hope this helps.
Jim