Lemma is an Electromagnetics API
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.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. # Linking
  12. target_link_libraries(fdem1d "lemmacore")
  13. target_link_libraries(fdem1d ${YAML_CPP_LIBRARIES})
  14. if ( KIHA_EM1D )
  15. target_link_libraries(fdem1d "kihaem1d")
  16. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  17. # using GCC
  18. target_link_libraries(fdem1d "gfortran")
  19. elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
  20. # using Intel C++
  21. target_link_libraries(fdem1d "ifcore" "imf" "svml" "intlc")
  22. endif()
  23. endif()
  24. # Testing
  25. if (LEMMA_ENABLE_TESTING)
  26. add_subdirectory(testing)
  27. endif()
  28. # Python Bindings
  29. if (LEMMA_PYTHON3_BINDINGS)
  30. add_subdirectory(python)
  31. endif()
  32. # Install
  33. install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  34. install ( FILES include/FDEM1D DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  35. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h")
  36. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ FILES_MATCHING PATTERN "FDEM1D")
  37. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/FDEM1D FILES_MATCHING PATTERN "*.h")
  38. # Examples
  39. if (LEMMA_BUILD_EXAMPLES)
  40. add_subdirectory(examples)
  41. endif()