From 6d9923706d1fa83fdd2de741a529f1a10e1718b4 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 13 Nov 2013 00:38:35 -0500 Subject: [PATCH] Added pkg-config support (thanks, Jonas!). --- CMakeLists.txt | 12 ++++++++++++ docs/CREDITS.txt | 3 +++ extras/physfs.pc.in | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 extras/physfs.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index a10921b7..2a371af2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,18 @@ if(UNIX) ) 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") diff --git a/docs/CREDITS.txt b/docs/CREDITS.txt index aa5d0236..514b3678 100644 --- a/docs/CREDITS.txt +++ b/docs/CREDITS.txt @@ -139,6 +139,9 @@ Bug fixes: Bug fixes: Andreas Karlsson +pkg-config support: + Jonas Kulla + Other stuff: Your name here! Patches go to icculus@icculus.org ... diff --git a/extras/physfs.pc.in b/extras/physfs.pc.in new file mode 100644 index 00000000..6cd0972e --- /dev/null +++ b/extras/physfs.pc.in @@ -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}