Barth,

Personally I have no experience at all with packaging through CMake, but 
presumably you’ll need something like a CPackConfig.cmake in the top level 
folder?

Beyond that, I think you’ll need to provide a bit more details about your 
environment. My guess is you work on linux, as the setup you provide and the 
behaviour you describe wouldn’t work on Windows with Visual Studio for 
instance. Thinking a bit more, actually I think there is nothing in CMake that 
allows you to do the ‘make’, ‘make test’ etc both from the top level as well as 
the sub projects. My feeling is you did some magic in the top level to make 
this happen. You’ll need to provide some details for others to be able to help 
you further


Sincerely,
Jakob

> On 18 Aug 2015, at 09:54, Barthelemy Von Haller 
> <barthelemy.von.hal...@cern.ch> wrote:
> 
> 
> Barthelemy Von Haller <Barthelemy.Von.Haller@...> writes:
> 
>> 
>> 
>> Hello,
>> 
>> I have a projects looking like this : 
>> Repo
>> .
>> ├── CMakeLists.txt
>> ├── ProjA
>> │   ├── cmake
>> │   │   └── CPackConfig.cmake
>> │   ├── CMakeLists.txt
>> │   ├── doc
>> │   ├── include
>> │   ├── src
>> │   └── test
>> ├── ProjB
>> │   ├── cmake
>> │   │   └── CPackConfig.cmake
>> │   ├── CMakeLists.txt
>> │   ├── doc
>> │   ├── include
>> │   ├── src
>> │   └── test
>> └── More projects...
>> Each project (ProjA, ProjB, ...) is buildable on its own. It can be
> tested, installed and packaged alone.
>> 
>> I want to be able to do the same from the top directory as well. In this
> case, it would apply the target to all subprojects.
>> 
>> It works fine for "make", "make test", "make install" but not for "make
> package". With the latter, only the last project is packaged not the others.
>> 
>> Is there a clean way to call CPack from the top directory ?
>> Thank you, 
>> Barthelemy
>> 
>> 
>> 
> 
> Dear all, 
> 
> I did not get any reply to my enquiry about running "make package" from a
> top directory containing several sub projects. 
> 
> Does anyone has an idea ? 
> 
> Best regards,
> Barth
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to