cmake_minimum_required(VERSION 3.10)

project(DiaryApp)

# Set the compile options to handle UTF-8 source files correctly
add_compile_options(/utf-8)

# Add the executable
add_executable(DiaryApp src/main.cpp src/DiaryApp.rc)

# Add unicode definitions
target_compile_definitions(DiaryApp PRIVATE UNICODE _UNICODE)

# Link against necessary libraries
target_link_libraries(DiaryApp PRIVATE user32 gdi32 gdiplus)

# Set properties for a Windows application
set_target_properties(DiaryApp PROPERTIES
    WIN32_EXECUTABLE TRUE
)

# To make Visual Studio generate a project that can be opened directly
set(CMAKE_SUPPRESS_REGENERATION 1)
