Permalink
Browse files

Upgraded to compile with ros fuerte compiling system, catkin. NOTE: s…

…till not tested for backward compatibility
  • Loading branch information...
1 parent e0be9cc commit acc0f6c9a3700c3769d714344e7c71713b443d98 jorge committed Feb 2, 2012
View
25 CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.4.6)
-include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+# cmake_minimum_required(VERSION 2.4.6)
+# include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Append to CPACK_SOURCE_IGNORE_FILES a semicolon-separated list of
# directories (or patterns, but directories should suffice) that should
@@ -14,4 +14,23 @@ include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# variables.
#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental)
-rosbuild_make_distribution(0.1.2)
+# DJS - I think this is old rosbuild macro only
+#rosbuild_make_distribution(0.1.2)
+
+cmake_minimum_required(VERSION 2.8)
+
+project(ros_qt)
+
+find_package(catkin)
+
+foreach(subdir
+ qt_build
+ qt_create
+ qt_tutorials
+ )
+ add_subdirectory(${subdir})
+endforeach()
+
+install(FILES stack.xml stack.yaml qt_ros_dev.rosinstall qt_ros.rosinstall README.mediawiki
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_ros)
+
View
25 qt_build/CMakeLists.txt
@@ -1,20 +1,11 @@
-##############################################################################
-# Rosbuild2
-##############################################################################
+project(qt_build)
+find_package(ROS COMPONENTS catkin)
-if(ROSBUILD)
- include(rosbuild.cmake OPTIONAL)
- return()
-endif()
+install(FILES .cproject .project qt-ros.cmake rosbuild.cmake manifest.xml CMakeLists.txt
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_build
+ )
-##############################################################################
-# Rosbuild1
-##############################################################################
+catkin_project(qt_build
+ VERSION 0.0.0
+ )
-cmake_minimum_required(VERSION 2.4.6)
-include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
-
-rosbuild_init()
-
-set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
View
25 qt_create/CMakeLists.txt
@@ -0,0 +1,25 @@
+project(qt_create)
+find_package(ROS COMPONENTS catkin)
+
+# TODO Daniel crea un link a roscreate-qt-pkg en /usr/local/bin
+
+install(FILES scripts/roscreate-qt-pkg
+ PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_create/scripts
+ )
+
+install(DIRECTORY src
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_create
+ )
+
+install(DIRECTORY templates
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_create
+ )
+
+install(FILES .cproject .project .pydevproject manifest.xml CMakeLists.txt
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_create
+ )
+
+catkin_project(qt_create
+ VERSION 0.0.0
+ )
View
60 qt_tutorials/CMakeLists.txt
@@ -1,46 +1,58 @@
-##############################################################################
-# Rosbuild2
-##############################################################################
-
-if(ROSBUILD)
- include(rosbuild.cmake OPTIONAL)
- return()
-endif()
-
-##############################################################################
-# CMake
-##############################################################################
+project(qt_tutorials)
+find_package(catkin)
+# These find_package calls setup ROS_INCLUDE_DIRS and ROS_LIBRARIES and
+# all the component variables too (e.g. roscpp_INCLUDE_DIR?)
+find_package(ROS REQUIRED COMPONENTS qt_build std_msgs roscpp)
-cmake_minimum_required(VERSION 2.4.6)
+include_directories(${ROS_INCLUDE_DIRS})
##############################################################################
# Ros Environment Configuration
##############################################################################
-include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
-rosbuild_init()
-set(CMAKE_VERBOSE_MAKEFILE TRUE)
-set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+#include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+#rosbuild_init()
+# set(CMAKE_VERBOSE_MAKEFILE TRUE)
+# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
##############################################################################
# Qt Environment
##############################################################################
-rosbuild_include(qt_build qt-ros)
+# This is dan's qt cmake calls we have to replace
+
+include(${CMAKE_CURRENT_SOURCE_DIR}/../qt_build/qt-ros.cmake)
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here
##############################################################################
# Comms
##############################################################################
-rosbuild_gensrv()
+add_service_files(DIRECTORY srv FILES TwoInts.srv)
+generate_messages(DEPENDENCIES std_msgs)
##############################################################################
# Subprojects
##############################################################################
-add_subdirectory(common)
-add_subdirectory(qtalker)
-add_subdirectory(qlistener)
-add_subdirectory(qadd_server)
-add_subdirectory(qadd_client)
+foreach(subdir
+ common
+ qtalker
+ qlistener
+ qadd_server
+ qadd_client
+ )
+ install(DIRECTORY ${subdir} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_tutorials)
+ add_subdirectory(${subdir})
+endforeach()
+
+install(FILES .cproject .gitignore .project rosbuild.cmake manifest.xml CMakeLists.txt
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_tutorials
+ )
+install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_tutorials)
+install(DIRECTORY ui DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qt_tutorials)
+
+catkin_project(qt_tutorials
+ VERSION 0.0.0
+ )
+
View
4 qt_tutorials/common/CMakeLists.txt
@@ -20,5 +20,7 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK
# Binaries
##############################################################################
-rosbuild_add_library(qtutorials ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
+add_library(qtutorials SHARED ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_link_libraries(qtutorials ${QT_LIBRARIES})
+target_link_libraries(qtutorials ${ROS_LIBRARIES})
+install(TARGETS qtutorials LIBRARY DESTINATION lib)
View
3 qt_tutorials/qadd_client/CMakeLists.txt
@@ -15,5 +15,6 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK
# Binaries
##############################################################################
-rosbuild_add_executable(qadd_client ${QT_SOURCES} ${QT_MOC_HPP})
+add_executable(qadd_client ${QT_SOURCES} ${QT_MOC_HPP})
target_link_libraries(qadd_client qtutorials)
+install(TARGETS qadd_client RUNTIME DESTINATION share/qt_tutorials/bin)
View
3 qt_tutorials/qadd_server/CMakeLists.txt
@@ -15,5 +15,6 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK
# Binaries
##############################################################################
-rosbuild_add_executable(qadd_server ${QT_SOURCES} ${QT_MOC_HPP})
+add_executable(qadd_server ${QT_SOURCES} ${QT_MOC_HPP})
target_link_libraries(qadd_server qtutorials)
+install(TARGETS qadd_server RUNTIME DESTINATION share/qt_tutorials/bin)
View
3 qt_tutorials/qlistener/CMakeLists.txt
@@ -15,5 +15,6 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK
# Binaries
##############################################################################
-rosbuild_add_executable(qlistener ${QT_SOURCES} ${QT_MOC_HPP})
+add_executable(qlistener ${QT_SOURCES} ${QT_MOC_HPP})
target_link_libraries(qlistener qtutorials)
+install(TARGETS qlistener RUNTIME DESTINATION share/qt_tutorials/bin)
View
3 qt_tutorials/qtalker/CMakeLists.txt
@@ -15,5 +15,6 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK
# Binaries
##############################################################################
-rosbuild_add_executable(qtalker ${QT_SOURCES} ${QT_MOC_HPP})
+add_executable(qtalker ${QT_SOURCES} ${QT_MOC_HPP})
target_link_libraries(qtalker qtutorials)
+install(TARGETS qtalker RUNTIME DESTINATION share/qt_tutorials/bin)
View
1 stack.xml
@@ -9,5 +9,4 @@
<url>http://ros.org/wiki/qt_ros</url>
<depend stack="ros" /> <!-- rosbuild -->
<depend stack="ros_comm" /> <!-- std_msgs, roscpp -->
-
</stack>
View
13 stack.yaml
@@ -0,0 +1,13 @@
+Catkin-ProjectName: qt_ros
+Version: 0.1.2
+Description: This stack provides templates, tutorials and other resources that assist qt on ros development.
+Author: Daniel Stonier
+Maintainer: Daniel Stonier
+Homepage: http://ros.org/wiki/qt_ros
+
+Depends: catkin, std_msgs, ros_comm, qt4
+
+Catkin-CopyrightType: willowgarage
+Catkin-DebRulesType: cmake
+#Catkin-ROS-Message-Generator: cpp
+

0 comments on commit acc0f6c

Please sign in to comment.