summaryrefslogtreecommitdiff
path: root/indra/cmake/MESHOPTIMIZER.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/MESHOPTIMIZER.cmake')
-rw-r--r--indra/cmake/MESHOPTIMIZER.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake
index 1c5b47b9bd..d1d4df067f 100644
--- a/indra/cmake/MESHOPTIMIZER.cmake
+++ b/indra/cmake/MESHOPTIMIZER.cmake
@@ -3,14 +3,19 @@
include(Linking)
include(Prebuilt)
+include_guard()
+add_library( ll::meshoptimizer INTERFACE IMPORTED )
+
+use_system_binary(meshoptimizer)
use_prebuilt_binary(meshoptimizer)
if (WINDOWS)
- set(MESHOPTIMIZER_LIBRARIES meshoptimizer.lib)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib)
+ set(MESHOPTIMIZER_LIBRARIES )
elseif (LINUX)
- set(MESHOPTIMIZER_LIBRARIES meshoptimizer.o)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o)
elseif (DARWIN)
- set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
+ target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
endif (WINDOWS)
-set(MESHOPTIMIZER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
+target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer)