Main Lemma Repository
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

CMakeLists.txt 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. add_subdirectory("src")
  2. add_library( fdem1d ${FDEM1DSOURCE} )
  3. target_include_directories( fdem1d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
  4. set_target_properties(fdem1d PROPERTIES
  5. VERSION "${LEMMA_VERSION_NOQUOTES}"
  6. SOVERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
  7. PROJECT_LABEL "FDEM1D ${LABEL_SUFFIX}"
  8. CXX_STANDARD 14
  9. CXX_STANDARD_REQUIRED ON
  10. )
  11. if ( LEMMA_VTK9_SUPPORT )
  12. target_link_libraries(fdem1d ${visibility}VTK::RenderingCore VTK::CommonDataModel)
  13. vtk_module_autoinit(TARGETS fdem1d MODULES VTK::RenderingCore)
  14. endif()
  15. # Linking
  16. target_link_libraries(fdem1d "lemmacore")
  17. target_link_libraries(fdem1d ${YAML_CPP_LIBRARIES})
  18. if ( KIHA_EM1D )
  19. target_link_libraries(fdem1d "kihaem1d")
  20. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  21. # using GCC
  22. target_link_libraries(fdem1d "gfortran")
  23. elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
  24. # using Intel C++
  25. target_link_libraries(fdem1d "ifcore" "imf" "svml" "intlc")
  26. endif()
  27. endif()
  28. # Testing
  29. if (LEMMA_ENABLE_TESTING)
  30. add_subdirectory(testing)
  31. endif()
  32. # Python Bindings
  33. if (LEMMA_PYTHON3_BINDINGS)
  34. add_subdirectory(python)
  35. endif()
  36. # Install
  37. install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  38. install ( FILES include/FDEM1D DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  39. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h")
  40. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ FILES_MATCHING PATTERN "FDEM1D")
  41. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/FDEM1D FILES_MATCHING PATTERN "*.h")
  42. # Examples
  43. if (LEMMA_BUILD_EXAMPLES)
  44. add_subdirectory(examples)
  45. endif()