diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 18 | ||||
-rwxr-xr-x | src/uca.pc.in | 13 |
3 files changed, 30 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a23986..d97c3e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,8 @@ set(UCA_VERSION_MAJOR "0") set(UCA_VERSION_MINOR "4") set(UCA_VERSION_PATCH "0") +set(UCA_VERSION_STRING "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}") + add_subdirectory(src) add_subdirectory(doc) add_subdirectory(test) 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} |