Using the Eclipse CDT project generator isn't different than using any other CMake generator
cd build
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
Wait for a succesfull compiler generation:
-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- OPENCV_LIBRARIES=opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;opencv_objdetect;opencv_nonfree;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;opencv_contrib;opencv_calib3d
-- OPENCV_INCLUDE_DIRS=/usr/local/include/opencv;/usr/local/include
-- Boost version: 1.56.0
-- Found the following Boost libraries:
-- serialization
-- BOOST_LIBRARIES=optimized;/usr/local/lib/libboost_serialization.a;debug;/usr/local/lib/libboost_serialization-mt.a
-- BOOST_INCLUDE_DIRS=/usr/local/include
-- Linking against boost static libraries.
-- Configuring done
CMake Warning in CMakeLists.txt:
The build directory is a subdirectory of the source directory.
This is not supported well by Eclipse. It is strongly recommended to use a
build directory which is a sibling of the source directory.
-- Generating done
-- Build files have been written to: /Users/bobetocalo/Documents/workspace/TheGraffter/libobjlocator/build
You will now find two Eclipse files in your build tree:
build/.project
build/.cproject
Finally, overwrite the old project: New C++ Project > Makefile Project > Empty Project > Cross GCC Uncheck the Use default build command and insert the following
make -C ${ProjDirPath}/build
Help > Install New Software and enter the site location: http://cmakeed.sourceforge.net/eclipse/