Wireshark-dev: Re: [Wireshark-dev] cmake / OSX - FindM.cmake
From: Edwin Groothuis <Edwin.Groothuis@xxxxxxxxxxxx>
Date: Mon, 14 Mar 2016 03:27:56 +0000

I got it. Invoking cmake as:

 

$ cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ .

 

does do it cleanly. Also for PCAP. Also for ZLib.

 

Edwin

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Edwin Groothuis
Sent: Monday, 7 March 2016 13:02
To: Developer support list for Wireshark
Subject: [Wireshark-dev] cmake / OSX - FindM.cmake

 

Greetings,

 

After the Windows adventures (which were successful at the end!) I have been asked to provide OSX packages too. After three days of blood, sweat and tears I’ve been able to build the packages and it’s all find except for one thing: I can’t get cmake/modules/FindM.cmake to work:

 

   Called from: [2]     /Users/apacsupport/dev/wireshark-rvbd/cmake/modules/FindM.cmake

                [1]     /Users/apacsupport/dev/wireshark-rvbd/CMakeLists.txt

CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):

  Could NOT find M (missing: M_INCLUDE_DIR)

Call Stack (most recent call first):

  /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)

  cmake/modules/FindM.cmake:43 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  CMakeLists.txt:810 (find_package)

 

   Called from: [2]     /Users/apacsupport/dev/wireshark-rvbd/cmake/modules/FindM.cmake

                [1]     /Users/apacsupport/dev/wireshark-rvbd/CMakeLists.txt

-- Configuring incomplete, errors occurred!

 

I’m building this on OS X 10.10. A “find / -name math.h” showed it was not at an expected location like /usr/include but here at:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/math.h

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1/tr1/math.h

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/math.h

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/simd/math.h

 

 

I’ve currently ‘fixed’ it by adding “SET(M_INCLUDE_DIR .)” in the file, but I would be really great if this was fixed properly by somebody with CMake clue :-)

 

Edwin