cmake_minimum_required(VERSION 3.20)

if (DEFINED PLATFORMNAME)
    SET(CURRPLATFORM ${PLATFORMNAME})
else ()
    SET(CURRPLATFORM "linux-64")
endif (DEFINED PLATFORMNAME)


set(CMAKE_CXX_FLAGS "-std=c++11 -w -g -Wno-error -O0")
file(GLOB_RECURSE ENDLAUNCHER "src/*.cpp")
add_executable(endlauncher ${ENDLAUNCHER})

set_target_properties(endlauncher PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/built/launcher/${PLATFORM_DIR}"
)
target_link_directories(
        endlauncher PUBLIC
        "${CMAKE_SOURCE_DIR}/link/${PLATFORMNAME}")
target_link_libraries(endlauncher PRIVATE
        enginend
        raylib
        curl zip
)
target_include_directories(endlauncher PUBLIC
        ${CMAKE_SOURCE_DIR}/include
)
