1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-23 04:04:54 +08:00

Merge ef98ccae7983a10dc99a8ff07c4f14d5a020916e into d3713af096bdfdc1709e57e0066949314b7db1a6

This commit is contained in:
Doug Johnston 2018-01-10 03:35:32 +00:00 committed by GitHub
commit ec5794d32d
2 changed files with 21 additions and 13 deletions

View File

@ -2,26 +2,32 @@ cmake_minimum_required(VERSION 2.8.3)
project(serial) project(serial)
# Find catkin # Find catkin
find_package(catkin REQUIRED) find_package(catkin)
if(APPLE) if(APPLE)
find_library(IOKIT_LIBRARY IOKit) find_library(IOKIT_LIBRARY IOKit)
find_library(FOUNDATION_LIBRARY Foundation) find_library(FOUNDATION_LIBRARY Foundation)
endif() endif()
if(UNIX AND NOT APPLE) if(catkin_FOUND)
# If Linux, add rt and pthread if(UNIX AND NOT APPLE)
catkin_package( # If Linux, add rt and pthread
LIBRARIES ${PROJECT_NAME} catkin_package(
INCLUDE_DIRS include LIBRARIES ${PROJECT_NAME}
DEPENDS rt pthread INCLUDE_DIRS include
) DEPENDS rt pthread
)
else()
# Otherwise normal call
catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include
)
endif()
else() else()
# Otherwise normal call message(WARNING "catkin not found, building without catkin support")
catkin_package( set(CATKIN_PACKAGE_LIB_DESTINATION lib)
LIBRARIES ${PROJECT_NAME} set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
INCLUDE_DIRS include
)
endif() endif()
## Sources ## Sources

View File

@ -30,6 +30,8 @@ Optional (for documentation):
* [Doxygen](http://www.doxygen.org/) - Documentation generation tool * [Doxygen](http://www.doxygen.org/) - Documentation generation tool
* [graphviz](http://www.graphviz.org/) - Graph visualization software * [graphviz](http://www.graphviz.org/) - Graph visualization software
If catkin is not available, project will build without catkin support, which will currently disable tests
### Install ### Install
Get the code: Get the code: