CMake OSX Command line vs GUI Differences
<p>I am trying to configure the project Theia-SfM to compile with XCode on a Mac. </p>

<p><a href="https://github.com/sweeneychris/TheiaSfM" rel="nofollow">https://github.com/sweeneychris/TheiaSfM</a></p>

<p>Using CMake 3.5.1 installed via Macports via XCode the package configures and builds fine once the appropriate dependencies are installed, e.g. </p>

<pre><code>mkdir Build
cmake -G XCode ..

-- Generating done
-- Build files have been written to: /Users/alex/src/TheiaSfM/build
</code></pre>

<p>If using CMake GUI 3.5.1 downloaded from KitWare, and installed via applications, the same build fails to find ImageMagick. Output ends: </p>

<pre><code>-- Found SuiteSparse 4.2.1
-- Check for ImageMagick
ImageMagick_EXECUTABLE_DIRImageMagick_EXECUTABLE_DIR-NOTFOUND
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find ImageMagick (missing: ImageMagick_convert_EXECUTABLE
  ImageMagick_mogrify_EXECUTABLE ImageMagick_convert_EXECUTABLE
  ImageMagick_mogrify_EXECUTABLE)
</code></pre>

<p>ImageMagick is demonstrably installed (via macports) in /opt/local/bin. </p>

<pre><code>Alexs-MacBook-Pro:TheiaSfM alex$ type -a mogrify
mogrify is /opt/local/bin/mogrify
</code></pre>

<p>Is there any obvious reason why identical versions of CMake would fail to find the same package? I'm assuming /opt/local is in my CMake GUI paths search paths, because further up it finds other dependencies there. </p>

<pre><code>-- Found Google Flags: /opt/local/include in namespace: google
-- Check for Google Log
-- Found Google Logging: /opt/local/include
-- Check for Ceres
</code></pre>

<p>More generally, is there an active forum for CMake USAGE questions? The whole of CMAKE seems very poorly documented and fails in myriad confusing ways. Simple examples of adding executables and files are useless in understanding these breaks when the majority of failures happen when building large open-source systems with many dependencies. </p>

<p>Additionally, many projects using CMake have low levels of support, e.g. not a project-specific forum for questions and/or are abandoned, and it feels like there should be a public forum for general "how do I get CMAKE to find xxxx type questions." </p>

<p>I wouldn't mind the feeling of spectacularly low productivity (essentially, days of fiddling with command-lines to get a solution that may or may not, compile, link and/or subsequently run in 32 or 64 bit code) if I were new to meta-build systems, but after 15 years of C++ meta-building with Scons, NANT, and others as a game developer, I'm still not quite frankly sure if CMake is an elaborate joke. OpenCV and Bullet are both an excellent examples of projects where it's quicker to just drag the files into your own favorite IDE and start making things compile than to spend days messing with CMake with no obvious support forum.</p>