File: httplib-pkgconfig

package info (click to toggle)
nheko 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,652 kB
  • sloc: cpp: 86,589; python: 875; sh: 243; makefile: 212; xml: 46; ansic: 6
file content (18 lines) | stat: -rw-r--r-- 672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Use pkgconfig to find cpp-httplib
Author: Hubert Chathi <hubert@uhoreg.ca>
Last-Update: 2023-02-22

--- nheko-0.11.2.orig/CMakeLists.txt
+++ nheko-0.11.2/CMakeLists.txt
@@ -705,8 +705,9 @@ if (USE_BUNDLED_CPPHTTPLIB)
 	target_include_directories(nheko PRIVATE third_party/cpp-httplib-0.5.12)
 	target_sources(nheko PRIVATE third_party/cpp-httplib-0.5.12/httplib.h)
 else()
-	find_package(httplib REQUIRED)
-	target_link_libraries(nheko PRIVATE httplib::httplib)
+	find_package(PkgConfig REQUIRED)
+	pkg_check_modules(httplib REQUIRED IMPORTED_TARGET cpp-httplib)
+	target_link_libraries(nheko PRIVATE PkgConfig::httplib)
 endif()
 
 if (USE_BUNDLED_BLURHASH)