summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt4
-rw-r--r--indra/cmake/Prebuilt.cmake16
2 files changed, 20 insertions, 0 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 205ce402a0..52e6749c72 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -24,6 +24,10 @@ if( USE_CONAN )
set( USE_AUTOBUILD_3P OFF )
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P)
+elseif( USESYSTEMLIBS )
+ set( USE_CONAN OFF )
+ set( USE_AUTOBUILD_3P OFF )
+ add_compile_definitions(LL_USESYSTEMLIBS)
else()
set( USE_CONAN OFF )
set( USE_AUTOBUILD_3P ON )
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()