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 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. #generate_export_header(lemmacore)
  12. #add_dependencies(lemmacore YAML_CPP)
  13. #if (LEMMA_TINYXML_SUPPORT)
  14. # add_dependencies(lemmacore TINYXML2)
  15. #endif()
  16. #if (LEMMA_MATIO_SUPPORT)
  17. # add_dependencies(lemmacore MATIO)
  18. #endif()
  19. target_link_libraries (lemmacore Eigen3::Eigen)
  20. #target_link_libraries (lemmacore CxxTest)
  21. target_link_libraries (lemmacore ${YAML_CPP_LIBRARIES})
  22. target_link_libraries (lemmacore ${YAML_CPP_LIBRARY})
  23. # Linking
  24. if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT OR LEMMA_VTK8_SUPPORT )
  25. target_link_libraries(lemmacore ${VTK_LIBRARIES})
  26. # target_link_libraries(lemmacore "yaml-cpp")
  27. # target_link_libraries(lemmacore "matplot")
  28. endif()
  29. if ( LEMMA_VTK9_SUPPORT )
  30. target_link_libraries(lemmacore ${visibility}VTK::CommonCore VTK::IOXML VTK::FiltersHyperTree)
  31. vtk_module_autoinit(TARGETS lemmacore MODULES VTK::CommonCore VTK::IOXML VTK::FiltersHyperTree)
  32. endif()
  33. # find_package(yaml-cpp) does not seem to properly define library names...
  34. # a better solution than this is welcome
  35. #if (WIN32)
  36. # target_link_libraries(lemmacore "libyaml-cppmdd")
  37. #else()
  38. # target_link_libraries(lemmacore "yaml-cpp")
  39. #endif()
  40. # Testing
  41. if (LEMMA_ENABLE_TESTING)
  42. add_subdirectory(testing)
  43. endif()
  44. # Python Bindings
  45. if (LEMMA_PYTHON3_BINDINGS)
  46. add_subdirectory(python)
  47. endif()
  48. # Install
  49. install ( TARGETS lemmacore DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  50. install ( FILES include/LemmaCore DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  51. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h" )
  52. # Examples
  53. if (LEMMA_BUILD_EXAMPLES)
  54. add_subdirectory(examples)
  55. endif()