[CMake] CMake CDT generator

tinauser at libero.it tinauser at libero.it
Sat Sep 18 05:09:35 EDT 2010


Dear list,
I'm trying to use CMake to move a project from XCode to Eclipse CDT.
I have A CMakeList text that generate a working project in XCode. I tryed to 
use it for Eclipse, but I have some unexpected result.

-I have the soruce folder called src, where the CMakeLists is located.
-I run Cmake from a folder called build.
-In the CmakeLists I have the following commands:
__________________________________________
SET ( HEADERS
	async.h
	bool.h)

SET ( SOURCES
	buffer.c
	buff_manager.c)

IF (DARWIN)
  SET ( MACOSX_APP MACOSX_BUNDLE )
ENDIF (DARWIN)

ADD_EXECUTABLE ( eyeseecam ${MACOSX_APP}
	${HEADERS} ${SOURCES}
)
_____________________________________________

-I run ccmake ../ -G"Eclipse CDT4 - Unix Makefiles" , because in the parent 
folder of build I have another CMakeLists that just set the project name and 
send to the src folder:
___________________________________________
CMAKE_MINIMUM_REQUIRED ( VERSION 2.4 )
CMAKE_POLICY ( SET CMP0003 NEW )
PROJECT(MyProject)
if (APPLE)
  set(CMAKE_OSX_ARCHITECTURES i386)
  #set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
endif (APPLE)
SUBDIRS(src)
_____________________________________________

-With the ccmake, I set the CMAKE_BUILD_TYPE as Debug
and the [B]CMAKE_ECLIPSE_EXECUTABLE[\B] as [B]/Applications/eclipse/Eclipse.
app [\B].

Then I Import the .project, however:
1. Source and Headers are not imported
2. I don't have the CDT Builders, but only a CMakeBuilder. 
Because of this I can run the executable, but I can not modify/debug the code.

Am I doing something wrong?
Any help is greately appriciated

PS
I posted this question also on the CDT forum but...in 3 days, no answer(I also 
reformulated the question).Hope to have more succes here.


More information about the CMake mailing list