cmake_minimum_required(VERSION 3.20)
project(RoseBetaLauncher CXX)
set(ROSE_PAYLOAD_SHA256 "" CACHE STRING "Compatible cartridge payload SHA256")
if(NOT ROSE_PAYLOAD_SHA256 MATCHES "^[0-9a-f]+$")
  message(FATAL_ERROR "Provide ROSE_PAYLOAD_SHA256")
endif()
add_executable(RoseRecompiled WIN32 main.cpp)
target_compile_features(RoseRecompiled PRIVATE cxx_std_17)
target_compile_definitions(RoseRecompiled PRIVATE UNICODE _UNICODE
  "ROSE_PAYLOAD_SHA256=\"${ROSE_PAYLOAD_SHA256}\"")
target_link_libraries(RoseRecompiled PRIVATE bcrypt comdlg32 shell32 user32)
if(MINGW)
  target_compile_options(RoseRecompiled PRIVATE -municode)
  target_link_options(RoseRecompiled PRIVATE -municode -static)
endif()
