cmake_minimum_required(VERSION 3.5)
include(ExternalProject)

set(ENTITY_X_OPTIONS
  -DENTITYX_BUILD_TESTING=OFF
  -DENTITYX_BUILD_SHARED=OFF
  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
  -DCMAKE_INSTALL_PREFIX=${ARTIFACT_DIRECTORY}
)

ExternalProject_Add(
  project_entityx
  PREFIX entityx
  CMAKE_ARGS "${ENTITY_X_OPTIONS}"
  SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/entityx"
  INSTALL_DIR ${ARTIFACT_DIRECTORY}
)
