--------------------- How to open a catkin package in QT creator --------------------
- create the pkg
catkin_create_pkg <package name=""> [depend 1] [depend 2] [depend 3]
- catkin_make --source .
to make build, devel and CMakeLists.txt file
source ./devel/setup.bash
- remove the CMakeLists.txt in the folder u have catkin package (not the one inside the package)
go to opt/ros/hydro/share/catkin/cmake
copy "toplevel.cmake" to the folder u have package
- 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})
open a QT (go to QT folder and run the file) from a terminal that u've sourced the setup.bash file
In QT creator ...
open project -> go to the folder of a package -> open "CMakeLists.txt"
Build Location: choose "build" folder from the folder of a package
Run Cmake : -DCATKIN_DEVEL_PREFIX=../devel -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug
12.
In catkin we support out of source builds, which is something that QtCreator usually does by default. Why do you think that the bin and lib folders need to be in the package directory?
I didn't say that - I'm well aware that catkin puts them outside the package directory. As I noted, the problem is that qtcreator is putting them in the wrong place relative to where catkin_make puts them, which means that the executables aren't used properly.
I see what you are asking now.