CMakeLists.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. cmake_minimum_required(VERSION 2.8)
  2. #project(nfl CXX ASM-ATT)
  3. enable_testing()
  4. if(APPLE)
  5. cmake_policy(SET CMP0042 NEW)
  6. endif()
  7. find_package(GMP REQUIRED)
  8. include_directories("/opt/local/include" ${CMAKE_SOURCE_DIR}/crypto ${CMAKE_SOURCE_DIR}/pir ${CMAKE_SOURCE_DIR})
  9. add_subdirectory("events")
  10. add_subdirectory("optim")
  11. add_subdirectory("queryGen")
  12. add_subdirectory("replyExtraction")
  13. add_subdirectory("replyGenerator")
  14. file(GLOB PIRLIB_ASMS ${CMAKE_SOURCE_DIR}/crypto/prng/*.s )
  15. file(GLOB PIRLIB_SRCS
  16. ${CMAKE_SOURCE_DIR}/crypto/*.cpp
  17. ${CMAKE_SOURCE_DIR}/crypto/prng/*.cpp
  18. ${CMAKE_SOURCE_DIR}/pir/*.cpp
  19. ${CMAKE_SOURCE_DIR}/apps/client/DESC.cpp
  20. ${CMAKE_SOURCE_DIR}/apps/server/DB*.cpp
  21. ${CMAKE_SOURCE_DIR}/pir/events/*.cpp
  22. ${CMAKE_SOURCE_DIR}/pir/optim/*.cpp
  23. ${CMAKE_SOURCE_DIR}/pir/queryGen/*.cpp
  24. ${CMAKE_SOURCE_DIR}/pir/replyExtraction/*.cpp
  25. ${CMAKE_SOURCE_DIR}/pir/replyGenerator/*.cpp )
  26. add_library(pir SHARED ${PIRLIB_ASMS} ${PIRLIB_SRCS})
  27. target_link_libraries(pir ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GOBJECT_LIBRARIES})
  28. install(TARGETS pir LIBRARY DESTINATION lib)
  29. add_library(pir_static STATIC ${PIRLIB_ASMS} ${PIRLIB_SRCS})
  30. target_link_libraries(pir_static ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARY} ${GOBJECT_LIBRARIES} gmp libgmp )
  31. install(TARGETS pir_static ARCHIVE DESTINATION lib)