Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel Firmware
serial
Commits
842e087f
Commit
842e087f
authored
4 years ago
by
Evan Lojewski
Browse files
Options
Download
Email Patches
Plain Diff
build: Remove requirement for catkin
parent
cbcca7c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
72 deletions
+4
-72
CMakeLists.txt
CMakeLists.txt
+2
-44
package.xml
package.xml
+0
-26
src/impl/list_ports/list_ports_linux.cc
src/impl/list_ports/list_ports_linux.cc
+2
-2
No files found.
CMakeLists.txt
View file @
842e087f
cmake_minimum_required
(
VERSION
2.8.3
)
cmake_minimum_required
(
VERSION
3.0
)
project
(
serial
)
# Find catkin
find_package
(
catkin REQUIRED
)
if
(
APPLE
)
find_library
(
IOKIT_LIBRARY IOKit
)
find_library
(
FOUNDATION_LIBRARY Foundation
)
endif
()
if
(
UNIX AND NOT APPLE
)
# If Linux, add rt and pthread
set
(
rt_LIBRARIES rt
)
set
(
pthread_LIBRARIES 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
()
## Sources
set
(
serial_SRCS
src/serial.cc
...
...
@@ -56,26 +36,4 @@ else()
target_link_libraries
(
${
PROJECT_NAME
}
setupapi
)
endif
()
## Uncomment for example
add_executable
(
serial_example examples/serial_example.cc
)
add_dependencies
(
serial_example
${
PROJECT_NAME
}
)
target_link_libraries
(
serial_example
${
PROJECT_NAME
}
)
## Include headers
include_directories
(
include
)
## Install executable
install
(
TARGETS
${
PROJECT_NAME
}
ARCHIVE DESTINATION
${
CATKIN_PACKAGE_LIB_DESTINATION
}
LIBRARY DESTINATION
${
CATKIN_PACKAGE_LIB_DESTINATION
}
RUNTIME DESTINATION
${
CATKIN_GLOBAL_BIN_DESTINATION
}
)
## Install headers
install
(
FILES include/serial/serial.h include/serial/v8stdint.h
DESTINATION
${
CATKIN_GLOBAL_INCLUDE_DESTINATION
}
/serial
)
## Tests
if
(
CATKIN_ENABLE_TESTING
)
add_subdirectory
(
tests
)
endif
()
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC include
)
This diff is collapsed.
Click to expand it.
package.xml
deleted
100644 → 0
View file @
cbcca7c8
<?xml version="1.0"?>
<package>
<name>
serial
</name>
<version>
1.2.1
</version>
<description>
Serial is a cross-platform, simple to use library for using serial ports on computers.
This library provides a C++, object oriented interface for interacting with RS-232
like devices on Linux and Windows.
</description>
<maintainer
email=
"william@osrfoundation.org"
>
William Woodall
</maintainer>
<license>
MIT
</license>
<url
type=
"website"
>
http://wjwwood.github.com/serial/
</url>
<url
type=
"repository"
>
https://github.com/wjwwood/serial
</url>
<url
type=
"bugtracker"
>
https://github.com/wjwwood/serial/issues
</url>
<author
email=
"wjwwood@gmail.com"
>
William Woodall
</author>
<author
email=
"ash.gti@gmail.com"
>
John Harrison
</author>
<buildtool_depend>
catkin
</buildtool_depend>
<test_depend>
boost
</test_depend>
</package>
This diff is collapsed.
Click to expand it.
src/impl/list_ports/list_ports_linux.cc
View file @
842e087f
...
...
@@ -54,13 +54,13 @@ glob(const vector<string>& patterns)
glob_t
glob_results
;
int
glob_retval
=
glob
(
patterns
[
0
].
c_str
(),
0
,
NULL
,
&
glob_results
);
(
void
)
glob
(
patterns
[
0
].
c_str
(),
0
,
NULL
,
&
glob_results
);
vector
<
string
>::
const_iterator
iter
=
patterns
.
begin
();
while
(
++
iter
!=
patterns
.
end
())
{
glob_retval
=
glob
(
iter
->
c_str
(),
GLOB_APPEND
,
NULL
,
&
glob_results
);
(
void
)
glob
(
iter
->
c_str
(),
GLOB_APPEND
,
NULL
,
&
glob_results
);
}
for
(
int
path_index
=
0
;
path_index
<
glob_results
.
gl_pathc
;
path_index
++
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment