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.

FindThirdPartyUSBFirstAmpAPI.cmake 1.3KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. # ---------------------------------
  2. # Finds VAmp FirstAmp library
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyUSBFirstAmpAPI)
  7. IF(WIN32)
  8. IF("${PLATFORM_TARGET}" STREQUAL "x64")
  9. FIND_PATH(PATH_USBFirstAmpAPI FirstAmp.h PATHS "C:/Program Files/FaSDK-x64" ${LIST_DEPENDENCIES_PATH})
  10. ELSE()
  11. FIND_PATH(PATH_USBFirstAmpAPI FirstAmp.h PATHS "C:/Program Files/FaSDK" "C:/Program Files (x86)/FaSDK" ${LIST_DEPENDENCIES_PATH})
  12. ENDIF()
  13. IF(PATH_USBFirstAmpAPI)
  14. OV_PRINT(OV_PRINTED " Found Brain Products FirstAmp (VAmp) API...")
  15. INCLUDE_DIRECTORIES(${PATH_USBFirstAmpAPI})
  16. FIND_LIBRARY(LIB_USBFirstAmpAPI FirstAmp PATHS ${PATH_USBFirstAmpAPI} )
  17. IF(LIB_USBFirstAmpAPI)
  18. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_USBFirstAmpAPI}")
  19. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_USBFirstAmpAPI} )
  20. ELSE()
  21. OV_PRINT(OV_PRINTED " [FAILED] lib FirstAmp")
  22. ENDIF()
  23. # Copy the DLL file at install
  24. INSTALL(PROGRAMS "${PATH_USBFirstAmpAPI}/FirstAmp.dll" DESTINATION ${DIST_BINDIR})
  25. ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyUSBFirstAmpAPI)
  26. ELSE()
  27. OV_PRINT(OV_PRINTED " FAILED to find Brain Products FirstAmp (VAmp) API (optional driver)")
  28. ENDIF()
  29. ENDIF()
  30. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyUSBFirstAmpAPI "Yes")