summaryrefslogtreecommitdiff
path: root/indra/cmake/UI.cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-10 18:42:56 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-10 18:42:56 +0800
commita4543cf3cd41a466599de61f02e6d3b3d09700c4 (patch)
tree6743beff840669800d4bdc445919bd8f09a06cd5 /indra/cmake/UI.cmake
parent52d973e95567efcb145ed0de1f4b6f0e19663776 (diff)
parent0797257992ee7f88456d3083ebf214485b75c139 (diff)
Merge branch 'main' into DRTVWR-559
Diffstat (limited to 'indra/cmake/UI.cmake')
-rw-r--r--indra/cmake/UI.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index 8b70192efc..03bdf4e434 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -4,12 +4,19 @@ include(FreeType)
add_library( ll::uilibraries INTERFACE IMPORTED )
-if (LINUX)
+if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 )
if( USE_CONAN )
target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk )
return()
+ elseif( NOT USE_AUTOBUILD_3P )
+ include(FindPkgConfig)
+ pkg_check_modules(Gtk2 REQUIRED gtk+-2.0)
+ target_include_directories( ll::uilibraries SYSTEM INTERFACE ${Gtk2_INCLUDE_DIRS} )
+ target_link_directories( ll::uilibraries INTERFACE ${Gtk2_LIBRARY_DIRS} )
+ target_link_libraries( ll::uilibraries INTERFACE ${Gtk2_LIBRARIES} )
+ return()
endif()
use_prebuilt_binary(gtk-atk-pango-glib)
@@ -30,7 +37,7 @@ if (LINUX)
Xinerama
ll::freetype
)
-endif (LINUX)
+endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
if( WINDOWS )
target_link_libraries( ll::uilibraries INTERFACE
opengl32
@@ -48,7 +55,9 @@ if( WINDOWS )
)
endif()
+if (USE_AUTOBUILD_3P OR USE_CONAN)
target_include_directories( ll::uilibraries SYSTEM INTERFACE
${LIBS_PREBUILT_DIR}/include
)
+endif ()