[CMake] Using Eclipse CDT, CMake resets Eclipse project configuration frequently

Jonatan Bijl jonatan.bijl at tba.nl
Fri Jan 30 08:00:03 EST 2009


>> I have created an out-of-source build tree (on Windows), with the
>> installation directory as a subfolder of the build trees. The idea is
>> that the compiled binary requires some DLL's, images, 3D models and
>> configuration files, at a location relative to the executable. If the
>> files are changed, they will be copied from the source tree to the
>> installation tree again. Therefore, I need to run "make install all"
>> before running the executable. Because of the executable's  
>> dependency on
>> the other files, I always want to build and install. (I don't expect
a
>> built file to work in itself because it won't be able to find the
>> required files)
>
>
>In such a situation I usually try to "configure_file" things into the  
>build tree such that I can run the executable from the build tree.  
>Also setting EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH for this  
>purpose is very useful. If I need to configure some files differently  
>for the build and install tree, I configure them twice into separate  
>directories (the latter e.g. under ${CMAKE_BINARY_DIR}/InstallFiles).  
>This way I can have different versions of the configured files for the

>build and install tree.
>

I have now set up the tree so that the executables can be run
immediately from where they are created. I use configure_file to copy
the files. The problem is now, that every time I do a re-configure, the
files (including a dll that is very big) are copied. Is there a way of
making sure the files are copied *only* when they are renewed? (and also
making sure they are removed when the original is removed?)

Here is my layout of the project:
My setup is as follows:

Src	//the root of the cmake project 
+-	Bin
|		Main.cxx
+	Lib
|		All other cxx and h files I made
+-	Data
|		Required files (3d models, images, etc.)
+-	Cfg
		Required config files
Debug	//all contents over here is generated by cmake-gui ../src and
make
+-	Bin
|		Main.exe
|		DLLs of 3rd party library
+-	Lib
|		Compiled libXXX.a files
+-	Data
|		Required files (3d models, images, etc.)
+-	Cfg
		Required config files
Thirdparty	//this directory provides the 3rd party libraries we
link 	
|		//	against or include 
+-	Cxxtest
+-	OgreSDK
	+-	Bin
	|	+-	Debug
	|	|		All the DLL's
	|	+-	Release
	|			All the DLL's
	+-	Lib
		Include
		....

-------------------------------------------------------------
This e-mail is intended exclusively for the addressee. If you
are not the addressee you must not read, copy, use or
disclose the e-mail nor the content; please notify us
immediately [by clicking 'Reply'] and delete this e-mail.


More information about the CMake mailing list