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.

FindLibMensiaAdvancedVisualisation.cmake 1.5KB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # ---------------------------------
  2. # Finds libmensia-advanced-visualization
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. # OPTION(DYNAMIC_LINK_LIBADVVIZ "Dynamically link libmensia-advanced-visualization" ON)
  7. # Default is dynamic library
  8. IF(NOT DEFINED DYNAMIC_LINK_LIBADVVIZ)
  9. OPTION(DYNAMIC_LINK_LIBADVVIZ "Dynamically link lib mensia-advanced-visualization" OFF)
  10. ENDIF()
  11. IF(DYNAMIC_LINK_LIBADVVIZ)
  12. ADD_DEFINITIONS(-DLMAV_Shared)
  13. SET(LIBADVVIZ_LINKING "")
  14. ELSE()
  15. ADD_DEFINITIONS(-DLMAV_Static)
  16. SET(LIBADVVIZ_LINKING -static)
  17. ENDIF()
  18. SET(PATH_LIBADVVIZ "PATH_LIBADVVIZ-NOTFOUND")
  19. SET(MENSIA_SRC_DIR ${CMAKE_SOURCE_DIR}/libraries/lib-advanced-visualization/include/)
  20. FIND_PATH(PATH_LIBADVVIZ mensia/advanced-visualization.hpp PATHS ${MENSIA_SRC_DIR} NO_DEFAULT_PATH)
  21. IF(PATH_LIBADVVIZ)
  22. debug_message( " Found mensia-advanced-visualization... ${PATH_LIBADVVIZ}")
  23. INCLUDE_DIRECTORIES(${PATH_LIBADVVIZ}/)
  24. IF(TARGET ${PROJECT_NAME})
  25. TARGET_LINK_LIBRARIES(${PROJECT_NAME} mensia-advanced-visualization${LIBADVVIZ_LINKING})
  26. debug_message( "Linking with mensia-advanced-visualization${LIBADVVIZ_LINKING}")
  27. ENDIF()
  28. IF(TARGET ${PROJECT_NAME}-static)
  29. TARGET_LINK_LIBRARIES(${PROJECT_NAME}-static mensia-advanced-visualization${LIBADVVIZ_LINKING})
  30. debug_message( "Linking with mensia-advanced-visualization${LIBADVVIZ_LINKING}")
  31. ENDIF()
  32. ADD_DEFINITIONS(-DTARGET_HAS_LibAdvancedVisualization)
  33. ELSE()
  34. MESSAGE(WARNING " FAILED to find mensia-advanced-visualization...")
  35. ENDIF()