Skip to content

target_link_libraries are ignored if target is static library on MSVC

CMake 3.8.0 on Windows 10.

How to reproduce:

  1. Define target as static library add_library(${LIB_NAME} STATIC ${_source_list})

  2. Add target link library target_link_libraries(${LIB_NAME} PRIVATE "somelib.lib")

  3. Generate project files for Visual Studio 15 2017

What happens: The target link library is completely ignored. Opening the project in Visual Studio the somelib.lib is not on Librarian Additional dependencies list.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information