diff --git a/cmake-modules/FindThirdPartyGUSBampCAPI.cmake b/cmake-modules/FindThirdPartyGUSBampCAPI.cmake index e130a93471177bc58bd0222abfbed4a176802305..6c2ef35b8403fe04db378a2f331d28f996d395cc 100644 --- a/cmake-modules/FindThirdPartyGUSBampCAPI.cmake +++ b/cmake-modules/FindThirdPartyGUSBampCAPI.cmake @@ -38,3 +38,21 @@ IF(WIN32) MESSAGE(STATUS " FAILED to find gUSBampCAPI") ENDIF(PATH_GUSBampCAPI) ENDIF(WIN32) + + +IF(UNIX) + # To try other versions of the gtec's library, change the number below + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so.1.14") + FIND_LIBRARY(gUSBAmpLinux_LIBRARY NAMES "gusbampapi" PATHS "/usr/lib" "/usr/local/lib") + IF(gUSBAmpLinux_LIBRARY) + MESSAGE(STATUS " Found GUSBAmpAPILinux...") + MESSAGE(STATUS " [ OK ] Third party lib ${gUSBAmpLinux_LIBRARY}") + ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGUSBampCAPI_Linux) + TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${gUSBAmpLinux_LIBRARY} ) + ELSE(gUSBAmpLinux_LIBRARY) + MESSAGE(STATUS " FAILED to find GUSBAmpAPI Linux... ") + MESSAGE(STATUS " : If it should be found, see that 'libgusbampapi.so.1.14' link exists on the fs, with no further nemeric suffixes in the filename.") + MESSAGE(STATUS " : e.g. do 'cd /usr/lib/ ; ln -s libgusbampapi.so.1.14'. See gtec-bcilab/README for details.") + ENDIF(gUSBAmpLinux_LIBRARY) + SET(OV_ThirdPartyGUSBAmp "YES") +ENDIF(UNIX)