Skip to content

Commit 0f481e0

Browse files
committed
Initial commit
0 parents  commit 0f481e0

35 files changed

+5497
-0
lines changed

.clang-format

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- mode: yaml -*-
2+
# vi: set ft=yaml :
3+
4+
---
5+
BasedOnStyle: Google

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_size = 2
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false\

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/_build
2+
/bazel-*

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
sudo: false
3+
language: cpp
4+
compiler:
5+
- clang
6+
- gcc
7+
os:
8+
- linux
9+
- osx
10+
install:
11+
- if [[ "${TRAVIS_OS_NAME}" = linux ]]; then CMAKE_PLATFORM=Linux; else CMAKE_PLATFORM=Darwin; fi
12+
- wget "https://cmake.org/files/v3.11/cmake-3.11.1-${CMAKE_PLATFORM}-x86_64.tar.gz"
13+
- tar -xf "cmake-3.11.1-${CMAKE_PLATFORM}-x86_64.tar.gz"
14+
- export PATH="${TRAVIS_BUILD_DIR}/cmake-3.11.1-${CMAKE_PLATFORM}-x86_64/bin:${PATH}"
15+
script:
16+
- mkdir _build
17+
- cd _build
18+
- cmake -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ..
19+
- ctest -VV -D Experimental .

AVO.pc.in

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# AVO.pc
3+
# AVO2 Library
4+
#
5+
# Copyright 2010 University of North Carolina at Chapel Hill
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# Please send all bug reports to <geom@cs.unc.edu>.
20+
#
21+
# The authors may be contacted via:
22+
#
23+
# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha
24+
# Dept. of Computer Science
25+
# 201 S. Columbia St.
26+
# Frederick P. Brooks, Jr. Computer Science Bldg.
27+
# Chapel Hill, N.C. 27599-3175
28+
# United States of America
29+
#
30+
# <http://gamma.cs.unc.edu/AVO/>
31+
#
32+
33+
prefix=@CMAKE_INSTALL_PREFIX@
34+
exec_prefix=${prefix}
35+
libdir=${exec_prefix}/@AVO_LIBRARY_DIR@
36+
includedir=${prefix}/@AVO_INCLUDE_DIR@
37+
38+
Name: AVO2 Library
39+
Description: Reciprocal Collision Avoidance with Acceleration-Velocity Obstacles
40+
URL: http://gamma.cs.unc.edu/AVO/
41+
Version: @PROJECT_VERSION@
42+
Libs: -L${libdir} -l@AVO_LIBRARY@
43+
Cflags: -I${includedir}

AVOConfig.cmake.in

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# AVOConfig.cmake
3+
# AVO2 Library
4+
#
5+
# Copyright 2010 University of North Carolina at Chapel Hill
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# Please send all bug reports to <geom@cs.unc.edu>.
20+
#
21+
# The authors may be contacted via:
22+
#
23+
# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha
24+
# Dept. of Computer Science
25+
# 201 S. Columbia St.
26+
# Frederick P. Brooks, Jr. Computer Science Bldg.
27+
# Chapel Hill, N.C. 27599-3175
28+
# United States of America
29+
#
30+
# <http://gamma.cs.unc.edu/AVO/>
31+
#
32+
33+
@PACKAGE_INIT@
34+
35+
set(AVO_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
36+
set(AVO_VERSION_MINOR @PROJECT_VERSION_MINOR@)
37+
set(AVO_VERSION_PATCH @PROJECT_VERSION_PATCH@)
38+
39+
set(AVO_VERSION @PROJECT_VERSION@)
40+
41+
set_and_check(AVO_INCLUDE_DIRS "@PACKAGE_AVO_INCLUDE_DIR@")
42+
set_and_check(AVO_LIBRARY_DIRS "@PACKAGE_AVO_LIBRARY_DIR@")
43+
set(AVO_LIBRARIES @PROJECT_NAME@::@AVO_LIBRARY@)
44+
45+
include("${CMAKE_CURRENT_LIST_DIR}/AVOTargets.cmake")

BUILD

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# -*- mode: python -*-
2+
# vi: set ft=python :
3+
4+
#
5+
# BUILD
6+
# AVO2 Library
7+
#
8+
# Copyright 2010 University of North Carolina at Chapel Hill
9+
#
10+
# Licensed under the Apache License, Version 2.0 (the "License");
11+
# you may not use this file except in compliance with the License.
12+
# You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS,
18+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
# See the License for the specific language governing permissions and
20+
# limitations under the License.
21+
#
22+
# Please send all bug reports to <geom@cs.unc.edu>.
23+
#
24+
# The authors may be contacted via:
25+
#
26+
# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha
27+
# Dept. of Computer Science
28+
# 201 S. Columbia St.
29+
# Frederick P. Brooks, Jr. Computer Science Bldg.
30+
# Chapel Hill, N.C. 27599-3175
31+
# United States of America
32+
#
33+
# <http://gamma.cs.unc.edu/AVO/>
34+
#
35+
36+
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_deb", "pkg_tar")
37+
38+
licenses(["notice"])
39+
40+
exports_files(["LICENSE"])
41+
42+
pkg_tar(
43+
name = "doc",
44+
srcs = ["LICENSE"],
45+
mode = "0644",
46+
package_dir = "/usr/share/doc/AVO",
47+
visibility = ["//visibility:private"],
48+
)
49+
50+
genrule(
51+
name = "pc",
52+
outs = ["AVO.pc"],
53+
cmd = """
54+
cat << 'EOF' > $@
55+
#
56+
# AVO.pc
57+
# AVO2 Library
58+
#
59+
# Copyright 2010 University of North Carolina at Chapel Hill
60+
#
61+
# Licensed under the Apache License, Version 2.0 (the "License");
62+
# you may not use this file except in compliance with the License.
63+
# You may obtain a copy of the License at
64+
#
65+
# http://www.apache.org/licenses/LICENSE-2.0
66+
#
67+
# Unless required by applicable law or agreed to in writing, software
68+
# distributed under the License is distributed on an "AS IS" BASIS,
69+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70+
# See the License for the specific language governing permissions and
71+
# limitations under the License.
72+
#
73+
# Please send all bug reports to <geom@cs.unc.edu>.
74+
#
75+
# The authors may be contacted via:
76+
#
77+
# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha
78+
# Dept. of Computer Science
79+
# 201 S. Columbia St.
80+
# Frederick P. Brooks, Jr. Computer Science Bldg.
81+
# Chapel Hill, N.C. 27599-3175
82+
# United States of America
83+
#
84+
# <http://gamma.cs.unc.edu/AVO/>
85+
#
86+
87+
prefix=/usr
88+
exec_prefix=$${prefix}
89+
libdir=$${exec_prefix}/lib
90+
includedir=$${prefix}/include/AVO
91+
92+
Name: AVO2 Library
93+
Description: Reciprocal Collision Avoidance with Acceleration-Velocity Obstacles
94+
URL: http://gamma.cs.unc.edu/AVO/
95+
Version: 1.0.0
96+
Libs: -L$${libdir} -lAVO
97+
Cflags: -I$${includedir}
98+
EOF
99+
""",
100+
visibility = ["//visibility:private"],
101+
)
102+
103+
pkg_tar(
104+
name = "pkgconfig",
105+
srcs = ["AVO.pc"],
106+
mode = "0644",
107+
package_dir = "/usr/lib/pkgconfig",
108+
visibility = ["//visibility:private"],
109+
)
110+
111+
pkg_tar(
112+
name = "AVO",
113+
extension = "tar.gz",
114+
visibility = ["//visibility:public"],
115+
deps = [
116+
":doc",
117+
":pkgconfig",
118+
"//src:include",
119+
"//src:lib",
120+
],
121+
)
122+
123+
pkg_deb(
124+
name = "deb",
125+
architecture = "amd64",
126+
data = ":AVO",
127+
depends = [
128+
"libc6",
129+
"libgcc1",
130+
"libstdc++6",
131+
],
132+
description = "Reciprocal Collision Avoidance with Acceleration-Velocity Obstacles",
133+
homepage = "http://gamma.cs.unc.edu/AVO/",
134+
maintainer = "Jamie Snape",
135+
package = "avo",
136+
version = "1.0.0",
137+
visibility = ["//visibility:public"],
138+
)

CMakeLists.txt

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# -*- mode: cmake -*-
2+
# vi: set ft=cmake :
3+
4+
#
5+
# CMakeLists.txt
6+
# AVO2 Library
7+
#
8+
# Copyright 2010 University of North Carolina at Chapel Hill
9+
#
10+
# Licensed under the Apache License, Version 2.0 (the "License");
11+
# you may not use this file except in compliance with the License.
12+
# You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS,
18+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
# See the License for the specific language governing permissions and
20+
# limitations under the License.
21+
#
22+
# Please send all bug reports to <geom@cs.unc.edu>.
23+
#
24+
# The authors may be contacted via:
25+
#
26+
# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha
27+
# Dept. of Computer Science
28+
# 201 S. Columbia St.
29+
# Frederick P. Brooks, Jr. Computer Science Bldg.
30+
# Chapel Hill, N.C. 27599-3175
31+
# United States of America
32+
#
33+
# <http://gamma.cs.unc.edu/AVO/>
34+
#
35+
36+
cmake_minimum_required(VERSION 3.0)
37+
project(AVO VERSION 1.0.0 LANGUAGES CXX)
38+
39+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
40+
set(CMAKE_BUILD_TYPE Release CACHE STRING
41+
"Choose the type of build; options are Debug Release RelWithDebInfo MinSizeRel"
42+
FORCE)
43+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
44+
STRINGS Debug Release RelWithDebInfo MinSizeRel)
45+
endif()
46+
47+
include(CTest)
48+
49+
option(BUILD_DOCUMENTATION "Build documentation" OFF)
50+
51+
if(WIN32)
52+
set(BUILD_SHARED_LIBS OFF)
53+
else()
54+
option(BUILD_SHARED_LIBS "Build all libraries as shared" ON)
55+
endif()
56+
57+
option(ENABLE_OPENMP "Enable OpenMP if available" OFF)
58+
59+
include(GNUInstallDirs)
60+
61+
set(AVO_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
62+
set(AVO_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
63+
set(AVO_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
64+
set(AVO_LIBRARY AVO)
65+
66+
if(ENABLE_OPENMP)
67+
find_package(OpenMP MODULE)
68+
endif()
69+
70+
set(CMAKE_CXX_STANDARD 98)
71+
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
72+
73+
add_subdirectory(src)
74+
add_subdirectory(examples)
75+
add_subdirectory(doc)
76+
77+
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
78+
79+
include(CMakePackageConfigHelpers)
80+
81+
configure_package_config_file(AVOConfig.cmake.in AVOConfig.cmake
82+
INSTALL_DESTINATION ${AVO_DIR}
83+
PATH_VARS AVO_INCLUDE_DIR AVO_LIBRARY_DIR
84+
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
85+
86+
write_basic_package_version_file(AVOConfigVersion.cmake
87+
COMPATIBILITY SameMajorVersion)
88+
89+
install(FILES
90+
"${CMAKE_CURRENT_BINARY_DIR}/AVOConfig.cmake"
91+
"${CMAKE_CURRENT_BINARY_DIR}/AVOConfigVersion.cmake"
92+
DESTINATION ${AVO_DIR})
93+
94+
find_package(PkgConfig MODULE)
95+
96+
if(PkgConfig_FOUND)
97+
configure_file(AVO.pc.in AVO.pc @ONLY)
98+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AVO.pc"
99+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
100+
endif()
101+
102+
include(InstallRequiredSystemLibraries)
103+
104+
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
105+
set(CPACK_PACKAGE_CONTACT "Jamie Snape")
106+
set(CPACK_PACKAGE_VENDOR "University of North Carolina at Chapel Hill")
107+
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
108+
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
109+
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
110+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
111+
"Reciprocal Collision Avoidance with Acceleration-Velocity Obstacles")
112+
113+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
114+
set(CPACK_STRIP_FILES ON)
115+
116+
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
117+
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE http://gamma.cs.unc.edu/AVO/)
118+
set(CPACK_DEBIAN_PACKAGE_SECTION contrib/devel)
119+
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
120+
121+
set(CPACK_FREEBSD_PACKAGE_LICENSE APACHE20)
122+
123+
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
124+
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
125+
set(CPACK_RPM_PACKAGE_URL ${CPACK_DEBIAN_PACKAGE_HOMEPAGE})
126+
127+
include(CPack)

0 commit comments

Comments
 (0)