[Kde-games-devel] Question about CMakeLists.txt design

Andreas Beckermann b_mann at gmx.de
Wed Apr 19 08:54:01 CEST 2006


On Wednesday 19 April 2006 01:12, Dmitry Suzdalev wrote:
> Thanks, Andreas!
>
> On Tuesday 18 April 2006 18:52, Andreas Beckermann wrote:
> > in libkdegames/carddecks/<subdirectrory>/CMakeLists.txt:
> > file(RELATIVE_PATH current_dir ${base_dir} ${CMAKE_CURRENT_SOURCE_DIR}
> > set(install_dir <install_prefix>/${current_dir}
> > install_files(${install_dir} .*\\.png)
>
> But isn't it simpler to do something like:
>
> install_files( ${DATA_INSTALL_DIR}/kasteroids/sprites/powerups FILES
> png_name1.png
> png_name2.png
> png_name3.png
> png_name4.png
> ....)
>
> And that's all.

Where "all" means: do the same for _every_ directory (currently 11) and keep 
the destination directory correct for each directory...
I'd rather avoid that additional work, if possible.

> And it works :).
> I've already done this in kasteroids/sprites/ subdirectories for example.
> Of course, if I had 200+ pngs that wouldn't be so pretty :).
> And your way is more general.
>
> > include_directories() adds directories to the list of paths where headers
> > are searched. I.e. it adds a "-I<include_directory>" to the compiler
> > lines. You don't need this at all, if you don't compile anything in that
> > CMakeLists.txt file.
>
> OK, so I guess that stuff comes from some auto-convertion-tool :).
> I'll remove it, thanks.
>
> With best wishes,
> Dmitry.

CU
Andi


More information about the kde-games-devel mailing list