Macos CMake Could NOT find MEDFile

Having trouble installing or compiling FreeCAD? Get help here.
nyholku
Posts: 149
Joined: Wed Dec 28, 2016 4:18 pm

Macos CMake Could NOT find MEDFile

Postby nyholku » Fri Dec 30, 2016 11:06 am

When I try to configure the build with CMake (On Macos 10.10.5 Yosemite) with:

cmake -DBUILD_ROBOT="0" -DFREECAD_USE_EXTERNAL_PIVY="1" -DBUILD_FEM_NETGEN="1" -DFREECAD_CREATE_MAC_APP="1" ../FreeCAD-git

it fails as follows:

-- Check for medfile (libmed and libmedc) ...
CMake Error at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find MEDFile (missing: MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cMake/FindMEDFile.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:632 (find_package)

I've looked at most of the related forum post and it seems that a lot of people have had issues with this lately but I do not see a solution or workaround.

Is there a way to disable this dependency as it looks to me like this is not absolute required to compile FreeCAD?
nyholku
Posts: 149
Joined: Wed Dec 28, 2016 4:18 pm

Re: Macos CMake Could NOT find MEDFile

Postby nyholku » Fri Dec 30, 2016 11:34 am

For posterity, the instructions are missing the prerequisite to med-file which you can install like this:

Code: Select all

brew install freecad/freecad/med-file
This allowed CMake to configure the project with this:

Code: Select all

cmake -DBUILD_ROBOT="0" -DFREECAD_USE_EXTERNAL_PIVY="1" -DBUILD_FEM_NETGEN="1"  -DFREECAD_CREATE_MAC_APP="1" ../FreeCAD-git
nyholku
Posts: 149
Joined: Wed Dec 28, 2016 4:18 pm

Re: Macos CMake Could NOT find MEDFile

Postby nyholku » Sun Jan 01, 2017 12:47 pm

For happy ending see:

viewtopic.php?f=4&t=19471