1
0

CMakeLists.txt 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. cmake_minimum_required(VERSION 2.8)
  2. #在项目中显示所有源码
  3. file(GLOB files_ya-serv ./*.cpp ./*.h ./websocket/* ./db_api/* ./src/* ./src/internal/*
  4. ./module_service/* ./monkey_car/*)
  5. add_custom_target(files_ya-serv SOURCES ${files_ya-serv})
  6. MESSAGE(STATUS "module: ya-serv")
  7. #g++编译参数
  8. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -m64 -std=c++11 -fPIC -fno-strict-aliasing")
  9. #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -m64 -std=c++11 -fPIC -fno-strict-aliasing")
  10. #第三方库库文件目录
  11. link_directories( "/root/soft/boost_1_67_0/lib" "/usr/lib64/mysql" "/root/projection/out/lib")
  12. #第三方库头文件目录
  13. include_directories("/home/user/libev-4.24" "." "/root/soft/boost_1_67_0/include/"
  14. "/root/projection/out/"
  15. "/root/projection/out/websocketpp"
  16. "/usr/include/mysql/" "src/" "src/internal/"
  17. "websocket/" "db_api/" "module_service/")
  18. #输出项目名称
  19. project(ya-serv)
  20. #编译项目所需源码
  21. set(SRC_YASL "ant.cpp" "ant.h" "base64.cpp" "base64.h" "card.cpp" "card.h" "clock.h"
  22. "io_buf.h" "line.h" "message.cpp" "message.h" "point.cpp"
  23. "point.h" "tdoa_sync.cpp" "tdoa_sync.h" "web-client.cpp" "web-client.h" "worker.cpp" "worker.h" "zio.h"
  24. "zloop.h" "znet.cpp" "znet.h" "zstream.h" "log.h" "card_path.h" "card_path.cpp"
  25. "select_tool.h" "select_tool.cpp" "loc_point.h" "loc_point.cpp" "line_fit.h" "line_fit.cpp"
  26. "net-service.h" "net-service.cpp" "loc_tool.h" "loc_tool.cpp"
  27. "db_api/CDBCommon.h" "db_api/CDBConnect.h" "db_api/CDBConnect.cpp" "db_api/CjasonCommon.h"
  28. "db_api/CDBConnPool.h" "db_api/CDBConnPool.cpp"
  29. "db_api/CDBHelper.h" "db_api/CDBHelper.cpp"
  30. "db_api/CDBResultSet.h" "db_api/CDBResultSet.cpp"
  31. "src/sio_client.h" "src/sio_client.cpp" "src/sio_message.h"
  32. "src/sio_socket.h" "src/sio_socket.cpp"
  33. "src/internal/sio_client_impl.h" "src/internal/sio_client_impl.cpp"
  34. "src/internal/sio_packet.h" "src/internal/sio_packet.cpp"
  35. "websocket/constdef.h"
  36. "websocket/jsonBuilder.h" "websocket/jsonBuilder.cpp"
  37. "websocket/jsonCommon.h" "websocket/thread_safe_map.h"
  38. "websocket/ws_common.h"
  39. "websocket/wsClient.h" "websocket/wsClient.cpp"
  40. "websocket/wsClientMgr.h" "websocket/wsClientMgr.cpp"
  41. "websocket/wsTimerThread.h" "websocket/wsTimerThread.cpp"
  42. "monkey_car/monkeycar_area.h" "monkey_car/monkeycar_area.cpp"
  43. "monkey_car/monkeycar_bus.h" "monkey_car/monkeycar_bus.cpp"
  44. "monkey_car/monkeycar_person.h" "monkey_car/monkeycar_person.cpp"
  45. "monkey_car/base_data.h" "monkey_car/fp_path.h"
  46. "monkey_car/linear_fit.h" "monkey_car/monkey_fit.h"
  47. "landmark.h" "landmark.cpp" "area.h" "area.cpp"
  48. "site_area.h" "site_area.cpp"
  49. "special_area.h" "special_area.cpp"
  50. )
  51. set(SRC_MODULE
  52. "mine.h" "mine.cpp"
  53. "ya_event.h" "ya_event.cpp"
  54. "common_tool.h"
  55. "module_service/module_area.h"
  56. "module_service/module_site.h"
  57. "module_service/module_area_over_count.h"
  58. "module_service/module_area_timeout.h"
  59. "module_service/module_attendance_person.h"
  60. "module_service/module_attendance_vehicle.h"
  61. "module_service/module_call.h" "module_service/module_call.cpp"
  62. "module_service/module_call_help.h"
  63. "module_service/module_const.h"
  64. "module_service/module_web.h" "module_service/module_web.cpp"
  65. "module_service/module_mgr.h"
  66. "module_service/module_mine.h"
  67. "module_service/module_over_speed_vehicle.h"
  68. "module_service/module_other_alarm.h"
  69. )
  70. add_executable(${PROJECT_NAME} "main.cpp" ${SRC_YASL} ${SRC_MODULE})
  71. target_link_libraries (${PROJECT_NAME} zlog rt ev boost_chrono boost_system boost_thread mysqlclient)
  72. #file(COPY data_reader_antenna.txt DESTINATION ${PROJECT_BINARY_DIR})
  73. #file(COPY path_tof.txt DESTINATION ${PROJECT_BINARY_DIR})
  74. #file(COPY /root/projection/out/bin/logger DESTINATION ${PROJECT_BINARY_DIR})
  75. #file(COPY /root/projection/out/etc DESTINATION ${PROJECT_SOURCE_DIR})
  76. #file(COPY /root/projection/out/log DESTINATION ${PROJECT_SOURCE_DIR})
  77. #file(COPY /root/projection/out/include/log.h DESTINATION ${PROJECT_SOURCE_DIR})
  78. #file(COPY /root/projection/out/include/config_file.h DESTINATION ${PROJECT_SOURCE_DIR})
  79. #message(${PROJECT_BINARY_DIR})