Added pkg-config support (thanks, Jonas!).
authorRyan C. Gordon <icculus@icculus.org>
Wed, 13 Nov 2013 00:38:35 -0500
changeset 1338 aae614cdd005
parent 1337 3b2e649c044c
child 1339 2043aa8a2523
Added pkg-config support (thanks, Jonas!).
CMakeLists.txt
docs/CREDITS.txt
extras/physfs.pc.in
--- a/CMakeLists.txt	Fri Aug 23 23:41:35 2013 -0400
+++ b/CMakeLists.txt	Wed Nov 13 00:38:35 2013 -0500
@@ -358,6 +358,18 @@
     )
 endif()
 
+if(UNIX AND NOT APPLE)
+    configure_file(
+        "extras/physfs.pc.in"
+        "extras/physfs.pc"
+        @ONLY
+    )
+    install(
+        FILES "${CMAKE_CURRENT_BINARY_DIR}/extras/physfs.pc"
+        DESTINATION "lib/pkgconfig"
+    )
+endif()
+
 macro(message_bool_option _NAME _VALUE)
     if(${_VALUE})
         message(STATUS "  ${_NAME}: enabled")
--- a/docs/CREDITS.txt	Fri Aug 23 23:41:35 2013 -0400
+++ b/docs/CREDITS.txt	Wed Nov 13 00:38:35 2013 -0500
@@ -139,6 +139,9 @@
 Bug fixes:
     Andreas Karlsson
 
+pkg-config support:
+    Jonas Kulla
+
 Other stuff:
     Your name here! Patches go to icculus@icculus.org ...
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/physfs.pc.in	Wed Nov 13 00:38:35 2013 -0500
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: PhysicsFS
+Description: PhysicsFS is a library to provide abstract access to various archives.
+URL: https://icculus.org/physfs/
+Version: @PHYSFS_VERSION@
+Libs: -L${libdir} -lphysfs
+Cflags: -I${includedir}