I am trying to configure the project Theia-SfM to compile with XCode on a Mac.
Using CMake 3.5.1 installed via Macports via XCode the package configures and builds fine once the appropriate dependencies are installed, e.g.
cmake -G XCode ..
-- Generating done
-- Build files have been written to: /Users/alex/src/TheiaSfM/build
-- Found SuiteSparse 4.2.1
-- Check for ImageMagick
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find ImageMagick (missing: ImageMagick_convert_EXECUTABLE
Alexs-MacBook-Pro:TheiaSfM alex$ type -a mogrify
mogrify is /opt/local/bin/mogrify
-- Found Google Flags: /opt/local/include in namespace: google
-- Check for Google Log
-- Found Google Logging: /opt/local/include
-- Check for Ceres
Is there any obvious reason why identical versions of CMake would fail to find the same package?
Different ways of installation may result in different settings of default search paths. You may set
CMAKE_PREFIX_PATH variable to
/opt/local and all your packages there will be found.
I'm assuming /opt/local is in my CMake GUI paths search paths, because further up it finds other dependencies there.
Not quite true.
For search Google Flags, your project (Theia-SfM) uses shipped script FindGFlags.cmake, which explicitely searches the package at
/opt/local (see definition and usage of variable
For searching ImageMagic it uses standard CMake script, which doesn't explicitely search at