[CMake] ExternalProjects with Visual Studio

Titus von Boxberg titus at v9g.de
Mon Oct 15 09:31:22 EDT 2012


Hi all,

my C++ sources are split into several (static) libraries and
an executable that uses the static libs.
All of those source modules have CMake configurations.

I'm using ExternalProject_Add in the executable's CMakeLists.txt
together with target_link_libraries
to add the static libs to the executable's project.

All that works well under UNIX and Windows.

However, when opening the sln with Visual Studio, the project files
of the libraries do not contain the sources; they are only placeholders
to build the libraries for the executable.
That's clear to me since the "real" vcxproj files within the
libraries are generated during the configure step of the
ExternalProject build and are unavailable at the time the
executable's sln or vcxproj are generated by cmake.

My question is: Is there an automatic way to get sln and vcxproj
files for the executable that reference the "real" vcxproj files
of the libraries instead of the placeholders?

Thanks in advance

Regards
Titus


More information about the CMake mailing list