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,13 +2,14 @@ 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(catkin_FOUND)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
# If Linux, add rt and pthread # If Linux, add rt and pthread
catkin_package( catkin_package(
@ -23,6 +24,11 @@ else()
INCLUDE_DIRS include INCLUDE_DIRS include
) )
endif() endif()
else()
message(WARNING "catkin not found, building without catkin support")
set(CATKIN_PACKAGE_LIB_DESTINATION lib)
set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
endif()
## Sources ## Sources
set(serial_SRCS set(serial_SRCS

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: