catkin build does not place executable in devel folder
I have a ROS1 noetic project with the following CMakeLists.txt
.
cmake_minimum_required(VERSION 3.0.2)
project(ball_tracker_ros)
find_package(ball_tracker REQUIRED)
find_package(catkin REQUIRED roscpp prophesee_event_msgs)
add_executable(${PROJECT_NAME} src/ball_tracker_ros.cpp)
# Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} )
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}
ball_tracker::ball_tracker)
target_include_directories(
${PROJECT_NAME}
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${catkin_INCLUDE_DIRS})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
target_compile_options(
${PROJECT_NAME}
PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-pipe
-march=native
-Wall
-Wextra
$<$<CONFIG:Release>:-O3>>
$<$<CONFIG:Debug>:-g
-ggdb3
-Og>>
$<$<CXX_COMPILER_ID:MSVC>:
$<$<CONFIG:Debug>:/Od
/Wall
/Zi>>)
When I run catkin build
, the executable (ball_tracker_ros
) is only in build/ball_tracker_ros/
and not in devel/lib/ball_ttracker_ros
(the folder devel/lib/ball_ttracker_ros
does not exist at all). Since I don't get any compilation/linking errors/warning and the binary is in the build folder, compilation seems fine. In the same workspace I also have this package. The executable of this package end in devel/lib/prophesee_ros_driver
. Therefore catkin build
seems to work and I expect the problem witin the package ball_tracker_ros
.