target_link_libraries are ignored if target is static library on MSVC
CMake 3.8.0 on Windows 10.
How to reproduce:
-
Define target as static library
add_library(${LIB_NAME} STATIC ${_source_list})
-
Add target link library
target_link_libraries(${LIB_NAME} PRIVATE "somelib.lib")
-
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.