mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
Fix position of catkin_package()
According to http://wiki.ros.org/catkin/CMakeLists.txt#Example, should be located before add_library/add_executable.
This commit is contained in:
@@ -18,6 +18,12 @@ if(CATKIN_DEVEL_PREFIX)
|
||||
message(STATUS "Build package with catkin")
|
||||
set(BUILD_WITHOUT_ROS OFF)
|
||||
find_package(catkin REQUIRED)
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
# CATKIN_DEPENDS async_port
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
else()
|
||||
message(STATUS "Build package with cmake")
|
||||
set(BUILD_WITHOUT_ROS ON)
|
||||
@@ -187,13 +193,6 @@ if(BUILD_WITHOUT_ROS) # BUILD_WITHOUT_ROS
|
||||
|
||||
else() # BUILD_WITHOUT_ROS
|
||||
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
# CATKIN_DEPENDS async_port
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
## Add catkin install targets
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
|
||||
Reference in New Issue
Block a user