summaryrefslogtreecommitdiff
path: root/indra/cmake/Meshoptimizer.cmake
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
commit4e306c90666094a7450f4d6f3ed7c8b71527e393 (patch)
tree4e52cfe3cfc7df8060ec5336f53d91636986b43c /indra/cmake/Meshoptimizer.cmake
parentb44ad50f75724a5d9e53bd52d2724111568caf24 (diff)
parent7d144fcb2a1b0aff1b59e378c652649c3d03e94f (diff)
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/cmake/Meshoptimizer.cmake')
-rw-r--r--indra/cmake/Meshoptimizer.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake
new file mode 100644
index 0000000000..fd144d2b97
--- /dev/null
+++ b/indra/cmake/Meshoptimizer.cmake
@@ -0,0 +1,20 @@
+# -*- cmake -*-
+
+include(Linking)
+include(Prebuilt)
+
+include_guard()
+add_library( ll::meshoptimizer INTERFACE IMPORTED )
+
+use_system_binary(meshoptimizer)
+use_prebuilt_binary(meshoptimizer)
+
+if (WINDOWS)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib)
+elseif (LINUX)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o)
+elseif (DARWIN)
+ target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
+endif (WINDOWS)
+
+target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer)