CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. cmake_minimum_required(VERSION 2.8.12)
  2. project(rosinterface)
  3. include(FindPkgConfig)
  4. find_package(autoware_build_flags REQUIRED)
  5. find_package(catkin REQUIRED
  6. roscpp
  7. tf
  8. )
  9. set(CMAKE_AUTOMOC ON)
  10. #set(CMAKE_AUTOUIC ON)
  11. #set(CMAKE_AUTORCC ON)
  12. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  13. SET(CMAKE_CXX_FLAGS "-O2 -g -Wall ${CMAKE_CXX_FLAGS}")
  14. find_package(Qt5Core REQUIRED)
  15. find_package(Qt5Widgets REQUIRED)
  16. catkin_package(
  17. INCLUDE_DIRS include
  18. LIBRARIES rosinterface
  19. )
  20. include_directories(
  21. ${CMAKE_CURRENT_SOURCE_DIR}/include
  22. ${catkin_INCLUDE_DIRS}
  23. )
  24. qt5_wrap_cpp(rosinterface_SRC
  25. include/rosinterface/rosinterface.h
  26. )
  27. add_library(rosinterface
  28. ROSInterface/rosinterface.cpp
  29. ${rosinterface_SRC}
  30. )
  31. target_link_libraries(rosinterface
  32. ${catkin_LIBRARIES}
  33. Qt5::Core
  34. Qt5::Widgets
  35. )
  36. install(DIRECTORY include/${PROJECT_NAME}/
  37. DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  38. FILES_MATCHING PATTERN "*.h"
  39. )
  40. install(TARGETS rosinterface
  41. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  42. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  43. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  44. )