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.

FindThirdPartyBrainmasterCodeMakerAPI.cmake 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # ---------------------------------
  2. # Finds BrainmasterCodeMakerAPI
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyBrainmasterCodeMakerAPI)
  7. IF(WIN32)
  8. IF("${PLATFORM_TARGET}" STREQUAL "x64")
  9. OV_PRINT(OV_PRINTED " SKIPPED BrainMaster Discovery & Atlantis not yet supported on 64bit build...")
  10. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyBrainmasterCodeMakerAPI "Yes")
  11. RETURN()
  12. ENDIF()
  13. # note that ampersands in paths below passed through cmake mess up Visual Studio IDE. If you get this problem, rename the dll folder under Program Files/
  14. FIND_PATH(PATH_BrainmasterCodeMakerAPI CMKRDLLU.H PATHS
  15. "C:/Program Files/Atlantis and Discovery SW DLL 1-11-12"
  16. "C:/Program Files (x86)/Atlantis and Discovery SW DLL 1-11-12"
  17. "C:/Program Files/Atlantis & Discovery SW DLL 1-11-12"
  18. "C:/Program Files (x86)/Atlantis & Discovery SW DLL 1-11-12"
  19. ${LIST_DEPENDENCIES_PATH})
  20. IF(PATH_BrainmasterCodeMakerAPI)
  21. OV_PRINT(OV_PRINTED " Found Brainmaster Code Maker API...")
  22. INCLUDE_DIRECTORIES(${PATH_BrainmasterCodeMakerAPI})
  23. FOREACH(LIB_BrainmasterCodeMakerAPI bmrcm.lib ovbmrcm.lib)
  24. SET(LIB_BrainmasterCodeMakerAPI1 "LIB_BrainmasterCodeMakerAPI1-NOTFOUND")
  25. FIND_LIBRARY(LIB_BrainmasterCodeMakerAPI1 NAMES ${LIB_BrainmasterCodeMakerAPI} PATHS ${PATH_BrainmasterCodeMakerAPI} NO_DEFAULT_PATH)
  26. FIND_LIBRARY(LIB_BrainmasterCodeMakerAPI1 NAMES ${LIB_BrainmasterCodeMakerAPI})
  27. IF(LIB_BrainmasterCodeMakerAPI1)
  28. OV_PRINT(OV_PRINTED " [ OK ] Third party lib ${LIB_BrainmasterCodeMakerAPI1}")
  29. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_BrainmasterCodeMakerAPI1})
  30. ELSE(LIB_BrainmasterCodeMakerAPI1)
  31. OV_PRINT(OV_PRINTED " [FAILED] Third party lib ${LIB_BrainmasterCodeMakerAPI}")
  32. ENDIF(LIB_BrainmasterCodeMakerAPI1)
  33. ENDFOREACH(LIB_BrainmasterCodeMakerAPI)
  34. # Copy the DLL file at install
  35. INSTALL(PROGRAMS "${PATH_BrainmasterCodeMakerAPI}/bmrcm.dll" DESTINATION ${DIST_BINDIR})
  36. ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyBrainmasterCodeMakerAPI)
  37. ELSE(PATH_BrainmasterCodeMakerAPI)
  38. OV_PRINT(OV_PRINTED " FAILED to find Brainmaster Code Maker API (optional driver)")
  39. ENDIF(PATH_BrainmasterCodeMakerAPI)
  40. ENDIF(WIN32)
  41. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyBrainmasterCodeMakerAPI "Yes")