fork(1) download
  1. cmake_minimum_required(VERSION 2.4.6)
  2. include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
  3.  
  4. # Set the build type. Options are:
  5. # Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
  6. # Debug : w/ debug symbols, w/o optimization
  7. # Release : w/o debug symbols, w/ optimization
  8. # RelWithDebInfo : w/ debug symbols, w/ optimization
  9. # MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
  10. set(ROS_BUILD_TYPE Release)
  11.  
  12. rosbuild_init()
  13.  
  14. #set the default path for built executables to the "bin" directory
  15. set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
  16. #set the default path for built libraries to the "lib" directory
  17. set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
  18.  
  19. #uncomment if you have defined messages
  20. rosbuild_genmsg()
  21. #uncomment if you have defined services
  22. #rosbuild_gensrv()
  23. #common commands for building c++ executables and libraries
  24. #rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
  25. #target_link_libraries(${PROJECT_NAME} another_library)
  26. #rosbuild_add_boost_directories()
  27. #rosbuild_link_boost(${PROJECT_NAME} thread)
  28. #rosbuild_add_executable(example examples/example.cpp)
  29. ##############################################################################
  30. # Required 3rd party
  31. ##############################################################################
  32. # http://q...content-available-to-author-only...e.net/wiki/Qt4_with_cmake
  33.  
  34. find_package(Qt4 REQUIRED)
  35. SET(QT_USE_QTXML TRUE)
  36. SET(QT_USE_QTOPENGL TRUE)
  37. include(${QT_USE_FILE})
  38. # This is necessary as all ui files etc will get dumped in the bottom of the
  39. # binary directory.
  40. include_directories(${CMAKE_CURRENT_BINARY_DIR})
  41. ##############################################################################
  42. # Sections
  43. ##############################################################################
  44.  
  45. file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
  46. file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
  47. file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/local/*.hpp src/myglwidget.h)
  48.  
  49. QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
  50. QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
  51. QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})
  52.  
  53. ##############################################################################
  54. # Sources
  55. ##############################################################################
  56.  
  57. file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/gicp-fallback.cpp src/main.cpp src/myglwidget.cpp)
  58.  
  59. ##############################################################################
  60. # Binaries
  61. ##############################################################################
  62.  
  63. rosbuild_add_executable(listener ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
  64. target_link_libraries(listener X11 m GL GLU glut ${QT_LIBRARIES})
  65.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty