[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Interface targets with their own project in Visual	Studio
From:       Dvir Yitzchaki <Dvir.Yitzchaki () ceva-dsp ! com>
Date:       2016-07-28 20:24:32
Message-ID: 71350F7ED6EBB54AA2D182B26086A1B60114AE2A35 () ILMAIL1 ! corp ! local
[Download RAW message or body]

You can use add_library(STATIC) and add 	

set_target_properties(<target_name> PROPERTIES LINKER_LANGUAGE CXX)

You won't be able to link to the target but you can use INTERFACE_INCLUDE_DIRECTORIES \
etc.

Regards,

Dvir Yitzchaki
Debugger Software Engineer, SDT
    


-----Original Message-----
From: CMake [mailto:cmake-bounces@cmake.org] On Behalf Of Robert Dailey
Sent: Thursday, July 28, 2016 7:05 PM
To: CMake <cmake@cmake.org>
Subject: Re: [CMake] Interface targets with their own project in Visual Studio

On Tue, Jul 19, 2016 at 9:38 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> Hello,
> 
> I'd like to define an INTERFACE library that has header files only but 
> still generates its own project in Visual Studio. The only way to add 
> headers to an interface target that I'm aware of is 
> target_source_files(), which instead of creating a project it will 
> cause the header files themselves to propagate to the actual targets 
> that specify the interface target as a link dependency.
> 
> Is there a way to change this behavior?
> 
> If not, the only workaround I can think of is pretty old-school:
> add_custom_target(), but if I use that I'm not sure I can specify 
> include directories and preprocessor definitions that will be 
> inherited by dependencies. So it seems like I'm forced to choose one 
> or the other.

Anyone have any thoughts on this please?
-- 

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic