diff options
Diffstat (limited to 'indra/cmake/NDOF.cmake')
-rw-r--r-- | indra/cmake/NDOF.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 388df16a52..f22e2246aa 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -3,6 +3,11 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") +if ( TARGET ndof::ndof ) + return() +endif() +create_target( ndof::ndof ) + if (NDOF) if (USESYSTEMLIBS) set(NDOF_FIND_REQUIRED ON) @@ -15,22 +20,17 @@ if (NDOF) endif (WINDOWS OR DARWIN) if (WINDOWS) - set(NDOF_LIBRARY libndofdev) + set_target_libraries( ndof::ndof libndofdev) elseif (DARWIN OR LINUX) - set(NDOF_LIBRARY ndofdev) + set_target_libraries( ndof::ndof ndofdev) endif (WINDOWS) - - set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) set(NDOF_FOUND 1) endif (USESYSTEMLIBS) endif (NDOF) if (NDOF_FOUND) add_definitions(-DLIB_NDOF=1) - include_directories(${NDOF_INCLUDE_DIR}) else (NDOF_FOUND) message(STATUS "Building without N-DoF joystick support") - set(NDOF_INCLUDE_DIR "") - set(NDOF_LIBRARY "") endif (NDOF_FOUND) |