CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. cmake_minimum_required(VERSION 3.15)
  2. project(notify_manage)
  3. set(CMAKE_CXX_STANDARD 14)
  4. FIND_PACKAGE(Protobuf REQUIRED)
  5. include_directories(
  6. /usr/local/include
  7. ${PROTOBUF_INCLUDE_DIRS}
  8. communication
  9. message
  10. error_code
  11. tool
  12. notify_manage
  13. led
  14. )
  15. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code error_src )
  16. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  17. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  18. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  19. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/notify_manage NOTIFY_MANAGE )
  20. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/led LED )
  21. add_executable(notify_manage
  22. main.cpp
  23. ${error_src}
  24. ${message_src}
  25. ${TOOL_SRC}
  26. ${COMMUNICATION_SRC}
  27. ${NOTIFY_MANAGE}
  28. ${LED}
  29. )
  30. target_link_libraries(notify_manage
  31. /usr/local/lib/libglog.a
  32. /usr/local/lib/libgflags.a
  33. nnxx
  34. nanomsg
  35. ${PROTOBUF_LIBRARIES}
  36. -lpthread
  37. )