Skip to content

Commit

Permalink
driver: CMakeLists.txt: Moved to handling boost as a submodule
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Vorobiov <[email protected]>
  • Loading branch information
okawo80085 committed Aug 9, 2022
1 parent 7b09122 commit 6381129
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
28 changes: 15 additions & 13 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()


if (MSVC)
# all warnings as errors
add_compile_options(/W4 /WX)
else()
# all warnings as errors
add_compile_options(-Wall -Wextra -pedantic -Werror -Wno-missing-braces)
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")

# options
Expand Down Expand Up @@ -112,12 +104,16 @@ set(LAZY_SOCKETS_INCLUDE_DIR "lazy-sockets/src/")
add_subdirectory("gaze_master_plugins")

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost REQUIRED)
add_subdirectory(boost)

file(GLOB Boost_INCLUDE_DIRS
"./boost/libs/*/include"
)

# actual build instructions
include_directories(
${OPENVR_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${SHROOM_INCLUDE_DIR}
${LAZY_SOCKETS_INCLUDE_DIR}
"src/plugins/"
Expand All @@ -138,17 +134,23 @@ add_library(${TARGET_NAME} SHARED
${driver_hobovr_src}
)

if (MSVC)
# all warnings as errors
target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX)
else()
# all warnings as errors
target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -pedantic -Werror -Wno-missing-braces)
endif()

target_link_libraries(${TARGET_NAME}
"${OPENVR_LIBRARIES}"
shoom
lazy_sockets
-lstdc++fs
${Boost_DLL_LIBRARY}
boost_dll
${CMAKE_DL_LIBS}
)

message(NOTICE "boost_root: ${BOOST_ROOT}|")

install(
TARGETS
${TARGET_NAME}
Expand Down
1 change: 0 additions & 1 deletion driver/gaze_master_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ target_include_directories(gaze_logger PRIVATE
)

target_link_libraries(gaze_logger PRIVATE
${Boost_DLL_LIBRARY}
${CMAKE_DL_LIBS}
)

Expand Down

0 comments on commit 6381129

Please sign in to comment.