I have this simple CMake file
cmake_minimum_required(VERSION 2.8)
project(test)
set(SOURCES source.cpp)
add_executable(test ${SOURCES})
where source.cpp is a simple hello world program. I then generate the Visual Studio project
cmake -G"Visual Studio 14 2015" ..\Sources
The generated Visual Studio project has the following libraries, under Configuration Properties > Linker > Input > Additional Dependencies
:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
If I remove these libraries I can still successfully build and run the hello world.
Why does CMake add all these libraries and what can I do to not have them in my projects?