Main Lemma Repository
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.

CMakeLists.txt 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. add_subdirectory("src")
  2. add_library( lemmacore ${SOURCE} )
  3. target_include_directories( lemmacore PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
  4. set_target_properties(lemmacore PROPERTIES
  5. VERSION "${LEMMA_VERSION_NOQUOTES}"
  6. SOVERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
  7. PROJECT_LABEL "LemmaCore ${LABEL_SUFFIX}"
  8. CXX_STANDARD 14
  9. CXX_STANDARD_REQUIRED ON
  10. )
  11. #add_dependencies(lemmacore YAML_CPP)
  12. #if (LEMMA_TINYXML_SUPPORT)
  13. # add_dependencies(lemmacore TINYXML2)
  14. #endif()
  15. #if (LEMMA_MATIO_SUPPORT)
  16. # add_dependencies(lemmacore MATIO)
  17. #endif()
  18. target_link_libraries (lemmacore Eigen3::Eigen)
  19. #target_link_libraries (lemmacore CxxTest)
  20. target_link_libraries (lemmacore ${YAML_CPP_LIBRARIES})
  21. # Linking
  22. if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT OR LEMMA_VTK8_SUPPORT )
  23. target_link_libraries(lemmacore ${VTK_LIBRARIES})
  24. # target_link_libraries(lemmacore "yaml-cpp")
  25. # target_link_libraries(lemmacore "matplot")
  26. endif()
  27. # find_package(yaml-cpp) does not seem to properly define library names...
  28. # a better solution than this is welcome
  29. #if (WIN32)
  30. # target_link_libraries(lemmacore "libyaml-cppmdd")
  31. #else()
  32. # target_link_libraries(lemmacore "yaml-cpp")
  33. #endif()
  34. # Testing
  35. if (LEMMA_ENABLE_TESTING)
  36. add_subdirectory(testing)
  37. endif()
  38. # Python Bindings
  39. if (LEMMA_PYTHON3_BINDINGS)
  40. add_subdirectory(python)
  41. endif()
  42. # Install
  43. install ( TARGETS lemmacore DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  44. install ( FILES include/LemmaCore DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  45. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h" )
  46. # Examples
  47. if (LEMMA_BUILD_EXAMPLES)
  48. add_subdirectory(examples)
  49. endif()