blob: 2c466013c219b49feb5b5179c99fc8e10b834c34 (
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
|
https://github.com/ccache/ccache/pull/1465
https://github.com/ccache/ccache/commit/a641e5ea3087752af71e60690dcf3ed3c1dbc56a
From a641e5ea3087752af71e60690dcf3ed3c1dbc56a Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 8 Jun 2024 15:11:48 +0100
Subject: [PATCH] build: Find CppHttplib named libhttplib.so as well (#1465)
On Gentoo, the library name is 'httplib', not 'cpp-httplib'. Search
for that first (as it appears to be "more vanilla"), then fall back
to 'cpp-httplib'.
--- a/cmake/FindCppHttplib.cmake
+++ b/cmake/FindCppHttplib.cmake
@@ -12,7 +12,11 @@ else()
if(NOT "${CMAKE_MATCH_0}" STREQUAL "" AND "${_cpphttplib_version_string}" VERSION_GREATER_EQUAL "${CppHttplib_FIND_VERSION}")
# Some dists like Fedora package cpp-httplib as a single header while some
# dists like Debian package it as a traditional library.
- find_library(CPPHTTPLIB_LIBRARY cpp-httplib)
+ find_library(CPPHTTPLIB_LIBRARY httplib)
+ if(NOT CPPHTTPLIB_LIBRARY)
+ find_library(CPPHTTPLIB_LIBRARY cpp-httplib)
+ endif()
+
if(CPPHTTPLIB_LIBRARY)
message(STATUS "Using system CppHttplib (${CPPHTTPLIB_LIBRARY})")
add_library(dep_cpphttplib UNKNOWN IMPORTED)
|