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/includelib/lib")
#第三方库头文件目录
include_directories("/home/user/libev-4.24" "." "/home/user/boost_1_67_0"
    "/root/projection/includelib/rapidjson"
    "/root/projection/includelib/websocketpp" "websocketpp/"
    "/usr/include/mysql/"  "src/" "src/internal/"
    "websocket/" "db_api/")

#输出项目名称
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" "log.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"

    "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})

#set(LIB_BOOST "")
target_link_libraries (${PROJECT_NAME}  zlog rt ev boost_system boost_thread mysqlclient)












