aboutsummaryrefslogtreecommitdiffstats
path: root/testing/glog/pc-file.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-21 17:41:44 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-22 16:46:45 -0300
commite358716ef458cd009c01cb991c03b3349c768838 (patch)
treedd78776f50ec9556c6d816765d448d821a19db0c /testing/glog/pc-file.patch
parentf8bc340e7ed551260856aed9386831e452a10e97 (diff)
downloadaports-e358716ef458cd009c01cb991c03b3349c768838.tar.bz2
aports-e358716ef458cd009c01cb991c03b3349c768838.tar.xz
testing/glog: Create glog pkg-config file
Diffstat (limited to 'testing/glog/pc-file.patch')
-rw-r--r--testing/glog/pc-file.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/glog/pc-file.patch b/testing/glog/pc-file.patch
new file mode 100644
index 0000000000..bbb1e9ef8f
--- /dev/null
+++ b/testing/glog/pc-file.patch
@@ -0,0 +1,39 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 808330e..0b5aaff 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -664,6 +664,17 @@ if (gflags_FOUND)
+ endif (CMAKE_VERSION VERSION_LESS 3.9)
+ endif (gflags_FOUND)
+
++if (OS_WINDOWS)
++ set (PKGCONFIG_INSTALL_DIR)
++else ()
++ set (PKGCONFIG_INSTALL_DIR ${_glog_CMake_LIBDIR}/pkgconfig)
++endif ()
++
++if (PKGCONFIG_INSTALL_DIR)
++ configure_file ("cmake/glog.pc.in" "${PROJECT_BINARY_DIR}/${CPACK_PACKAGE_NAME}.pc" @ONLY)
++ install (FILES "${PROJECT_BINARY_DIR}/${CPACK_PACKAGE_NAME}.pc" DESTINATION "${PKGCONFIG_INSTALL_DIR}")
++endif ()
++
+ configure_package_config_file (glog-config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake
+ INSTALL_DESTINATION ${_glog_CMake_INSTALLDIR}
+diff --git a/cmake/glog.pc.in b/cmake/glog.pc.in
+new file mode 100644
+index 0000000..98b54bb
+--- /dev/null
++++ b/cmake/glog.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: libglog
++Description: Google Log (glog) C++ logging framework
++Version: 0.4.0
++Requires: gflags
++Libs: -L${libdir} -lglog
++Cflags: -I${includedir}