summaryrefslogtreecommitdiff
path: root/indra/cmake/GLIB.cmake
diff options
context:
space:
mode:
authorNicky Dasmijn <nicky.dasmijn@posteo.nl>2024-04-05 19:25:02 +0200
committerGitHub <noreply@github.com>2024-04-05 20:25:02 +0300
commit57d423745fd1d3d0ea6a0c69b869a20c27e27fc5 (patch)
treef590e086983c7277e4b05fcd54c3eebf6b12f43a /indra/cmake/GLIB.cmake
parentcc8d71c18c124138e76e85e663498d2ee9776b3c (diff)
Linux viewer (ReleaseOS) resurrection (#1099)
Co-authored-by: AiraYumi <aira.youme@airanyumi.net>
Diffstat (limited to 'indra/cmake/GLIB.cmake')
-rw-r--r--indra/cmake/GLIB.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/cmake/GLIB.cmake b/indra/cmake/GLIB.cmake
new file mode 100644
index 0000000000..f52cbb7f87
--- /dev/null
+++ b/indra/cmake/GLIB.cmake
@@ -0,0 +1,22 @@
+include_guard()
+
+include(Prebuilt)
+
+add_library( ll::glib INTERFACE IMPORTED )
+add_library( ll::glib_headers INTERFACE IMPORTED )
+add_library( ll::gio INTERFACE IMPORTED )
+
+if( LINUX )
+ find_package(PkgConfig REQUIRED)
+ pkg_search_module(GLIB REQUIRED glib-2.0)
+ pkg_search_module(GIO REQUIRED gio-2.0)
+
+ target_include_directories( ll::glib SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} )
+ target_link_libraries( ll::glib INTERFACE ${GLIB_LDFLAGS} )
+ target_compile_definitions( ll::glib INTERFACE -DLL_GLIB=1)
+
+ target_include_directories( ll::glib_headers SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} )
+ target_compile_definitions( ll::glib_headers INTERFACE -DLL_GLIB=1)
+
+ target_link_libraries( ll::gio INTERFACE ${GIO_LDFLAGS} )
+endif()