mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
parent
c57285f30a
commit
daa675f463
@ -2,13 +2,17 @@ cmake_minimum_required(VERSION 2.8.3)
|
||||
project(serial)
|
||||
|
||||
# Find catkin
|
||||
option(BUILD_WITH_CATKIN "Build using catkin" ON)
|
||||
if(BUILD_WITH_CATKIN)
|
||||
find_package(catkin REQUIRED)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
endif()
|
||||
|
||||
if(catkin_FOUND)
|
||||
if(UNIX AND NOT APPLE)
|
||||
# If Linux, add rt and pthread
|
||||
catkin_package(
|
||||
@ -23,6 +27,10 @@ else()
|
||||
INCLUDE_DIRS include
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(CATKIN_PACKAGE_LIB_DESTINATION lib)
|
||||
set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
|
||||
endif()
|
||||
|
||||
## Sources
|
||||
set(serial_SRCS
|
||||
|
||||
@ -22,6 +22,9 @@ API Documentation: http://wjwwood.github.com/serial/doc/1.1.0/index.html
|
||||
* [empy](http://www.alcyone.com/pyos/empy/) - Python templating library
|
||||
* [catkin_pkg](http://pypi.python.org/pypi/catkin_pkg/) - Runtime Python library for catkin
|
||||
|
||||
Basic build and install without catkin is possible by appending
|
||||
`CMAKE_FLAGS=-DBUILD_WITH_CATKIN=OFF` to `make` commands below.
|
||||
|
||||
### Install
|
||||
|
||||
Get the code:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user