SET(ENTITYX_ROOT ${ROKLEGEND_DEPENDENCIES_DIR}/entityx)

ADD_SUBDIRECTORY(${ENTITYX_ROOT})
RO_TARGET_ENABLE_AVX2(entityx)

FIND_PACKAGE(EntityX)

IF ("${ENTITYX_INCLUDE_DIR}" STREQUAL "ENTITYX_INCLUDE_DIR-NOTFOUND")
	MESSAGE("Failed to find EntityX include directory! Setting it manually.")
	SET(ENTITYX_INCLUDE_DIR ${ENTITYX_ROOT})
ENDIF ()
SET(ENTITYX_LIBRARIES debug ${ROKLEGEND_LIB_DIR}/Debug/entityx-d.lib optimized ${ROKLEGEND_LIB_DIR}/Release/entityx.lib)