aboutsummaryrefslogtreecommitdiffstats
path: root/testing/telegram-desktop/lz4.patch
blob: dd7ad977a6156d1f09f498d7b8eaa1661a9160ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/cmake/external/lz4/CMakeLists.txt b/cmake/external/lz4/CMakeLists.txt
index 49821af..d7bd1d7 100644
--- a/cmake/external/lz4/CMakeLists.txt
+++ b/cmake/external/lz4/CMakeLists.txt
@@ -4,26 +4,10 @@
 # For license and copyright information please follow this link:
 # https://github.com/desktop-app/legal/blob/master/LEGAL
 
-add_library(external_lz4 OBJECT)
+add_library(external_lz4 INTERFACE IMPORTED GLOBAL)
 add_library(desktop-app::external_lz4 ALIAS external_lz4)
-init_target(external_lz4 "(external)")
 
-set(lz4_loc ${third_party_loc}/lz4/lib)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(LZ4 REQUIRED liblz4)
 
-target_sources(external_lz4
-PRIVATE
-    ${lz4_loc}/lz4.c
-    ${lz4_loc}/lz4.h
-    ${lz4_loc}/lz4frame.c
-    ${lz4_loc}/lz4frame.h
-    ${lz4_loc}/lz4frame_static.h
-    ${lz4_loc}/lz4hc.c
-    ${lz4_loc}/lz4hc.h
-    ${lz4_loc}/xxhash.c
-    ${lz4_loc}/xxhash.h
-)
-
-target_include_directories(external_lz4
-PUBLIC
-    ${lz4_loc}
-)
+target_link_libraries(external_lz4 INTERFACE ${LZ4_LIBRARIES})