Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ TabWidth: 4
UseTab: Never
NamespaceIndentation: Inner

# Turning this off - not because I don't think it's a good idea, but because
# it's distracting to have it sorting includes on a feature branch. We can turn
# it on and sort includes in their own step.
SortIncludes: false

# AccessModifierOffset: -2
# ConstructorInitializerIndentWidth: 4
# AlignEscapedNewlinesLeft: false
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
path = vendor/UIforETWbins
url = https://github.com/OSVR/UIforETWbins.git
branch = master
[submodule "vendor/asio"]
path = vendor/asio
url = https://github.com/OSVR/asio.git
15 changes: 15 additions & 0 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ endif()

# Build VRPN as subproject
set(VRPN_GPL_SERVER FALSE CACHE INTERNAL "" FORCE)
if(WIN32)
set(VRPN_USE_WINSOCK2 TRUE CACHE INTERNAL "" FORCE)
endif()
if(BUILD_CLIENT AND NOT BUILD_SERVER)
set(VRPN_BUILD_SERVER_LIBRARY FALSE CACHE INTERNAL "" FORCE)
set(VRPN_BUILD_CLIENT_LIBRARY TRUE CACHE INTERNAL "" FORCE)
Expand Down Expand Up @@ -45,6 +48,18 @@ else()
target_include_directories(vendored-hidapi INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/vrpn/submodules/hidapi")
endif()

# Interface target for ASIO headers
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/asio/asio/include/asio.hpp")
message(FATAL_ERROR "You are missing the ASIO git submodule: you must have not done a recursive clone or updated without updating submodules. You can get it now by running git submodule update --init vendor/asio from the root source directory.")
endif()
add_library(vendored-asio INTERFACE)
target_include_directories(vendored-asio INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/asio/asio/include")
target_compile_definitions(vendored-asio INTERFACE ASIO_STANDALONE)
target_compile_options(vendored-asio INTERFACE "${OSVR_CXX11_FLAGS}")
if(WIN32)
target_link_libraries(vendored-asio INTERFACE ws2_32 mswsock)
endif()

# Interface target for util headers
add_library(util-headers INTERFACE)
target_include_directories(util-headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/util-headers")
Expand Down
1 change: 1 addition & 0 deletions vendor/asio
Submodule asio added at 722f7e