[CMake] Visual Studio Express projects don't inherit from parent

John Drescher drescherjm at gmail.com
Mon Aug 16 21:59:15 EDT 2010


On Mon, Aug 16, 2010 at 9:53 PM, Tron Thomas <tron.thomas at frontier.com> wrote:
> On 08/16/2010 10:38 AM, Brian Davis wrote:
>>
>> First off, I don't know the answer to your question, but I am curious how
>> you are getting CMake to create inherited projects.  What are the commands
>> you are suing to create an inherited project in CMake?  This is something I
>> think I can use in my projects.
>>
>>
> I'm not creating inherited projects per se.  I used the include_directories
> command to set the path to a directory that contains header files that
> should be used by multiple targets in the project.  In Visual Studio terms
> this is analogous to applying a setting to the solution.  All the sub
> projects in the solution need to inherit the settings of that solution to
> pick up the header file path.  Because this is not happening automatically
> through the CMake script, I having to go through each project individually
> and select the inherit from parent setting to they all pick up this search
> path.

My guess is that you probably are setting the include_directories in
the wrong place in your root CMakeLists.txt. What I mean is you are
setting this variable after you issue the add_subdirectory() instead
of before.

John


More information about the CMake mailing list