summaryrefslogtreecommitdiff
path: root/indra/cmake/Meshoptimizer.cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-08-26 14:04:20 +0800
committerErik Kundiman <erik@megapahit.org>2023-08-26 14:04:20 +0800
commita09352872b2f1a9db452d9cc313088abd5fb75c0 (patch)
treee65b43e62c02a64b7e01a45442774560bd1186a4 /indra/cmake/Meshoptimizer.cmake
parente902a39a049f2378be0b5ee13595a58cfce2d937 (diff)
Add sysroot to GLH & Meshoptimizer include paths
When cross-compiling, the host's /usr/local/include would be unsafely included before. The problem with this was that it leaked other host library headers unexpectedly, like Boost. The target compilation caught some function from the host headers which of a newer version, and then when trying to link to the target libraries, the function wasn't available yet in the older version.
Diffstat (limited to 'indra/cmake/Meshoptimizer.cmake')
-rw-r--r--indra/cmake/Meshoptimizer.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake
index 6cf8343dd6..70b3a2c088 100644
--- a/indra/cmake/Meshoptimizer.cmake
+++ b/indra/cmake/Meshoptimizer.cmake
@@ -7,7 +7,7 @@ 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_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${CMAKE_SYSROOT}/usr/local/include )
target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer)
return ()
endif ()