FindEuroScope.cmake 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Author:
  2. # Sven Czarnian <devel@svcz.de>
  3. # License:
  4. # LGPLv3
  5. # Brief:
  6. # Finds the EuroScope headers and libraries
  7. # A target EuroScope will be created and the EuroScope_FOUND flag will be set
  8. IF(NOT TARGET EuroScope)
  9. IF(NOT EuroScope_DIR)
  10. MESSAGE(FATAL_ERROR "Please set EuroScope_DIR")
  11. SET(EuroScope_DIR "EuroScope_DIR-NOTFOUND" CACHE PATH PARENT_SCOPE)
  12. ENDIF()
  13. FIND_FILE(EuroScope_EXECUTABLE
  14. NAMES
  15. EuroScope.exe
  16. PATHS
  17. ${EuroScope_DIR}
  18. )
  19. FIND_FILE(EuroScope_LIBRARY
  20. NAMES
  21. EuroScopePlugInDll.lib
  22. PATHS
  23. ${EuroScope_DIR}/PlugInEnvironment
  24. )
  25. FIND_PATH(EuroScope_INCLUDE_DIR
  26. NAMES
  27. EuroScopePlugIn.h
  28. PATHS
  29. ${EuroScope_DIR}/PlugInEnvironment
  30. )
  31. IF(NOT ${EuroScope_EXECUTABLE} STREQUAL "EuroScope_EXECUTABLE-NOTFOUND" AND
  32. NOT ${EuroScope_LIBRARY} STREQUAL "EuroScope_LIBRARY-NOTFOUND" AND
  33. NOT ${EuroScope_INCLUDE_DIR} STREQUAL "EuroScope_INCLUDE_DIR-NOTFOUND")
  34. MESSAGE(STATUS "Found EuroScope-library:")
  35. MESSAGE(STATUS " ${EuroScope_LIBRARY}")
  36. MESSAGE(STATUS "Found EuroScope-headers:")
  37. MESSAGE(STATUS " ${EuroScope_INCLUDE_DIR}")
  38. ADD_LIBRARY(EuroScope INTERFACE IMPORTED GLOBAL)
  39. TARGET_LINK_LIBRARIES(EuroScope INTERFACE ${EuroScope_LIBRARY})
  40. TARGET_INCLUDE_DIRECTORIES(EuroScope INTERFACE ${EuroScope_INCLUDE_DIR})
  41. SET(EuroScope_FOUND ON)
  42. ENDIF()
  43. ELSE()
  44. MESSAGE(STATUS "EuroScope is already included.")
  45. ENDIF()