Browse Source

Added pkg-config file

Guus Sliepen 9 years ago
parent
commit
15748c30ea
2 changed files with 20 additions and 0 deletions
  1. 13 0
      CMakeLists.txt
  2. 7 0
      glm.pc.in

+ 13 - 0
CMakeLists.txt

@@ -200,4 +200,17 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
     )
 endif()
 
+# build pkg-config file
+configure_file(
+    "glm.pc.in"
+    "glm.pc"
+    @ONLY
+)
+
+# install pkg-config file
+install(
+    FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
+    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+)
+
 export(PACKAGE glm)

+ 7 - 0
glm.pc.in

@@ -0,0 +1,7 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: @GLM_VERSION@
+Cflags: -I${includedir}