cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (EntitiyManager VERSION 0.1.0 LANGUAGES CXX C)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(defaultOptions)

#find_package(Eigen3 REQUIRED NO_MODULE)

IF (NOT TARGET CLI11)
  set(CLI11_TESTING OFF CACHE BOOL "disable testing")
  add_subdirectory(libs/CLI11 EXCLUDE_FROM_ALL)
ENDIF()


IF(NOT TARGET loguru)
  add_subdirectory(libs/loguru EXCLUDE_FROM_ALL)
  set_property(TARGET loguru PROPERTY POSITION_INDEPENDENT_CODE 1)
ENDIF()


IF(NOT TARGET EntityLibrary)
  add_subdirectory(libs/EntityLibrary EXCLUDE_FROM_ALL)
ENDIF()


  

add_library(SimControl STATIC
               
                include/SimControl/SimControl.hpp
                src/SimControl/SimControl.cpp
                
            )


target_link_libraries(SimControl
  PUBLIC  
  CLI11
  pthread
  EntityLibrary
  loguru
)

target_include_directories(SimControl
  PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<INSTALL_INTERFACE:include>
  PRIVATE
    src
  )


add_executable(SimControlApplication
            src/main.cpp
        )

target_link_libraries(SimControlApplication
  CLI11
  SimControl
)

# target_include_directories(EntitiyManagerApplication
#   PRIVATE
#   src)

#
# Everything TEST related
#

