mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
parent
c57285f30a
commit
daa675f463
@ -2,26 +2,34 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(serial)
|
project(serial)
|
||||||
|
|
||||||
# Find catkin
|
# Find catkin
|
||||||
find_package(catkin REQUIRED)
|
option(BUILD_WITH_CATKIN "Build using catkin" ON)
|
||||||
|
if(BUILD_WITH_CATKIN)
|
||||||
|
find_package(catkin REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
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
|
set(CATKIN_PACKAGE_LIB_DESTINATION lib)
|
||||||
catkin_package(
|
set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
|
||||||
LIBRARIES ${PROJECT_NAME}
|
|
||||||
INCLUDE_DIRS include
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## Sources
|
## Sources
|
||||||
|
|||||||
@ -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
|
* [empy](http://www.alcyone.com/pyos/empy/) - Python templating library
|
||||||
* [catkin_pkg](http://pypi.python.org/pypi/catkin_pkg/) - Runtime Python library for catkin
|
* [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
|
### Install
|
||||||
|
|
||||||
Get the code:
|
Get the code:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user