CMakeLists.txt 768 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(std_lib)
  3. add_compile_options(-std=c++11)
  4. set(CMAKE_BUILD_TYPE Release)
  5. find_package(Boost REQUIRED COMPONENTS system thread chrono)
  6. include_directories(
  7. include
  8. ${boost_INCLUDE_DIRS}
  9. )
  10. add_library(std_lib SHARED
  11. src/json/json_reader.cpp
  12. src/json/json_value.cpp
  13. src/json/json_writer.cpp
  14. src/json/json.cpp
  15. src/string/string.cpp
  16. src/system/uuid.cpp
  17. src/system/time.cpp
  18. src/database/database.cpp
  19. src/database/sqlite.cpp
  20. src/communication/tcp/tcp.cpp
  21. src/communication/udp/udp.cpp
  22. )
  23. target_link_libraries(std_lib
  24. ${Boost_LIBRARIES}
  25. libsqlite3.so
  26. )
  27. INSTALL(TARGETS std_lib
  28. RUNTIME DESTINATION bin
  29. LIBRARY DESTINATION lib
  30. )
  31. INSTALL(DIRECTORY include/std_lib
  32. DESTINATION include
  33. )