#------------------------------------------------------------------- # This file is part of the CMake build system for OGRE # (Object-oriented Graphics Rendering Engine) # For the latest info, see http://www.ogre3d.org/ # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- # - Try to find NEUROSKY # Once done, this will define # # NEUROSKY_FOUND - system has NEUROSKY # NEUROSKY_INCLUDE_DIRS - the NEUROSKY include directories # NEUROSKY_LIBRARIES - link these to use NEUROSKY include(FindPkgMacros) findpkg_begin(NEUROSKY) # Get path, convert backslashes as ${ENV_${var}} getenv_path(NEUROSKY_HOME) # construct search paths set(NEUROSKY_PREFIX_PATH ${NEUROSKY_HOME} $ENV{SCOL_DEPENDENCIES_PATH}/neurosky ) create_search_paths(NEUROSKY) # redo search if prefix path changed clear_if_changed(NEUROSKY_PREFIX_PATH NEUROSKY_THINKGEAR_INCLUDE_DIR NEUROSKY_ALGO_INCLUDE_DIR NEUROSKY_LIBRARY_FWK NEUROSKY_LIBRARY_REL NEUROSKY_LIBRARY_DBG NEUROSKY_INCLUDE_DIR ) if(WIN32 AND (WIN64 OR (CMAKE_SIZEOF_VOID_P EQUAL 8))) set(NEUROSKY_LIBRARY_NAMES AlgoSdkDll64 thinkgear64) set(NEUROSKY_PLATFORM x64) else () set(NEUROSKY_LIBRARY_NAMES AlgoSdkDll thinkgear) set(NEUROSKY_PLATFORM win32) endif () get_debug_names(NEUROSKY_LIBRARY_NAMES) findpkg_framework(NEUROSKY) set(NEUROSKY_INC_SEARCH_PATH ${NEUROSKY_INC_SEARCH_PATH} "$ENV{SCOL_DEPENDENCIES_PATH}/neurosky") set(NEUROSKY_LIB_SEARCH_PATH ${NEUROSKY_LIB_SEARCH_PATH} "$ENV{SCOL_DEPENDENCIES_PATH}/neurosky") #message(alert ${NEUROSKY_INC_SEARCH_PATH}) find_path(NEUROSKY_ALGO_INCLUDE_DIR NAMES NSK_Algo.h HINTS ${NEUROSKY_INC_SEARCH_PATH} PATH_SUFFIXES "" "EEG_Algo_SDK_Windows/Include") find_path(NEUROSKY_THINKGEAR_INCLUDE_DIR NAMES thinkgear.h HINTS ${NEUROSKY_INC_SEARCH_PATH} PATH_SUFFIXES "" "Stream SDK for PC/libs/${NEUROSKY_PLATFORM}") find_library(NEUROSKY_LIBRARY_REL NAMES ${NEUROSKY_LIBRARY_NAMES} HINTS ${NEUROSKY_LIB_SEARCH_PATH} PATH_SUFFIXES "" "Stream SDK for PC/libs/${NEUROSKY_PLATFORM}" Release RelWithDebInfo MinSizeRel ${ANDROID_ABI}) find_library(NEUROSKY_LIBRARY_DBG NAMES ${NEUROSKY_LIBRARY_NAMES_DBG} HINTS ${NEUROSKY_LIB_SEARCH_PATH} PATH_SUFFIXES "" "Stream SDK for PC/libs/${NEUROSKY_PLATFORM}" Debug ${ANDROID_ABI}) set(NEUROSKY_INCLUDE_DIR ${NEUROSKY_THINKGEAR_INCLUDE_DIR} ${NEUROSKY_ALGO_INCLUDE_DIR}) make_library_set(NEUROSKY_LIBRARY) findpkg_finish(NEUROSKY)