You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindThirdPartyLiveAmpAPI.cmake 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # /*
  2. # * FindThirdPartyLiveAmpAPI.cmake
  3. # *
  4. # * Copyright (c) 2016, Brain Products GmbH. All rights reserved.
  5. # * -- Rights transferred to Inria, contract signed ...
  6. # *
  7. # */
  8. # ---------------------------------
  9. # Finds LiveAmp library
  10. # Adds library to target
  11. # Adds include path
  12. # ---------------------------------
  13. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_FindThirdPartyLiveAmpAPI)
  14. IF(WIN32)
  15. FIND_PATH(PATH_LiveAmpAPI Amplifier_LIB.h PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES sdk_brainproducts_liveamp)
  16. IF(PATH_LiveAmpAPI)
  17. OV_PRINT(OV_PRINTED " Found Brain Products LiveAmp API...")
  18. INCLUDE_DIRECTORIES(${PATH_LiveAmpAPI})
  19. FIND_LIBRARY(LIB_LiveAmpAPI LiveAmpLib2 PATHS ${PATH_LiveAmpAPI} )
  20. IF(LIB_LiveAmpAPI)
  21. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_LiveAmpAPI}")
  22. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_LiveAmpAPI} )
  23. ELSE(LIB_LiveAmpAPI)
  24. OV_PRINT(OV_PRINTED " [FAILED] lib LiveAmp")
  25. ENDIF(LIB_LiveAmpAPI)
  26. # Copy the DLL file at install
  27. INSTALL(PROGRAMS "${PATH_LiveAmpAPI}/LiveAmpLib2.dll" DESTINATION ${DIST_BINDIR})
  28. ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyLiveAmpAPI)
  29. ELSE(PATH_LiveAmpAPI)
  30. OV_PRINT(OV_PRINTED " FAILED to find Brain Products LiveAmp API (optional)")
  31. ENDIF(PATH_LiveAmpAPI)
  32. ENDIF(WIN32)
  33. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_FindThirdPartyLiveAmpAPI "Yes")