[CMake] Multiple project

Romain LEGUAY romain.leguay at gmail.com
Mon Jul 9 12:32:55 EDT 2012


Thanks for your answer!

But I think if I do a 'cmake .' in lib dir or a application folder, I am 
going to have some problem no?

Romain

Le 09/07/12 18:14, J Decker a écrit :
> ${CMAKE_SOURCE_DIR} this is the directory of the root CMakeLists.txt
> that is processing, you can base your other paths off of that.
>
> On Mon, Jul 9, 2012 at 6:58 AM, Romain LEGUAY <romain.leguay at gmail.com> wrote:
>> Hello everyone,
>>
>> I have a big project organized like this:
>> root/
>>          -> CMakeLists.txt
>>          CMake/
>>              --> some .cmake scripts
>>          lib/
>>               --> CMakeLists.txt
>>              include/
>>              src/
>>              CMake/
>>                  --> some .cmake scripts
>>          apps/
>>               --> CMakeLists.txt
>>              A_app/
>>                      --> CMakeLists.txt
>>                    src/
>>                    include/
>>
>> For now I have "generic" scripts and I must run CMake at the root path. This
>> way, when I do some modification in my library and I do a make in one of my
>> app, the library is build in first place then the application.
>>
>> Now I want to have an independent comportment for the library building and
>> the applications but I need to keep the former comportment.
>>
>> I success to build my library with independent way but when I try to
>> generate all the makfiles from the root path, it doesn't work: it doesn't
>> found different files from my CMAKE_MODULE_PATH I defined in
>> root/lib/CMakeLists.txt and in root/CMakeLists.txt.
>>
>>
>> Is it possible to have this comportment?
>> Do you have some example or site to help me please?
>>
>>
>> Thank you.
>>
>> Regards,
>> Romain
>>
>>
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list