summaryrefslogtreecommitdiff
path: root/indra/cmake/NDOF.cmake
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-20 01:23:16 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-20 01:23:16 +0200
commitdca3c83cd9f8d1ac8165707b080a420bf9a9a132 (patch)
treec73c0e7e4146c5191a9caf0b54ceb2b566fd5eb6 /indra/cmake/NDOF.cmake
parentffa8d83eaf11b11a091743c6d666cc6c74553671 (diff)
parentf7838ca17c7e4a5a595f5cb898c70a18be4c9cd9 (diff)
Merge branch 'DRTVWR-568' into DRTVWR-573-maint-R
# Conflicts: # indra/cmake/Copy3rdPartyLibs.cmake # indra/cmake/FindOpenJPEG.cmake # indra/cmake/OpenJPEG.cmake # indra/integration_tests/llui_libtest/CMakeLists.txt # indra/newview/CMakeLists.txt
Diffstat (limited to 'indra/cmake/NDOF.cmake')
-rw-r--r--indra/cmake/NDOF.cmake40
1 files changed, 14 insertions, 26 deletions
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 388df16a52..b88fbccf2a 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -3,34 +3,22 @@ include(Prebuilt)
set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
-if (NDOF)
- if (USESYSTEMLIBS)
- set(NDOF_FIND_REQUIRED ON)
- include(FindNDOF)
- else (USESYSTEMLIBS)
- if (WINDOWS OR DARWIN)
- use_prebuilt_binary(libndofdev)
- elseif (LINUX)
- use_prebuilt_binary(open-libndofdev)
- endif (WINDOWS OR DARWIN)
+include_guard()
+add_library( ll::ndof INTERFACE IMPORTED )
- if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
- elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
- endif (WINDOWS)
+if (NDOF)
+ if (WINDOWS OR DARWIN)
+ use_prebuilt_binary(libndofdev)
+ elseif (LINUX)
+ use_prebuilt_binary(open-libndofdev)
+ endif (WINDOWS OR DARWIN)
- set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
- set(NDOF_FOUND 1)
- endif (USESYSTEMLIBS)
+ if (WINDOWS)
+ target_link_libraries( ll::ndof INTERFACE libndofdev)
+ elseif (DARWIN OR LINUX)
+ target_link_libraries( ll::ndof INTERFACE ndofdev)
+ endif (WINDOWS)
+ target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1)
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)