CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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("dbhandlers")
  12. add_subdirectory("queryGen")
  13. add_subdirectory("replyExtraction")
  14. add_subdirectory("replyGenerator")
  15. file(GLOB PIRLIB_ASMS ${CMAKE_SOURCE_DIR}/crypto/prng/*.s )
  16. file(GLOB PIRLIB_SRCS
  17. ${CMAKE_SOURCE_DIR}/crypto/*.cpp
  18. ${CMAKE_SOURCE_DIR}/crypto/prng/*.cpp
  19. ${CMAKE_SOURCE_DIR}/pir/*.cpp
  20. ${CMAKE_SOURCE_DIR}/apps/client/DESC.cpp
  21. ${CMAKE_SOURCE_DIR}/apps/server/DB*.cpp
  22. ${CMAKE_SOURCE_DIR}/pir/events/*.cpp
  23. ${CMAKE_SOURCE_DIR}/pir/optim/*.cpp
  24. ${CMAKE_SOURCE_DIR}/pir/dbhandlers/*.cpp
  25. ${CMAKE_SOURCE_DIR}/pir/queryGen/*.cpp
  26. ${CMAKE_SOURCE_DIR}/pir/replyExtraction/*.cpp
  27. ${CMAKE_SOURCE_DIR}/pir/replyGenerator/*.cpp )
  28. add_library(pir SHARED ${PIRLIB_ASMS} ${PIRLIB_SRCS})
  29. target_link_libraries(pir ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARIES} ${GOBJECT_LIBRARIES})
  30. install(TARGETS pir LIBRARY DESTINATION lib)
  31. add_library(pir_static STATIC ${PIRLIB_ASMS} ${PIRLIB_SRCS})
  32. target_link_libraries(pir_static ${MPFR_LIBRARY} ${Boost_LIBRARIES} ${GMP_LIBRARY} ${GOBJECT_LIBRARIES} gmp libgmp )
  33. install(TARGETS pir_static ARCHIVE DESTINATION lib)