project(nnxx_tests) cmake_minimum_required(VERSION 3.5) set (CMAKE_CXX_STANDARD 11) find_package(PkgConfig REQUIRED) pkg_check_modules(nanomsg REQUIRED nanomsg) FIND_PACKAGE(Protobuf REQUIRED) #FIND_PACKAGE(Glog REQUIRED) include_directories( /usr/local/include ${PROTOBUF_INCLUDE_DIRS} ./message ./communication ./error_code ./tool ./tool/TaskQueue/threadpp ./system ./lidar_locate ./parkspace ./dispatch ./exception ) link_directories("/usr/local/lib") message(STATUS ${EXECUTABLE_OUTPUT_PATH}) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar_locate locate_src ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/robot robot_src ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/exception exception_src ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool/TaskQueue TASK_QUEUE_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/parkspace PARKSPACE_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC ) add_executable(process main.cpp ./error_code/error_code.cpp ${locate_src} ${robot_src} ${message_src} ${TOOL_SRC} ${TASK_QUEUE_SRC} ${COMMUNICATION_SRC} ${SYSTEM_SRC} ${PARKSPACE_SRC} ${DISPATCH_SRC} ${exception_src} ) target_link_libraries(process nnxx nanomsg ${PROTOBUF_LIBRARIES} /usr/local/lib/libglog.a /usr/local/lib/libgflags.a ${GLOG_LIBRARIES} ) add_executable(terminal ./test/terminal_client.cpp ./test/store_terminal.cpp ./test/pickup_terminal.cpp ./test/Terminal_communication.cpp ./error_code/error_code.cpp ${message_src} ${TOOL_SRC} ${TASK_QUEUE_SRC} ${COMMUNICATION_SRC} ) target_link_libraries(terminal nnxx nanomsg ${PROTOBUF_LIBRARIES} /usr/local/lib/libglog.a /usr/local/lib/libgflags.a )