#-------------------------------------------------------------------
# This file is part of the CMake build system for Scol
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

############################################################
# Nonin plugin CMakeList
############################################################

PROJECT(neurosky)

# define header and source files for the library
set (NEUROSKY_HEADER_FILES
  include/neurosky.h
  include/plugin.h
)

if (Scol_STATIC)
  set (NEUROSKY_HEADER_FILES ${NEUROSKY_HEADER_FILES} include/loadScolNeurosky.h)
endif()

set (NEUROSKY_SOURCE_FILES
  src/neurosky.cpp
  src/plugin.cpp
)

scol_include_plugin("NEUROSKY" "${PROJECT_SOURCE_DIR}/include" "loadScolNeurosky.h")

# Add directories includes
include_directories(include ${NEUROSKY_INCLUDE_DIRS})

# Add definition for P4 optimizations, warnings removal.
add_definitions(-DOPTI_P4 -D_CRT_SECURE_NO_WARNINGS)

set(LIBRARIES ${NEUROSKY_LIBRARIES})

# setup Scol neurosky plugin target
add_library(neurosky
  ${Scol_LIB_TYPE}
  ${NEUROSKY_HEADER_FILES}
  ${NEUROSKY_SOURCE_FILES}
)
add_dependencies(neurosky kernel)

# set the dll version.
#set_target_properties(neurosky PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR})
target_link_libraries(neurosky ${LIBRARIES})

# install Scol neurosky
scol_config_plugin(neurosky)
#install(FILES ${NEUROSKY_HEADER_FILES} DESTINATION include/SCOL/plugins/neurosky)