cmake_minimum_required(VERSION 3.25.1)

set(CMAKE_CXX_STANDARD 20)

set(PROJECT_EXECUTABLE_NAME oe_editor)

set(CMAKE_BUILD_RPATH ".")

project(SandBox
    VERSION 0.1.0
)

find_package(imgui REQUIRED CONFIG)
find_package(spdlog REQUIRED CONFIG)
find_package(EnTT REQUIRED)

file(GLOB_RECURSE SRC_FILES "src/*.cpp")
add_executable(${PROJECT_EXECUTABLE_NAME}
    ${SRC_FILES}
)

target_include_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE
    "${PROJECT_SOURCE_DIR}/include"
    "${PROJECT_SOURCE_DIR}/editor/include"
    "/usr/include/freetype2/"
)

target_link_libraries(${PROJECT_EXECUTABLE_NAME} PRIVATE
    spdlog::spdlog
    imgui::imgui
    open_engine
    dl
    nethost
    freetype
    EnTT::EnTT
)

target_link_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE
    ${PROJECT_SOURCE_DIR}/lib
    /usr/share/dotnet/packs/Microsoft.NETCore.App.Host.arch-x64/10.0.3/runtimes/arch-x64/native
)
