How to add different target types for different configuration_types for Visual Studio generator?

How to add different target_types for configuration_types,
eq:Release - Executable
AA_Release(custom_config) - Static_library
How to configure so that when we open the solution file in visual studio, in properties we should be able to see the correct target types for the different configuration_types?

Configurations are mostly about flag selection. Target types should not change between configurations.

Thanks Ben, but if I have such a requirement is there any workaround to fix it?
Right now I am following the steps as below:

  1. Configure using command : cmake -H. -B_builds “-DCMAKE_BUILD_TYPE=Debug” -G “Visual Studio 14 2015” -A Win32
  2. Conditions like this:if("${CMAKE_BUILD_TYPE}" STREQUAL “Debug” )
    and add the required target_type
    This works but the problem is when i open the solution file in Visual Studio The target type(exe or dll) of that project for the Debug will be correct. But when i choose Release/ any other custom config from the Visual Studio drop down it wont be correct.

There is no way to do this. Some generators are “multi-config”, meaning that the build configuration is specified at build time, not at CMake configure time. This is what generator expressions are for. But as far as I know, it is not possible to conditionalize target types using generator expressions.

Thanks Ben