Lemma is an Electromagnetics API
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CMakeLists.txt 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. cmake_minimum_required (VERSION 2.8.7)
  2. project (Lemma)
  3. ###################
  4. # External Projects
  5. ###################
  6. include(ExternalProject)
  7. # Eigen, this header-library is used extensively for linear algebra, matrices, and arrays
  8. # Mercurial (hg) repo pull, Would it be better to just download latest stable?
  9. #ExternalProject_Add(EIGEN
  10. # HG_REPOSITORY "https://bitbucket.org/eigen/eigen/"
  11. # UPDATE_COMMAND ""
  12. # PATCH_COMMAND ""
  13. # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
  14. # CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  15. #)
  16. # Stable Eigen, requires manual updating when new releases, but lighter weight.
  17. ExternalProject_Add(EIGEN
  18. URL "http://bitbucket.org/eigen/eigen/get/3.2.7.tar.gz"
  19. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
  20. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  21. )
  22. # Yaml-cpp, this library is used extensively for serialisation of classes (class persistence)
  23. ExternalProject_Add(YAML-CPP
  24. GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  25. GIT_TAG "master"
  26. UPDATE_COMMAND ""
  27. PATCH_COMMAND ""
  28. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  29. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  30. )
  31. # tinyxml2, this library is used for XML IO
  32. ExternalProject_Add(TINYXML2
  33. GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
  34. GIT_TAG "master"
  35. UPDATE_COMMAND ""
  36. PATCH_COMMAND ""
  37. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tinyxml2
  38. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  39. )
  40. # matio, this library is used for MATLAB file IO
  41. ExternalProject_ADD(MATIO
  42. GIT_REPOSITORY "git://git.code.sf.net/p/matio/matio"
  43. GIT_TAG "master"
  44. UPDATE_COMMAND ""
  45. PATCH_COMMAND ""
  46. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
  47. #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
  48. CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
  49. BUILD_IN_SOURCE 1
  50. BUILD_COMMAND ${MAKE}
  51. )
  52. #####################
  53. # Lemma Configuration
  54. #####################
  55. project(LEMMA_CXX)
  56. # We don't Build VTK, it is too much.
  57. find_package(VTK 6.0 REQUIRED NO_MODULE)
  58. include(${VTK_USE_FILE})
  59. set(LEMMA_VERSION_MAJOR "0")
  60. set(LEMMA_VERSION_MINOR "0")
  61. set(LEMMA_VERSION_PATCH "0")
  62. #set(LEMMA_VERSION "${LEMMA_CPP_VERSION_MAJOR}_${LEMMA_CPP_VERSION_MINOR}_${LEMMA_CPP_VERSION_PATCH}")
  63. configure_file (
  64. "${PROJECT_SOURCE_DIR}/include/LemmaConfig.h.in"
  65. "${PROJECT_BINARY_DIR}/include/LemmaConfig.h"
  66. )
  67. include_directories("${PROJECT_BINARY_DIR}/include")
  68. include_directories ("${PROJECT_SOURCE_DIR}/LemmaCore")
  69. add_subdirectory (LemmaCore)
  70. # TODO add compiler specific instructions
  71. add_compile_options(-std=c++11)
  72. include_directories(${CMAKE_INSTALL_PREFIX}/include)
  73. add_executable(Hello "${PROJECT_SOURCE_DIR}/src/test.cpp")
  74. target_link_libraries(Hello lemmacore)