On 20 August 2015 at 17:33, Howard Rubin <howard.ru...@hl.konicaminolta.us>
wrote:

> I have a C++/CLI LIB (and DLL) that I generate with
> include_external_msproject. I need to link to it from my C++ project, which
> I’m trying to do with target_link_libraries. This gives the below error
> message. Since I’m not creating it with add_library I don’t see how to
> indicate it’s a shared lib.
>
>
>
> How can I indicate the lib is a SHARED lib, or otherwise link to it in a
> CMake project?
>
>
>

Simply put, you cannot use  target_link_libraries() with targets created
with include_external_msproject().
To make it work, just use add_dependencies() instead.
I don't remember how to specify SHARED in this case but I think it totally
depends on the settings of the VS project file.
It's one of the reasons some old project distribute the project file twice,
one as shared library, the other as static library.
-- 

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