File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,23 @@ IF(ENABLE_OPENCL)
184184 ENDIF (OPENCL_FOUND)
185185ENDIF (ENABLE_OPENCL)
186186
187- SET (CMAKE_INSTALL_RPATH ${LibUSB_LIBDIR} )
187+ # RPATH handling for private libusb copies
188+ # Users have two options:
189+ # 1. Build libusb in depends/ and leave it there:
190+ # Do NOT set CMAKE_INSTALL_RPATH. It works by default.
191+ # 2. Build libusb and install it somewhere:
192+ # Set CMAKE_INSTALL_RPATH to the libusb.so installation directory before compiling.
193+ # Both command line -DCMAKE_INSTALL_RPATH=... and CMake GUI settings are accepted.
194+ #
195+ # Anyway if wrong versions of libusb is used, errors will be reported explicitly.
196+ IF (NOT DEFINED CMAKE_INSTALL_RPATH )
197+ SET (CMAKE_INSTALL_RPATH ${LibUSB_LIBDIR} CACHE STRING "Set RPATH for a private libusb" )
198+ ELSE ()
199+ SET (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} CACHE STRING "Set RPATH for a private libusb" )
200+ ENDIF ()
201+ IF (DEFINED CMAKE_INSTALL_RPATH )
202+ MESSAGE (STATUS "RPATH set to ${CMAKE_INSTALL_RPATH} " )
203+ ENDIF ()
188204
189205CONFIGURE_FILE ("${MY_DIR} /include/libfreenect2/config.h.in" "${MY_DIR} /include/libfreenect2/config.h" @ONLY)
190206GENERATE_RESOURCES(${RESOURCES_INC_FILE} ${MY_DIR} ${RESOURCES} )
You can’t perform that action at this time.
0 commit comments