cmake_minimum_required(VERSION 3.20)
project(BedrockLocalController LANGUAGES CXX)
if(NOT WIN32 OR NOT MSVC)
  message(FATAL_ERROR "Build with an x64 MSVC Windows toolchain")
endif()
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
  message(FATAL_ERROR "The controller must be built for x64")
endif()
add_executable(BedrockController WIN32 Controller.cpp)
target_compile_features(BedrockController PRIVATE cxx_std_20)
target_compile_options(BedrockController PRIVATE /W4 /utf-8)
set_property(TARGET BedrockController PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_link_libraries(BedrockController PRIVATE user32 gdi32 shell32 advapi32)
