Overlay/net-im/telegram-desktop/files/tdesktop-4.10.0-system-cppg...

33 lines
1.1 KiB
Diff
Raw Normal View History

2024-02-13 20:07:01 +03:00
Use system cppgir
https://github.com/desktop-app/cmake_helpers/issues/282
https://github.com/desktop-app/cmake_helpers/pull/305
--- tdesktop-4.10.0-full.orig/cmake/external/glib/CMakeLists.txt
+++ tdesktop-4.10.0-full/cmake/external/glib/CMakeLists.txt
@@ -7,14 +7,6 @@
add_library(external_glib INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_glib ALIAS external_glib)
-function(add_cppgir) # isolate scope
- set(BUILD_TESTING OFF)
- set(BUILD_DOC OFF)
- set(BUILD_EXAMPLES OFF)
- add_subdirectory(cppgir EXCLUDE_FROM_ALL)
-endfunction()
-add_cppgir()
-
include(generate_cppgir.cmake)
generate_cppgir(external_glib Gio-2.0)
--- tdesktop-4.10.0-full.orig/cmake/external/glib/generate_cppgir.cmake
+++ tdesktop-4.10.0-full/cmake/external/glib/generate_cppgir.cmake
@@ -4,6 +4,8 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
+find_package(CppGir REQUIRED)
+
function(generate_cppgir target_name gir)
# cppgir generates all the dependent headers everytime, better to have a global folder
set(gen_dst ${CMAKE_BINARY_DIR}/gen)