# Matlab toolbox of functions from BDM

cmake_minimum_required(VERSION 2.6)
PROJECT(bdmtoolbox)

# Link it to BDM
SET(BDM_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../library")
SET(CMAKE_MODULE_PATH "${BDM_SOURCE_DIR}/system")

# Load BDM environment
INCLUDE(SetBdmEnv)

include_directories (${BDM_SOURCE_DIR}/bdm)
link_directories (${BDM_SOURCE_DIR}/bdm)

# no simulator needed...
EXEC(testbidiff)


###STUFF with SIMULATOR

## Build simulator
add_subdirectory (simulator_zdenek)
add_subdirectory (simulator_zdenek/ekf_example)

## Use it
include_directories (./simulator_zdenek)
link_directories (./simulator_zdenek)
link_directories (./simulator_zdenek/ekf_example)

EXEC (pmsm_estim pmsmsim ekf_obj)
MEX (pmsm_estim pmsmsim ekf_obj)
#EXEC (sim pmsmsim)
#EXEC (sim_var pmsmsim)

add_subdirectory (TR2245)
