|
|
|
@@ -1,18 +1,4 @@
|
|
|
|
cmake_minimum_required(VERSION 3.0.2)
|
|
|
|
cmake_minimum_required(VERSION 3.0.2)
|
|
|
|
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
# Dual-mode CMakeLists.txt: Supports both Catkin and Standalone CMake
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Detect if building with Catkin
|
|
|
|
|
|
|
|
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
|
|
|
|
|
|
|
|
set(BUILDING_WITH_CATKIN TRUE)
|
|
|
|
|
|
|
|
message(STATUS "Building robot_xmlrpcpp with Catkin")
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
set(BUILDING_WITH_CATKIN FALSE)
|
|
|
|
|
|
|
|
message(STATUS "Building robot_xmlrpcpp with Standalone CMake")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
project(robot_xmlrpcpp)
|
|
|
|
project(robot_xmlrpcpp)
|
|
|
|
|
|
|
|
|
|
|
|
## Compile as C++17
|
|
|
|
## Compile as C++17
|
|
|
|
@@ -25,25 +11,21 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
# Find Packages
|
|
|
|
# Find Packages
|
|
|
|
# ========================================================
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
|
|
|
|
|
|
|
|
set(BUILDING_WITH_CATKIN TRUE)
|
|
|
|
|
|
|
|
message(STATUS "Building robot_xmlrpcpp with Catkin")
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
set(BUILDING_WITH_CATKIN FALSE)
|
|
|
|
|
|
|
|
message(STATUS "Building robot_xmlrpcpp with Standalone CMake")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if(BUILDING_WITH_CATKIN)
|
|
|
|
if(BUILDING_WITH_CATKIN)
|
|
|
|
## Find catkin macros and libraries
|
|
|
|
## Find catkin macros and libraries
|
|
|
|
find_package(catkin REQUIRED)
|
|
|
|
find_package(catkin REQUIRED)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## System dependencies are found with CMake's conventions
|
|
|
|
|
|
|
|
find_package(console_bridge REQUIRED)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
# Catkin specific configuration
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(BUILDING_WITH_CATKIN)
|
|
|
|
|
|
|
|
## The catkin_package macro generates cmake config files for your package
|
|
|
|
|
|
|
|
catkin_package(
|
|
|
|
catkin_package(
|
|
|
|
INCLUDE_DIRS include
|
|
|
|
INCLUDE_DIRS include
|
|
|
|
LIBRARIES robot_xmlrpcpp
|
|
|
|
LIBRARIES robot_xmlrpcpp
|
|
|
|
CATKIN_DEPENDS
|
|
|
|
# CATKIN_DEPENDS
|
|
|
|
DEPENDS console_bridge
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
@@ -52,13 +34,12 @@ endif()
|
|
|
|
###########
|
|
|
|
###########
|
|
|
|
|
|
|
|
|
|
|
|
## Specify additional locations of header files
|
|
|
|
## Specify additional locations of header files
|
|
|
|
include_directories(
|
|
|
|
|
|
|
|
include
|
|
|
|
|
|
|
|
${console_bridge_INCLUDE_DIRS}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(BUILDING_WITH_CATKIN)
|
|
|
|
if(BUILDING_WITH_CATKIN)
|
|
|
|
include_directories(${catkin_INCLUDE_DIRS})
|
|
|
|
include_directories(${catkin_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
|
|
|
|
include
|
|
|
|
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
## Declare a C++ library
|
|
|
|
## Declare a C++ library
|
|
|
|
|