When I generate a Visual Studio target with cmake, the generated project file contains the following in the platform properties section:
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
...
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
...
</ItemDefinitionGroup>
I would like to set the property to true from the CMakeLists file. How do I do this?
My project dependencies are set up using TARGET_LINK_LIBRARIES
, but on Linux I can also use, for example:
TARGET_LINK_LIBRARIES(${targetname} "-Wl,--whole-archive" *some libs* "-Wl,--no-whole-archive")
This forces all symbols to link into the target.
With visual studio the way to link all symbols is to specify:
<LinkLibraryDependencies>true</LinkLibraryDependencies>
through the project settings.