summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-25 09:25:12 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-25 09:25:12 +0100
commit8edd5cbc43e4a716478135d3566347243a3d4ade (patch)
tree3ba904e3042aa94046fffc6302b4968fd5ede837 /src
parent8d35fd322d3b8cd5240b95ac58ded1ff9ba041d1 (diff)
downloaduca-8edd5cbc43e4a716478135d3566347243a3d4ade.tar.gz
uca-8edd5cbc43e4a716478135d3566347243a3d4ade.tar.bz2
uca-8edd5cbc43e4a716478135d3566347243a3d4ade.tar.xz
uca-8edd5cbc43e4a716478135d3566347243a3d4ade.zip
Install pkg-config information file
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt18
-rwxr-xr-xsrc/uca.pc.in13
2 files changed, 28 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 757dcf7..a3f307d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -118,7 +118,19 @@ install(TARGETS uca
LIBRARY DESTINATION lib${LIB_SUFFIX})
install(FILES ${uca_HDRS}
- DESTINATION include/libuca)
+ DESTINATION include/uca)
+
+# --- install pkg-config file
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix "\${prefix}")
+set(libdir "\${exec_prefix}/lib")
+set(includedir "\${prefix}/include")
+set(VERSION ${UCA_VERSION_STRING})
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/uca.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/uca.pc" @ONLY IMMEDIATE)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uca.pc DESTINATION lib/pkgconfig)
+
set(CPACK_PACKAGE_DESCRIPTION "Unified Camera Access library")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Abstract interface for different camera classes and frame grabber devices")
@@ -133,9 +145,9 @@ set(CPACK_PACKAGE_VENDOR "Karlsruhe Institute of Technology/IPE")
set(CPACK_PACKAGE_VERSION_MAJOR ${UCA_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${UCA_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${UCA_VERSION_PATCH})
-set(VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(VERSION ${UCA_VERSION_STRING})
set(CPACK_GENERATOR "DEB;RPM;")
-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CMAKE_SYSTEM_PROCESSOR}")
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${UCA_VERSION_STRING}-${CMAKE_SYSTEM_PROCESSOR}")
include(CPack)
diff --git a/src/uca.pc.in b/src/uca.pc.in
new file mode 100755
index 0000000..59a4813
--- /dev/null
+++ b/src/uca.pc.in
@@ -0,0 +1,13 @@
+# Package Information for pkg-config
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir_old=@includedir@/uca
+includedir_new=@includedir@
+
+Name: libuca
+Description: Unified Camera Access
+Version: @VERSION@
+Libs: -L${libdir} -luca
+Cflags: -I${includedir_old} -I${includedir_new}