# Enable compiler warnings for everything within this directory
add_compile_options(${WARNING_FLAGS})

if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT TARGET_PLATFORM STREQUAL "PS4")
    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL:NO")
endif()

if(TARGET_PLATFORM STREQUAL "Android")
    add_subdirectory(android/native)
elseif(TARGET_PLATFORM STREQUAL "iPhone" OR TARGET_PLATFORM STREQUAL "AppleTV")
    add_subdirectory(ios)
elseif(TARGET_PLATFORM STREQUAL "OSX")
    add_subdirectory(osx)
elseif(TARGET_PLATFORM STREQUAL "PS4")
    add_subdirectory(options)
    add_subdirectory(ps4)
elseif(TARGET_PLATFORM STREQUAL "WinStore" OR TARGET_PLATFORM STREQUAL "XboxOne")
    add_subdirectory(options)
    add_subdirectory(uwp)
elseif(TARGET_PLATFORM STREQUAL "Win64")
    add_subdirectory(options)
    add_subdirectory(windows)
elseif(TARGET_PLATFORM STREQUAL "Posix")
    add_subdirectory(posix)
endif()
