ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] cmake / OSX - FindM.cmake

From: Edwin Groothuis <Edwin.Groothuis@xxxxxxxxxxxx>
Date: Mon, 7 Mar 2016 02:01:47 +0000

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