cmake_minimum_required(VERSION 3.16)
project(yt-downloadfe LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network)

add_executable(yt-downloadfe
    main.cpp
    downloaderwindow.h
    downloaderwindow.cpp
)

target_link_libraries(yt-downloadfe
    Qt6::Core
    Qt6::Widgets
    Qt6::Network
)

if(WIN32)
    set(EXE_ICON "app.rc")
endif()

# Pass the .rc file as a source file
add_executable(qt-downloadfe main.cpp ${EXE_ICON})
