summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-11 20:02:46 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 10:48:51 +0800
commitd7a2947c4f24726df622749fa45b9306d1ed43e8 (patch)
tree55439626cbe45c0d6c03c3fcd74c9bcc583e5f45 /indra/cmake
parent593e7199e2dece84584882ed90b5dcc0ffb4d52b (diff)
Obtain Meshoptimizer flags when using system libs
The Meshoptimizer CMake files don't seem to be working right. On more than one platform, they always conclude the package as not found. Nevertheless, the library is typically installed in standard paths, that no special paths need to be included for Meshoptimizer to be found. Except on macOS (so far), as existing package managers don't have that package yet, hence the /usr/local/include addition. It's a safe path to include anyway on other un*x platforms.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Meshoptimizer.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake
index fd144d2b97..6cf8343dd6 100644
--- a/indra/cmake/Meshoptimizer.cmake
+++ b/indra/cmake/Meshoptimizer.cmake
@@ -6,6 +6,12 @@ include(Prebuilt)
include_guard()
add_library( ll::meshoptimizer INTERFACE IMPORTED )
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ target_include_directories( ll::meshoptimizer SYSTEM INTERFACE /usr/local/include )
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer)
+ return ()
+endif ()
+
use_system_binary(meshoptimizer)
use_prebuilt_binary(meshoptimizer)