From 6b412ef9c00453656802f22ade1fd4daa1786234 Mon Sep 17 00:00:00 2001 From: Alex Korotkin Date: Wed, 28 Aug 2019 12:47:38 +0300 Subject: [PATCH 1/2] Fix curlpp.pc.in to handle correctly non-default prefixes --- extras/curlpp.pc.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extras/curlpp.pc.in b/extras/curlpp.pc.in index b040ee0..336b82e 100644 --- a/extras/curlpp.pc.in +++ b/extras/curlpp.pc.in @@ -1,13 +1,14 @@ # This is a comment prefix=@prefix@ -exec_prefix=@prefix@ -includedir=@includedir@ +exec_prefix=${prefix} +includedir=${prefix}/@includedir@ +libdir=${prefix}/@libdir@ Name: curlpp Description: cURLpp is a libcurl C++ wrapper Version: @VERSION@ -Libs: -L@libdir@ -lcurlpp @LDFLAGS@ @LIBS@ -Cflags: -I@includedir@ @CURLPP_CXXFLAGS@ +Libs: -L${libdir} -lcurlpp @LDFLAGS@ @LIBS@ +Cflags: -I${includedir} @CURLPP_CXXFLAGS@ # libcurl is required as non-private because CurlHandle.inl uses curl_easy_setopt. Requires: libcurl From d726536f692ccdd4f4598e36b3c7ebca49f784e7 Mon Sep 17 00:00:00 2001 From: Alex Korotkin Date: Wed, 28 Aug 2019 12:51:10 +0300 Subject: [PATCH 2/2] Add include dirs from curlpp pkg module to examples compilation flags --- examples/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b32f9ae..2193199 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -19,6 +19,8 @@ foreach(Example ${ExamplesFileList}) get_filename_component(ExampleName ${Example} NAME_WE) # Define example executable add_executable(${ExampleName} ${Example}) + # Add curlpp include dir + target_include_directories(${ExampleName} PRIVATE ${CURLPP_INCLUDE_DIRS}) # Link example against curlpp target_link_libraries(${ExampleName} ${CURLPP_LDFLAGS}) # make the meta target depend on this example.