aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/civetweb/pkgconfig.patch
blob: 4c23cbff5ed92f4fb4e42a0ec630921ec18df9da (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5368c0..c297861 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -614,6 +614,10 @@ configure_package_config_file(
   PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CIVETWEB_ENABLE_CXX
 )
 
+set(PROJECT_VERSION "${VERSION}")
+if(CIVETWEB_ENABLE_SSL)
+  set(REQUIRES_OPENSSL openssl)
+endif()
 configure_file(
   cmake/${PROJECT_NAME}.pc.in
   ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc
@@ -629,13 +633,13 @@ configure_file(
 install(
   FILES 
     "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc"
-    DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig"
+    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
 )
 
 install(
   FILES 
     "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-cpp.pc"
-    DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig"
+    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
 )
 
 write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake
diff --git a/cmake/civetweb-cpp.pc.in b/cmake/civetweb-cpp.pc.in
index ca1232c..495da46 100644
--- a/cmake/civetweb-cpp.pc.in
+++ b/cmake/civetweb-cpp.pc.in
@@ -10,3 +10,4 @@ Requires:
 Libs: -L${libdir} -l@PROJECT_NAME@-cpp
 Cflags: -I${includedir}
 
+Requires.private: civetweb
diff --git a/cmake/civetweb.pc.in b/cmake/civetweb.pc.in
index 27cea8f..0826f61 100644
--- a/cmake/civetweb.pc.in
+++ b/cmake/civetweb.pc.in
@@ -11,3 +11,4 @@ Libs: -L${libdir} -l@PROJECT_NAME@
 Cflags: -I${includedir}
 
 
+Requires.private: @REQUIRES_OPENSSL@