I am new to CMake and I am trying Integrate CMake with Eclipse.
Below is the example of the file structure that I have.
PROJECT
- build/linux
- build/linux/Release (Should contain the release libraries and files)
build/linux/Debug (Should contain the debug version of the files)
SRC
- subProject_1
.cpp (all source files) and CMakeLists.txt 1 for this folder (creating a static library) - subproject_2
.cpp (all source files) and CMakeLists.txt 2 for this folder (creating a static library) - subproject_3
.cpp (all source files) and CMakeLists.txt 3 for this folder (creating the executable)
- subProject_1
Include
- subProject_1
.h (all the header files) - subProject_2
.h (all the header files) - subProject_3
.h (all the header files)
- subProject_1
Can you please let me know how would I be able to integrate CMake to Eclipse. I would like to do a in Source build so that I can sub version my code.
I have tried different options of placing the main CMakelist in project folder, project/build/linux folder and so on. I can get the project working but I dont get to see the source folder as well as the include folder on eclipse.
I have tried both 1st and 2nd option specified in http://www.vtk.org/Wiki/CMake:Eclipse_UNIX_Tutorial#CMake_with_Eclipse
It's usually very simple: from a clean build directory, you configure cmake using Eclipse as generator (it's easier if you use cmake-gui), and then you import the build directory into Eclipse (File, Import, General, Existing Projects into Workspace).