this happens when adding as a external project in a multi-config generator
the following fixes this
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
message(STATUS "CMAKE_BUILD_TYPE is not specified, default to Release. Note that this is only relevant for single-configuration generators (such as Makefile Generators and Ninja).")
endif()