MAP_IMPORTED_CONFIG_XXX with include_external_msproject not working
I have to following lines to try to build the Release version of libusb when my project configuration is set to RelWithDebInfo
include_external_msproject( ${LIBUSB_TARGET_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/MyPathToLibusb/msvc/libusb_dll_2019.vcxproj" )
set_target_properties(${LIBUSB_TARGET_NAME} PROPERTIES MAP_IMPORTED_CONFIG_RelWithDebInfo "Release")
But it still tries to compile the RelWithDebInfo version of libusb (which doesn't exist in the given vcxproj)
Am I doing something wrong or is there a problem. I'm using the CMake version embedded in Visual Studio 2019 version 16.6.2