From d7a2947c4f24726df622749fa45b9306d1ed43e8 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 11 Jul 2023 20:02:46 +0800 Subject: 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. --- indra/cmake/Meshoptimizer.cmake | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit v1.2.3