[CMake] How to manage dependencies between projects in Visual Studio

Luca Gherardi luca.gherardi at unibg.it
Wed Feb 5 08:04:25 EST 2014


Hi Peter,

 

I tried to use the include_external_msproject(PROJECT_NAME PATH_TO_VCXPROJ)

 

The project is included in the solution, however when I try to build the
solution VS returns the following error:

 

“The operation could not be completed. The parameter is incorrect”

 

No other information.

Any idea?

 

Thanks,

Luca

 

 

 

From: Petr Kmoch [mailto:petr.kmoch at gmail.com] 
Sent: mercoledì 5 febbraio 2014 12:34
To: Luca Gherardi
Cc: cmake at cmake.org
Subject: Re: [CMake] How to manage dependencies between projects in Visual
Studio

 

Hi Luca.

You could look into the CMake command include_external_msproject(), or into
the ExternalProject module.

Petr

 

On Wed, Feb 5, 2014 at 12:19 PM, Luca Gherardi <luca.gherardi at unibg.it
<mailto:luca.gherardi at unibg.it> > wrote:

I’m working with Visual Studio and I need to create the CMakeLists files for
the following scenario.

 

I have a project A, which contains the sources for a library.

This project has its own CMakeLists and generates a lib (add_library).

 

I have a second project B, which contains the sources from an executable and
uses the library generated by A.

I would like to setup its CMakeLists in such a way that:

 

-        The Visual Studio solution generated from the CMakeLists of B
includes the projects for A and B

-        The project A should be just a link to the project generated with
the CMakeLists of A. In other words I would like to avoid duplications of
compilation files. I would like that the file generated for A by a
compilation started from the solution of A were stored in the same path of
the file generated for A by a compilation started from the solution of B.

 

Is that possible?

I know it is possible to do it with visual studio, but I don’t know how to
do it with CMake.

 

Thanks in advance.

 

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

Luca Gherardi, PhD
Postdoc at ETH Zurich
Institute for Dynamic Systems and Control
Room ML K 34
Sonneggstrasse 3 - 8092 Zurich

SWITZERLAND


Office: +41 44 632 73 55 <tel:%2B41%2044%20632%2073%2055> 
Mobile: +41 788 833 174 <tel:%2B41%20788%20833%20174> 
Home: http://www.lucagherardi.it

 


--

Powered by www.kitware.com <http://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://www.cmake.org/mailman/listinfo/cmake

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140205/50320af4/attachment.html>


More information about the CMake mailing list