diff --git a/catkinPKGfromQT.txt b/catkinPKGfromQT.txt new file mode 100644 index 0000000000000000000000000000000000000000..215f64628cd96a5d1534901e56f61e4c0a74b364 --- /dev/null +++ b/catkinPKGfromQT.txt @@ -0,0 +1,44 @@ +--------------------- How to open a catkin package in QT creator -------------------- + +1. create the pkg + +catkin_create_pkg <package name> [depend 1] [depend 2] [depend 3] + +2. catkin_make --source . + +to make build, devel and CMakeLists.txt file + +3. source ./devel/setup.bash + +4. +5. remove the CMakeLists.txt in the folder u have catkin package (not the one inside the package) + +6. go to opt/ros/hydro/share/catkin/cmake + +copy "toplevel.cmake" to the folder u have package + +7. Rename it to "CMakeLists.txt" + +copy the following lines @ the end of this file: +--------------------------------------------------------------- +#Add all files in subdirectories of the project in +# a dummy_target so qtcreator have access to all files +FILE(GLOB children ${CMAKE_SOURCE_DIR}/*) +FOREACH(child ${children}) + IF(IS_DIRECTORY ${child}) + file(GLOB_RECURSE dir_files "${child}/*") + LIST(APPEND extra_files ${dir_files}) + ENDIF() +ENDFOREACH() +add_custom_target(dummy_${PROJECT_NAME} SOURCES ${extra_files}) +----------------------------------------------------------------- +8. open a QT (go to QT folder and run the file) from a terminal that u've sourced the setup.bash file + +9. In QT creator ... +open project -> go to the folder of a package -> open "CMakeLists.txt" + +10. Build Location: choose "build" folder from the folder of a package + +11. Run Cmake : -DCATKIN_DEVEL_PREFIX=../devel -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug + +12.