This fails with the error "Cannot find source file: WIN32. Tried extensions..."
add_executable(${PROJECT_NAME} $<$<CONFIG:Release>:WIN32> main.cpp)
I need this in order to launch the app in the console in Debug mode and being able to read information printed to the console.
And as far as I know it's wrong and is advised agains in the cmake docs to check CMAKE_BUILD_TYPE being Release directly.