diff --git a/CMakeLists.txt b/CMakeLists.txt index bd226f10..e46801d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,4 +218,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) diff --git a/glm.pc.in b/glm.pc.in new file mode 100644 index 00000000..fc5c7bb7 --- /dev/null +++ b/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}