1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- cmake_minimum_required(VERSION 2.8)
- #在项目中显示所有源码
- file(GLOB files_ya-serv ./*.cpp ./*.h ./websocket/* ./db_api/* ./src/* ./src/internal/*
- ./module_service/*)
- add_custom_target(files_ya-serv SOURCES ${files_ya-serv})
- MESSAGE(STATUS "module: ya-serv")
- #g++编译参数
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -m64 -std=c++11 -fPIC -fno-strict-aliasing")
- #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -m64 -std=c++11 -fPIC -fno-strict-aliasing")
- #第三方库库文件目录
- link_directories( "/root/soft/boost_1_67_0/lib" "/usr/lib64/mysql" "/root/projection/out/lib")
- #第三方库头文件目录
- include_directories("/home/user/libev-4.24" "." "/root/soft/boost_1_67_0/include/"
- "/root/projection/out/"
- "/root/projection/out/websocketpp"
- "/usr/include/mysql/" "src/" "src/internal/"
- "websocket/" "db_api/" "module_service/")
- #输出项目名称
- project(ya-serv)
- #编译项目所需源码
- set(SRC_YASL "ant.cpp" "ant.h" "base64.cpp" "base64.h" "card.cpp" "card.h" "clock.h"
- "io_buf.h" "line.h" "message.cpp" "message.h" "point.cpp"
- "point.h" "tdoa_sync.cpp" "tdoa_sync.h" "web-client.cpp" "web-client.h" "worker.cpp" "worker.h" "zio.h"
- "zloop.h" "znet.cpp" "znet.h" "zstream.h" "log.h" "card_path.h" "card_path.cpp"
- "select_tool.h" "select_tool.cpp" "loc_point.h" "loc_point.cpp" "line_fit.h" "line_fit.cpp"
- "net-service.h" "net-service.cpp" "loc_tool.h" "loc_tool.cpp"
- "db_api/CDBCommon.h" "db_api/CDBConnect.h" "db_api/CDBConnect.cpp" "db_api/CjasonCommon.h"
- "db_api/CDBConnPool.h" "db_api/CDBConnPool.cpp"
- "db_api/CDBHelper.h" "db_api/CDBHelper.cpp"
- "db_api/CDBResultSet.h" "db_api/CDBResultSet.cpp"
- "src/sio_client.h" "src/sio_client.cpp" "src/sio_message.h"
- "src/sio_socket.h" "src/sio_socket.cpp"
- "src/internal/sio_client_impl.h" "src/internal/sio_client_impl.cpp"
- "src/internal/sio_packet.h" "src/internal/sio_packet.cpp"
- "websocket/constdef.h"
- "websocket/jsonBuilder.h" "websocket/jsonBuilder.cpp"
- "websocket/jsonCommon.h" "websocket/thread_safe_map.h"
- "websocket/ws_common.h"
- "websocket/wsClient.h" "websocket/wsClient.cpp"
- "websocket/wsClientMgr.h" "websocket/wsClientMgr.cpp"
- "websocket/wsTimerThread.h" "websocket/wsTimerThread.cpp"
- )
- set(SRC_MODULE
- "module_service/module_area.h" "module_service/module_area.cpp"
- "module_service/module_area_over_speed.h" "module_service/module_area_over_speed.cpp"
- "module_service/module_area_overman.h" "module_service/module_area_overman.cpp"
- "module_service/module_area_timeout.h" "module_service/module_area_timeout.cpp"
- "module_service/module_attendance_person.h" "module_service/module_attendance_person.cpp"
- "module_service/module_attendance_vehicle.h" "module_service/module_attendance_vehicle.cpp"
- "module_service/module_call.h" "module_service/module_call.cpp"
- "module_service/module_call_help.cpp" "module_service/module_call_help.h"
- "module_service/module_const.cpp" "module_service/module_const.h"
- "module_service/module_web.cpp" "module_service/module_web.h"
- "module_service/module_mgr.cpp" "module_service/module_mgr.h"
- )
- add_executable(${PROJECT_NAME} "main.cpp" ${SRC_YASL} ${SRC_MODULE})
- target_link_libraries (${PROJECT_NAME} zlog rt ev boost_system boost_thread mysqlclient)
- file(COPY data_reader_antenna.txt DESTINATION ${PROJECT_BINARY_DIR})
- file(COPY path_tof.txt DESTINATION ${PROJECT_BINARY_DIR})
- file(COPY /root/projection/out/bin/logger DESTINATION ${PROJECT_BINARY_DIR})
- file(COPY /root/projection/out/etc DESTINATION ${PROJECT_SOURCE_DIR})
- file(COPY /root/projection/out/log DESTINATION ${PROJECT_SOURCE_DIR})
- file(COPY /root/projection/out/include/log.h DESTINATION ${PROJECT_SOURCE_DIR})
- file(COPY /root/projection/out/include/config_file.h DESTINATION ${PROJECT_SOURCE_DIR})
- #message(${PROJECT_BINARY_DIR})
|