I'll use CMake's example project as an example. So I have this:
cmake_minimum_required(VERSION 3.10)
# set the project name
project(Tutorial)
# add the executable
add_executable(Tutorial tutorial.h)
set_target_properties(Tutorial PROPERTIES LINKER_LANGUAGE CXX)
After I generate the solution, when I open the solution in Visual Studio and go to Project Properties - Configuration Properties - Linker - Input - Additional Dependencies, I see that it links a lot of libraries :

I'd like to prevent user32.lib from linking for this specific project(not for every project in the solution). I tried googling and found this thread: How to avoid linking to system libraries. But I couldn't find a solution.
The reason I'd like to do this is because I'm trying to not link user32.lib in my test project, so I can do the link substitution(also known as link seam) technique to be able to provide my own implementation in the test project, to mock the system calls to be able to test classes that do these system calls.
It already works: I removed the library in the Visual Studio's project properties(as well as added it to the list in the Ignore Specific Default Libraries property), but the problem is that every time the solution is regenerated, the linking of the library gets restored.
