On Thu, Feb 14, 2019 at 12:39 PM Craig Scott <craig.sc...@crascit.com> wrote:
> I think you might be looking for the LINK_DEPENDS_NO_SHARED target property 
> (or more likely its associated CMAKE_LINK_DEPENDS_NO_SHARED variable).

After my previous response I experimented a little more, and I got it
to work. My mistake was that I needed to add the configuration line to
the executable target, not the lib. So in my example, add the
following line to the Demo/CMakeLists.txt file:

set_target_properties(helloDemo PROPERTIES LINK_DEPENDS_NO_SHARED true)

..and it works like a charm. I wonder why this isn't the default
behavior; can you think of any scenario where this would produce
invalid results?

Thanks for your help!

itay
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to