mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Merge ef98ccae7983a10dc99a8ff07c4f14d5a020916e into d3713af096bdfdc1709e57e0066949314b7db1a6
This commit is contained in:
commit
ec5794d32d
@ -2,26 +2,32 @@ cmake_minimum_required(VERSION 2.8.3)
|
||||
project(serial)
|
||||
|
||||
# Find catkin
|
||||
find_package(catkin REQUIRED)
|
||||
find_package(catkin)
|
||||
|
||||
if(APPLE)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# If Linux, add rt and pthread
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
DEPENDS rt pthread
|
||||
)
|
||||
if(catkin_FOUND)
|
||||
if(UNIX AND NOT APPLE)
|
||||
# If Linux, add rt and pthread
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
DEPENDS rt pthread
|
||||
)
|
||||
else()
|
||||
# Otherwise normal call
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# Otherwise normal call
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include
|
||||
)
|
||||
message(WARNING "catkin not found, building without catkin support")
|
||||
set(CATKIN_PACKAGE_LIB_DESTINATION lib)
|
||||
set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
|
||||
endif()
|
||||
|
||||
## Sources
|
||||
|
||||
@ -30,6 +30,8 @@ Optional (for documentation):
|
||||
* [Doxygen](http://www.doxygen.org/) - Documentation generation tool
|
||||
* [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
|
||||
|
||||
Get the code:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user