summaryrefslogtreecommitdiff
path: root/indra/cmake/Prebuilt.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/Prebuilt.cmake')
-rw-r--r--indra/cmake/Prebuilt.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake
index 634cc15c21..b0acae279b 100644
--- a/indra/cmake/Prebuilt.cmake
+++ b/indra/cmake/Prebuilt.cmake
@@ -67,6 +67,22 @@ macro ( use_system_binary package )
endif()
endforeach()
return()
+ elseif( NOT USE_AUTOBUILD_3P )
+ include(FindPkgConfig)
+ pkg_check_modules(${package} ${package})
+ if( ${package}_FOUND )
+ target_link_directories( ll::${package} INTERFACE ${${package}_LIBRARY_DIRS} )
+ else()
+ pkg_check_modules(${package} lib${package})
+ if( ${package}_FOUND )
+ target_link_directories( ll::${package} INTERFACE ${${package}_LIBRARY_DIRS} )
+ else()
+ find_package( ${package} REQUIRED )
+ endif()
+ endif()
+ target_include_directories( ll::${package} SYSTEM INTERFACE ${${package}_INCLUDE_DIRS} )
+ target_link_libraries( ll::${package} INTERFACE ${${package}_LIBRARIES} )
+ return()
endif()
endmacro()