Solving a difficult compilation issue <p>Good day,</p> <p>First up, I have a mac running Mavericks, and I am attempting to build PCL (Point Cloud Library) as part of ROS.</p> <p>This is the command that fails:</p> <pre><code>cd /Users/X/ros_catkin_ws/build_isolated/pcl_ros &amp;&amp; /Users/X/ros_catkin_ws/install_isolated/env.sh cmake -vd /Users/X/ros_catkin_ws/src/perception_pcl/pcl_ros -DCATKIN_DEVEL_PREFIX=/Users/X/ros_catkin_ws/devel_isolated/pcl_ros -DCMAKE_INSTALL_PREFIX=/Users/X/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release </code></pre> <p>With:</p> <pre><code>CMake Error at /usr/local/share/pcl-1.8/PCLConfig.cmake:47 (message): simulation is required but glew was not found Call Stack (most recent call first): /usr/local/share/pcl-1.8/PCLConfig.cmake:500 (pcl_report_not_found) /usr/local/share/pcl-1.8/PCLConfig.cmake:663 (find_external_library) CMakeLists.txt:8 (find_package) </code></pre> <p>Now, I have done what I can to debug this. Looking up online, I notice this is happening due to the fact that in Mavericks, there is no longer the GLEW.framework <a href="https://github.com/PointCloudLibrary/pcl/issues/492" rel="nofollow">https://github.com/PointCloudLibrary/pcl/issues/492</a></p> <p>Hence, I installed it via brew, and yet I still get the same issue. Now, I'm thinking, perhaps cmake cannot find it, so I created my own cmake project, and attempted to add find_package(glew). It seems to have found the package here:</p> <pre><code>-- Found GLEW: /usr/local/include </code></pre> <p>Hence, I included /usr/local/include in my $PATH variable. Yet once again, it seems to fail with the same error. I am kind of at a lost here, and am not sure how to continue. I am speculating that in the command above, it seems that somehow the env.sh there seems to change the environmental variables such that it can't find glew.</p> <p>Any thoughts?</p> <p>EDIT: <strong>More absurdity. I create a CMake file and included find_package(PCL). It works perfectly. WTF? It even says it found glew</strong></p> <pre><code>Found Glew: -framework GLEW;-framework Cocoa </code></pre> <p>How come it works in my Cmake file, but not in theirs? What might cause this</p>