Skip to content

Commit fa945fb

Browse files
committed
CMakeLists: Use the jsoncpp submodule included in VRPN.
1 parent 9d5d431 commit fa945fb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ endif()
173173

174174
find_package(Threads REQUIRED)
175175

176-
find_package(jsoncpp REQUIRED)
177-
if(TARGET jsoncpp_lib_static AND NOT TARGET jsoncpp_lib)
178-
add_library(jsoncpp_lib INTERFACE)
179-
target_link_libraries(jsoncpp_lib INTERFACE jsoncpp_lib_static)
180-
endif()
181-
182176
include(CompilerFeatures)
183177

184178
set(OPENCV_MODULES_USED)

vendor/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ endif()
1212

1313
# Build VRPN as subproject
1414
set(VRPN_GPL_SERVER FALSE CACHE INTERNAL "" FORCE)
15+
set(VRPN_USE_LOCAL_JSONCPP TRUE CACHE INTERNAL "" FORCE)
1516
if(BUILD_CLIENT AND NOT BUILD_SERVER)
1617
set(VRPN_BUILD_SERVER_LIBRARY FALSE CACHE INTERNAL "" FORCE)
1718
set(VRPN_BUILD_CLIENT_LIBRARY TRUE CACHE INTERNAL "" FORCE)
@@ -45,6 +46,13 @@ else()
4546
target_include_directories(vendored-hidapi INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/vrpn/submodules/hidapi")
4647
endif()
4748

49+
# Set the include directories for the jsoncpp_lib target.
50+
if(VRPN_JSONCPP_SOURCE_ROOT)
51+
target_include_directories(jsoncpp_lib INTERFACE "${VRPN_JSONCPP_SOURCE_ROOT}/include")
52+
else()
53+
target_include_directories(jsoncpp_lib INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/vrpn/submodules/jsoncpp/include")
54+
endif()
55+
4856
# Interface target for util headers
4957
add_library(util-headers INTERFACE)
5058
target_include_directories(util-headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/util-headers")

0 commit comments

Comments
 (0)