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.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. cmake_minimum_required (VERSION 2.6)
  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. ExternalProject_Add(EIGEN
  9. HG_REPOSITORY "https://bitbucket.org/eigen/eigen/"
  10. #DOWNLOAD_COMMAND wget http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2
  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. # Yaml-cpp, this library is used extensively for serialisation of classes (class persistence)
  17. ExternalProject_Add(YAML-CPP
  18. GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  19. GIT_TAG "master"
  20. UPDATE_COMMAND ""
  21. PATCH_COMMAND ""
  22. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  23. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  24. )
  25. # tinyxml2, this library is used for XML IO
  26. ExternalProject_Add(TINYXML2
  27. GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
  28. GIT_TAG "master"
  29. UPDATE_COMMAND ""
  30. PATCH_COMMAND ""
  31. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tinyxml2
  32. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  33. )
  34. # matio, this library is used for MATLAB file IO
  35. ExternalProject_ADD(MATIO
  36. GIT_REPOSITORY "git://git.code.sf.net/p/matio/matio"
  37. GIT_TAG "master"
  38. UPDATE_COMMAND ""
  39. PATCH_COMMAND ""
  40. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
  41. #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
  42. CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
  43. BUILD_IN_SOURCE 1
  44. BUILD_COMMAND ${MAKE}
  45. )
  46. #####################
  47. # Lemma Configuration
  48. #####################
  49. project(LEMMA_CXX)
  50. set(LEMMA_VERSION_MAJOR "0")
  51. set(LEMMA_VERSION_MINOR "0")
  52. set(LEMMA_VERSION_PATCH "0")
  53. #set(LEMMA_VERSION "${LEMMA_CPP_VERSION_MAJOR}_${LEMMA_CPP_VERSION_MINOR}_${LEMMA_CPP_VERSION_PATCH}")
  54. configure_file (
  55. "${PROJECT_SOURCE_DIR}/include/LemmaConfig.h.in"
  56. "${PROJECT_BINARY_DIR}/include/LemmaConfig.h"
  57. )
  58. include_directories("${PROJECT_BINARY_DIR}/include")
  59. include_directories ("${PROJECT_SOURCE_DIR}/LemmaCore")
  60. add_subdirectory (LemmaCore)
  61. # TODO add compiler specific instructions
  62. add_compile_options(-std=c++11)
  63. include_directories(${CMAKE_INSTALL_PREFIX}/include)
  64. add_executable(Hello "${PROJECT_SOURCE_DIR}/src/test.cpp")
  65. target_link_libraries(Hello lemmacore)