adopted a cleaner libevhtp pkgconfig patch
This commit is contained in:
parent
d554161784
commit
5ff14cd08a
|
@ -1,20 +1,24 @@
|
||||||
Author: Trolli Schmittlauch <t.schmittlauch@orlives.de>
|
|
||||||
Date: Sat Sep 14 20:32:03 2019 +0200
|
|
||||||
|
|
||||||
fix #143 by setting LIB_INSTALL_DIR CMake var
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 481ddd0..833ddf9 100644
|
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -225,6 +225,10 @@ set(include_install_dir "include")
|
@@ -14,6 +14,7 @@ include(CheckIncludeFiles)
|
||||||
|
include(CheckTypeSize)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
include(TestBigEndian)
|
||||||
|
+include(GNUInstallDirs)
|
||||||
|
|
||||||
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
check_function_exists(strndup HAVE_STRNDUP)
|
||||||
|
check_function_exists(strnlen HAVE_STRNLEN)
|
||||||
|
diff --git a/evhtp.pc.in b/evhtp.pc.in
|
||||||
|
index a7b351f..fbddc51 100644
|
||||||
|
--- a/evhtp.pc.in
|
||||||
|
+++ b/evhtp.pc.in
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
-libdir=@LIB_INSTALL_DIR@
|
||||||
|
-includedir=@INCLUDE_INSTALL_DIR@/evhtp
|
||||||
|
+exec_prefix=${prefix}
|
||||||
|
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||||
|
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/evhtp
|
||||||
|
|
||||||
+if (NOT LIB_INSTALL_DIR)
|
Name: libevhtp
|
||||||
+ set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
Description: A more flexible replacement for libevent's httpd API
|
||||||
+endif (NOT LIB_INSTALL_DIR)
|
|
||||||
+
|
|
||||||
# Configuration
|
|
||||||
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
|
|
||||||
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
|
|
||||||
|
|
Loading…
Reference in a new issue