with the help of @HolyBlackCat and @Tsyvarev I finally found a working CMakeLists.txt. The ncurses specific directories have been added as well as the STATIC directive to enable linking in the windows environment.
cmake_minimum_required(VERSION 3.5.0)
project(hanoi VERSION 0.1.0 LANGUAGES C)
set(SOURCE_FILES hanoi.c)
include_directories("C:\\msys64\\ucrt64\\include\\ncurses")
link_directories("C:\\msys64\\ucrt64\\lib")
add_compile_options(-DNCURSES_STATIC)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ncurses)