CMakeLists.txt 765 B

1234567891011121314151617181920
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(plc_proc)
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  4. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  5. set(CMAKE_BUILD_TYPE Debug)
  6. include_directories ("/home/youchen/Documents/modbus_test/include/")
  7. include_directories ("/usr/local/include/modbus/")
  8. include_directories ("/opt/ros/melodic/include/")
  9. include_directories ("/usr/include/eigen3/")
  10. link_directories ("/usr/local/lib")
  11. set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs)
  12. set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs)
  13. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
  14. #add_executable(plc_proc src/PLCProcess.cpp src/PLCModbus.cpp)
  15. add_executable(plc_proc src/plc_test.cpp src/PLCModbus.cpp)
  16. target_link_libraries(plc_proc modbus)