cmake_minimum_required(VERSION 3.2)

# mathutils settings
include(ExternalProject)

set(MATHUTILS_PROJECT_NAME mathutils)
set(MATHUTILS_GIT_REPOSITORY https://github.com/rxnew/mathutils.git)
set(MATHUTILS_GIT_TAG v1.0)

ExternalProject_Add(
  ${MATHUTILS_PROJECT_NAME}
  GIT_REPOSITORY ${MATHUTILS_GIT_REPOSITORY}
  GIT_TAG ${MATHUTILS_GIT_TAG}
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/projects/${MATHUTILS_PROJECT_NAME}
  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${INSTALL_EXTERNAL_PROJECTS_PREFIX}
  LOG_DOWNLOAD on
  )

set(MATHUTILS_INCLUDE_PATH ${INSTALL_EXTERNAL_PROJECTS_PREFIX}/include)

set(BUILD_EXTERNAL_PROJECT_NAMES ${BUILD_EXTERNAL_PROJECT_NAMES}
    ${MATHUTILS_PROJECT_NAME})
