aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/vtflib-strata
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs/vtflib-strata')
-rw-r--r--srcds-pkgs/vtflib-strata/CMakeLists.txt.append2
-rw-r--r--srcds-pkgs/vtflib-strata/default.nix3
-rw-r--r--srcds-pkgs/vtflib-strata/vtflib.pc.in9
3 files changed, 13 insertions, 1 deletions
diff --git a/srcds-pkgs/vtflib-strata/CMakeLists.txt.append b/srcds-pkgs/vtflib-strata/CMakeLists.txt.append
index 51b947e..ca18583 100644
--- a/srcds-pkgs/vtflib-strata/CMakeLists.txt.append
+++ b/srcds-pkgs/vtflib-strata/CMakeLists.txt.append
@@ -10,3 +10,5 @@ install (TARGETS vtflib vtflib_static
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtflib.pc.in ${CMAKE_CURRENT_BINARY_DIR}/vtflib.pc @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vtflib.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/srcds-pkgs/vtflib-strata/default.nix b/srcds-pkgs/vtflib-strata/default.nix
index b8c1f77..6772426 100644
--- a/srcds-pkgs/vtflib-strata/default.nix
+++ b/srcds-pkgs/vtflib-strata/default.nix
@@ -33,7 +33,8 @@ stdenv.mkDerivation rec {
'';
postPatch = ''
- cat ${./CMakeLists.txt.append} >> CMakeLists.txt
+ cat ${./CMakeLists.txt.append} >> ./CMakeLists.txt
+ cp ${./vtflib.pc.in} ./vtflib.pc.in
'';
nativeBuildInputs = [ cmake ];
diff --git a/srcds-pkgs/vtflib-strata/vtflib.pc.in b/srcds-pkgs/vtflib-strata/vtflib.pc.in
new file mode 100644
index 0000000..e35b0fc
--- /dev/null
+++ b/srcds-pkgs/vtflib-strata/vtflib.pc.in
@@ -0,0 +1,9 @@
+libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
+includedir=@CMAKE_INSTALL_PREFIX@/include/docopt
+
+Name: VTFLib
+Description: A Valve VTF and VMT image format programming library
+Version: @PROJECT_VERSION@
+Requires:
+Libs: -L${libdir} -lvtflib
+Cflags: -I${includedir}