>>> On 7-12-2010 at 11:59, in message <aanlktimssr9mqjgkhkz9xdtgh=1b9vsu1utlb90vb...@mail.gmail.com>, Klaim <mjkl...@gmail.com> wrote: >> >> I would try to start with just one (base-)project, try to get >> everything in place and building the way you want it. If you're new to >> CMake, that's really the way to go. Once you have this base-project >> ready, you can think of starting a second project, using the >> base-project as EXTERNAL_PROJECT(), etc. >> >> > Yes, I started like that exactly. > I've setup a simple library project, with the minimum CMakeLists.txt file. > It generates correctly, find all required sources, correctly build when I > try to build with MSVC2010. > > Now I tried to setup an executable project using this library project. > Maybe I'm kind of stupid but I can't find a clear exlpaination/documentation > about using EXTERNAL_PROJECT() so I failed so far to use it. Do you have a > simple example somewhere? I'm sure I missed something in the doc but can't > find what. > > I'm also looking for a way to provide/retreive the include paths of those > external projects.
Hi Klaim, I would suggest that you use the FIND_XXX commands when building against your CMakeified library project. EXTERNAL_PROJECT() really is meant for downloading, configuring, building, etc. of non-CMake packages. Since you have full control over all your different CMake projects, your life is (much) easier. All you have to do is to generate ConfigXXX.cmake files for your XXX library. These ConfigXXX.cmake files should set the same variables as a FindXXX.cmake file would. Only difference is that you can generate the ConfigXXX.cmake file using the information about XXX availabe to CMake. Hope this helps, Marcel Loose. _______________________________________________ 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