1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- project(nnxx_tests)
- cmake_minimum_required(VERSION 3.5)
- set (CMAKE_CXX_STANDARD 11)
- #set(PCL_DIR "/home/youchen/pcl-1.8/share/pcl-1.8")
- find_package(PkgConfig REQUIRED)
- pkg_check_modules(nanomsg REQUIRED nanomsg)
- FIND_PACKAGE(Protobuf REQUIRED)
- #FIND_PACKAGE(Glog REQUIRED)
- FIND_PACKAGE(OpenCV REQUIRED)
- FIND_PACKAGE(PCL REQUIRED)
- include_directories(
- /usr/local/include
- ${OpenCV_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIRS}
- communication
- message
- error_code
- tool
- parkspace_allocation
- /usr/local/include/cppconn/
- )
- link_directories("/usr/local/lib")
- message(STATUS ${EXECUTABLE_OUTPUT_PATH})
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code error_src )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/parkspace_allocation PARKSPACE_ALLOC_SRC )
- # 车位分配测试
- add_executable(parkspace_test
- ./test/test_parkspace_sample.cpp
- ${error_src}
- ${message_src}
- ${TOOL_SRC}
- ${COMMUNICATION_SRC}
- ${PARKSPACE_ALLOC_SRC}
- )
- target_link_libraries(parkspace_test
- nnxx
- nanomsg
- nng
- ${PROTOBUF_LIBRARIES}
- ${PCL_LIBRARIES}
- /usr/local/lib/libglog.a
- /usr/local/lib/libgflags.a
- libmysqlcppconn.so
- -lpthread
- )
- #add_executable(parkspace_client
- # ./test/parkspace_client.cpp
- # ${error_src}
- # ${message_src}
- # ${TOOL_SRC}
- # ${COMMUNICATION_SRC}
- # )
- #target_link_libraries(parkspace_client
- # nnxx
- # nanomsg
- # ${PROTOBUF_LIBRARIES}
- # ${PCL_LIBRARIES}
- # /usr/local/lib/libglog.a
- # /usr/local/lib/libgflags.a
- # )
- ## db test
- #add_executable(db_test
- # ./test/db_test.cpp
- # ./parkspace_allocation/database_controller.cpp
- # ${error_src}
- # ${TOOL_SRC}
- # )
- #target_link_libraries(db_test
- # ${PROTOBUF_LIBRARIES}
- # /usr/local/lib/libglog.a
- # /usr/local/lib/libgflags.a
- # libmysqlcppconn.so pthread
- # )
|