Commits

Shlomi Fish committed f1173ee

Add a pkg-config file.

Comments (0)

Files changed (2)

libmikmod/CMakeLists.txt

 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/include/mikmod.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/include/mikmod_build.h")
 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libmikmod-config.in" "${CMAKE_CURRENT_BINARY_DIR}/libmikmod-config")
 
+CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/libmikmod.pc.in
+    ${CMAKE_CURRENT_BINARY_DIR}/libmikmod.pc
+    @ONLY
+    )
+
 LIST (APPEND EXTRA_LIBS ${ALSA_LIBRARIES})
 
 IF (UNIX)
         "include"
 )
 
+INSTALL(
+    FILES
+        "${CMAKE_CURRENT_BINARY_DIR}/libmikmod.pc"
+    DESTINATION
+        "lib${LIB_SUFFIX}/pkgconfig"
+)
+
 ADD_CUSTOM_TARGET(
     "test"
     "perl" "${CMAKE_CURRENT_SOURCE_DIR}/run-tests.pl"

libmikmod/libmikmod.pc.in

+prefix="@CMAKE_INSTALL_PREFIX@"
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name:  libmikmod
+Description: Library for playing Module Files and for Sound Effects
+Version: @VERSION@
+URL: http://mikmod.raphnet.net/
+Libs: -L${libdir} -lmikmod
+Libs.private: -lm
+Cflags: -I${includedir}