diff options
Diffstat (limited to 'indra/cmake/UI.cmake')
-rw-r--r-- | indra/cmake/UI.cmake | 13 |
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 () |