cmake_minimum_required(VERSION 3.18.1)
project("kde")

set(CMAKE_CXX_STANDARD 14)

# INTEGRATION Füge deine CPP/H Dateien hier hinzu
set(kde_SRCS
        Profiling.h
        Renderer.cpp
        Renderer.h
        Texture.cpp
        Texture.h
        AssetManager.cpp
        AssetManager.h
        StringRepository.h
        StringRepository.cpp
        Hash.h
        Hash.cpp
        GameState.h
        Font.cpp
        Font.h)

if (ANDROID)
    message(STATUS "Building for Android")

    find_library(log-lib log)
    find_package(game-activity REQUIRED CONFIG)
    find_package(games-frame-pacing REQUIRED CONFIG)    

    add_library(kde SHARED
            ${kde_SRCS}
            kde.cpp
            NativeEngine.cpp
            NativeEngine.h
            AndroidAssetManager.cpp
            AndroidAssetManager.h)
    target_link_libraries(kde ${log-lib}
            EGL
            GLESv3
            android
            game-activity::game-activity
            games-frame-pacing::swappy_static)
elseif (WIN32)
    message(STATUS "Building for Windows")

    add_executable(kde
        ${kde_SRCS}
        win32_kde.cpp
        glad.c
        glad.h
        Win32AssetManager.cpp
        Win32AssetManager.h)
    target_link_libraries(kde glfw TracyClient)
    target_include_directories(kde PRIVATE ${Tracy_SOURCE_DIR}/public)
endif()