Unverified Commit 9ca597c8 authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

taskflow: add pkg-config config file (#512193)

parents 8f54067b 1f14a3ea
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 063fd793..99998a6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -377,3 +377,13 @@ install(
   DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
 )
 
+
+# -----------------------------------------------------------------------------
+# pkg-config
+# -----------------------------------------------------------------------------
+
+configure_file(taskflow.pc.in taskflow.pc @ONLY)
+install(
+  FILES ${CMAKE_CURRENT_BINARY_DIR}/taskflow.pc
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
diff --git a/taskflow.pc.in b/taskflow.pc.in
new file mode 100644
index 00000000..fc649288
--- /dev/null
+++ b/taskflow.pc.in
@@ -0,0 +1,7 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: Taskflow
+Description: A General-purpose Task-parallel Programming System
+Version: @PROJECT_VERSION@
+Cflags: -I${includedir}
+14 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  cmake,
  doctest,
  fetchFromGitHub,
  fetchpatch,
  lib,
  replaceVars,
  stdenv,
@@ -22,6 +23,19 @@ stdenv.mkDerivation (finalAttrs: {
    (replaceVars ./unvendor-doctest.patch {
      inherit doctest;
    })

    # https://github.com/taskflow/taskflow/pull/785
    # TODO: remove when updating to the next release
    (fetchpatch {
      name = "fix-brace-init-with-explicit-constructor-for-GCC-15";
      url = "https://github.com/taskflow/taskflow/commit/de7dfe30594cd1f98398095b970a8320734a2382.patch";
      hash = "sha256-Ecl7dFvf2HDslv/5IHR5J2PYcRCN3EA4GahxOzcUS4g=";
    })

    # Vendored from #786 as it does not apply cleanly on top of v0.4.0
    # https://github.com/taskflow/taskflow/pull/786
    # TODO: remove when updating to the next release
    ./add-pkg-config-support.patch
  ];

  postPatch = ''