# global definitions
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time")

if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
endif ()

# output directory
set(CMAKE_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_CONFIG_NAME}")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})

if (${GDZL_EDITOR})
    # the spritesheet packer uses c++17
    set(CMAKE_CXX_STANDARD 17)
    add_compile_definitions(GDZL_EDITOR=1)
endif ()
