summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--libuecc.pc.in10
2 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89cffe2..ebcbab4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(LIBUECC C)
+set(PROJECT_VERSION 2)
set(CMAKE_MODULE_PATH ${LIBUECC_SOURCE_DIR})
@@ -10,5 +11,8 @@ include(UseDoxygen OPTIONAL)
add_subdirectory(src)
+configure_file(${LIBUECC_SOURCE_DIR}/libuecc.pc.in ${LIBUECC_BINARY_DIR}/libuecc.pc @ONLY)
+install(FILES ${LIBUECC_BINARY_DIR}/libuecc.pc DESTINATION "lib/pkgconfig")
+
FILE(GLOB include_files "${CMAKE_CURRENT_SOURCE_DIR}/include/libuecc/*.h")
-install(FILES ${include_files} DESTINATION include/libuecc)
+install(FILES ${include_files} DESTINATION "include/libuecc-${PROJECT_VERSION}/libuecc")
diff --git a/libuecc.pc.in b/libuecc.pc.in
new file mode 100644
index 0000000..5ddb020
--- /dev/null
+++ b/libuecc.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libuecc
+Description: Very small Elliptic Curve Cryptography library
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -luecc
+Cflags: -I${includedir}/libuecc-@PROJECT_VERSION@