Просмотр исходного кода

Added pkg-config support (thanks, Jonas!).

Ryan C. Gordon 12 лет назад
Родитель
Сommit
6d9923706d
3 измененных файлов с 26 добавлено и 0 удалено
  1. 12 0
      CMakeLists.txt
  2. 3 0
      docs/CREDITS.txt
  3. 11 0
      extras/physfs.pc.in

+ 12 - 0
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")

+ 3 - 0
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 ...
 

+ 11 - 0
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}