[CMake] Changing the default name "CMakeLists.txt"

Martin Lütken mlu at danware.dk
Thu Aug 30 10:37:50 EDT 2007




 

>> I know this option, but I have very good reasons which makes this 
>> option less usefull :)
>> So I would need to change the cmake source code I suppose ?
>>
>Yes, you're right.
>By the way, could you tell us why it is so important to not have any 
>CMakeLists.txt ?

>--Sylvain

The thing is that I am trying to make a sort of "unified" or "common build system" (cbs) for which I
use cmake. The idea was that open source projects could maintain such a cbs-makefile, which combined
with a set of common cmake files would make it very easy to to use 3rd party libraries within your own code.

A short intro is on the very preliminary web page (cpaf.sourceforge.net) repeated here:
---------------------------------------------------------------
The cmake based build system along with associated python helper scripts have been factored out as a seperate project located in cpaf/cbs for now. The general idea is to supply a general and very simple way to produce a cbs/cmake file(s) for a project (e.g. a library) and then this library can build seamlessly together with other "cbs-enabled" libs/apps.

In your top level directory of your own project you also keep a myprj.BuildConfig.cmake file which contains a use entry/line for every library you want to enable/use in your project like this:

# --- 3RD PARTY LIBRARIES ---
SET ( z_USE                         SYSTEM   )  # Use system installed version
SET ( png_USE                       BUILD    )  # Build from local source code
SET ( bz2_USE                       DISABLED )  # Don't use this lib at all
SET ( boost_USE                     PREBUILT )  # Use allready locally (cbs) compiled version of boost.

# Other build options
SET ( z_LINK_TYPE                   STATIC    ) # Force static version of zlib even when cbmake.py -l shared is used.   



So the (perhaps naive) hope is that many open source SW projects will pick up the idea and provide cbs build files for their code. See the "CBS Introduction" page how simple it really is to use this system.

--------------------------------------

The reason I would like another default CMakeLists.txt name is that I don't want to conflict with projects  using cmake allready for their build process.
-Martin L

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070830/5e249e75/attachment.html


More information about the CMake mailing list