summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmocka.pc.cmake14
2 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 362e3b5..42a0b1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ if (WITH_EXAMPLES)
endif ()
# pkg-config file
-configure_file(cmocka.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/cmocka.pc)
+configure_file(cmocka.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/cmocka.pc @ONLY)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/cmocka.pc
diff --git a/cmocka.pc.cmake b/cmocka.pc.cmake
index f54d0a7..ee189c6 100644
--- a/cmocka.pc.cmake
+++ b/cmocka.pc.cmake
@@ -1,5 +1,11 @@
-Name: ${PROJECT_NAME}
+# cmocka pkg-config source file
+
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: @PROJECT_NAME@
Description: The cmocka unit testing library
-Version: ${PROJECT_VERSION}
-Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -lcmocka
-Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -lcmocka
+Cflags: -I${includedir}