diff options
-rw-r--r-- | CMakeLists.txt | 46 | ||||
-rw-r--r-- | package.sh.in | 7 | ||||
-rw-r--r-- | plugins/CMakeLists.txt | 5 | ||||
-rw-r--r-- | plugins/mock/CMakeLists.txt | 18 | ||||
-rw-r--r-- | plugins/mock/uca-mock-camera.c (renamed from src/cameras/uca-mock-camera.c) | 0 | ||||
-rw-r--r-- | plugins/mock/uca-mock-camera.h (renamed from src/cameras/uca-mock-camera.h) | 0 | ||||
-rw-r--r-- | plugins/package-plugin.sh.in | 1 | ||||
-rw-r--r-- | plugins/pco/CMakeLists.txt | 30 | ||||
-rw-r--r-- | plugins/pco/uca-pco-camera.c (renamed from src/cameras/uca-pco-camera.c) | 0 | ||||
-rw-r--r-- | plugins/pco/uca-pco-camera.h (renamed from src/cameras/uca-pco-camera.h) | 0 | ||||
-rw-r--r-- | plugins/pf/CMakeLists.txt | 30 | ||||
-rw-r--r-- | plugins/pf/uca-pf-camera.c (renamed from src/cameras/uca-pf-camera.c) | 0 | ||||
-rw-r--r-- | plugins/pf/uca-pf-camera.h (renamed from src/cameras/uca-pf-camera.h) | 0 | ||||
-rw-r--r-- | plugins/pylon/CMakeLists.txt | 24 | ||||
-rw-r--r-- | plugins/pylon/uca-pylon-camera.c (renamed from src/cameras/uca-pylon-camera.c) | 0 | ||||
-rw-r--r-- | plugins/pylon/uca-pylon-camera.h (renamed from src/cameras/uca-pylon-camera.h) | 0 | ||||
-rw-r--r-- | plugins/ufo/CMakeLists.txt | 24 | ||||
-rw-r--r-- | plugins/ufo/uca-ufo-camera.c (renamed from src/cameras/uca-ufo-camera.c) | 0 | ||||
-rw-r--r-- | plugins/ufo/uca-ufo-camera.h (renamed from src/cameras/uca-ufo-camera.h) | 0 | ||||
-rw-r--r-- | src/CMakeLists.txt | 202 |
20 files changed, 220 insertions, 167 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bc65dc1..b6ac69f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,9 @@ cmake_minimum_required(VERSION 2.8) -project(uca C) set(TARNAME "libuca") set(UCA_VERSION_MAJOR "1") set(UCA_VERSION_MINOR "1") -set(UCA_VERSION_PATCH "0-dev") +set(UCA_VERSION_PATCH "0dev") set(UCA_DESCRIPTION "Unified Camera Access") set(UCA_VERSION_STRING "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}") @@ -16,7 +15,7 @@ set(PACKAGE_TARNAME "${TARNAME}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") -set(CPACK_GENERATOR "DEB;RPM;") +set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_RELEASE 3) set(CPACK_DEBIAN_PACKAGE_NAME "libuca") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Vogelgesang <matthias.vogelgesang@kit.edu>") @@ -25,8 +24,47 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY ${UCA_DESCRIPTION}) set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") -SET(UCA_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(UCA_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") + +set(UCA_ENUM_HDRS + ${CMAKE_CURRENT_SOURCE_DIR}/src/uca-camera.h + ${CMAKE_CURRENT_SOURCE_DIR}/plugins/pco/uca-pco-camera.h) + +# --- Common configuration --------------------------------------------------- + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/package.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/package.sh) + + +# --- Common flags ------------------------------------------------------------ + +add_definitions("-std=c99 -Wall") + + +# --- Common libraries -------------------------------------------------------- + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + +find_package(PkgConfig) +find_program(GLIB2_MKENUMS glib-mkenums REQUIRED) +pkg_check_modules(GLIB2 glib-2.0>=2.24 REQUIRED) +pkg_check_modules(GOBJECT2 gobject-2.0>=2.24 REQUIRED) +pkg_check_modules(GMODULE2 gmodule-2.0>=2.24 REQUIRED) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR}/src + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${GLIB2_INCLUDE_DIRS} + ${GOBJECT2_INCLUDE_DIRS}) + +set(UCA_DEPS + ${GLIB2_LIBRARIES} + ${GOBJECT2_LIBRARIES} + ${GMODULE2_LIBRARIES}) add_subdirectory(src) +add_subdirectory(plugins) add_subdirectory(test) add_subdirectory(tools) diff --git a/package.sh.in b/package.sh.in new file mode 100644 index 0000000..7c15b78 --- /dev/null +++ b/package.sh.in @@ -0,0 +1,7 @@ +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;libraries;/" +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;headers;/" -D CPACK_PACKAGE_FILE_NAME="libuca-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}-devel" + +# Build packages for all available cameras +for shell_script in `find -name 'package-plugin-*.sh'`; do + sh $shell_script +done diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt new file mode 100644 index 0000000..5131280 --- /dev/null +++ b/plugins/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(mock) +add_subdirectory(pf) +add_subdirectory(pco) +add_subdirectory(pylon) +add_subdirectory(ufo) diff --git a/plugins/mock/CMakeLists.txt b/plugins/mock/CMakeLists.txt new file mode 100644 index 0000000..75d8635 --- /dev/null +++ b/plugins/mock/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 2.8) +project(ucamock) + +set(UCA_CAMERA_NAME "mock") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) + +add_library(ucamock SHARED + uca-mock-camera.c) + +target_link_libraries(ucamock + uca + ${UCA_DEPS}) + +install(TARGETS ucamock + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca + COMPONENT ${UCA_CAMERA_NAME}) diff --git a/src/cameras/uca-mock-camera.c b/plugins/mock/uca-mock-camera.c index 7cd4689..7cd4689 100644 --- a/src/cameras/uca-mock-camera.c +++ b/plugins/mock/uca-mock-camera.c diff --git a/src/cameras/uca-mock-camera.h b/plugins/mock/uca-mock-camera.h index 9ee9190..9ee9190 100644 --- a/src/cameras/uca-mock-camera.h +++ b/plugins/mock/uca-mock-camera.h diff --git a/plugins/package-plugin.sh.in b/plugins/package-plugin.sh.in new file mode 100644 index 0000000..c624d52 --- /dev/null +++ b/plugins/package-plugin.sh.in @@ -0,0 +1 @@ +cpack -D CPACK_INSTALL_CMAKE_PROJECTS="${CMAKE_CURRENT_BINARY_DIR}/;Project;${UCA_CAMERA_NAME};/" -D CPACK_PACKAGE_FILE_NAME="uca-plugin-${UCA_CAMERA_NAME}-${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}" diff --git a/plugins/pco/CMakeLists.txt b/plugins/pco/CMakeLists.txt new file mode 100644 index 0000000..7c016b9 --- /dev/null +++ b/plugins/pco/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 2.8) +project(ucapco) + +find_package(PCO) +find_package(FgLib5) +find_package(ClSerMe4) + +if (PCO_FOUND AND CLSERME4_FOUND AND FGLIB5_FOUND) + set(UCA_CAMERA_NAME "pco") + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) + + include_directories(${PCO_INCLUDE_DIRS} + ${CLSERME4_INCLUDE_DIR} + ${FGLIB5_INCLUDE_DIR}) + + add_library(ucapco SHARED + uca-pco-camera.c) + + target_link_libraries(ucapco + ${UCA_DEPS} + ${PCO_LIBRARIES} + ${CLSERME4_LIBRARY} + ${FGLIB5_LIBRARY}) + + install(TARGETS ucapco + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca + COMPONENT ${UCA_CAMERA_NAME}) +endif() diff --git a/src/cameras/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c index 8bf2936..8bf2936 100644 --- a/src/cameras/uca-pco-camera.c +++ b/plugins/pco/uca-pco-camera.c diff --git a/src/cameras/uca-pco-camera.h b/plugins/pco/uca-pco-camera.h index 73ae44e..73ae44e 100644 --- a/src/cameras/uca-pco-camera.h +++ b/plugins/pco/uca-pco-camera.h diff --git a/plugins/pf/CMakeLists.txt b/plugins/pf/CMakeLists.txt new file mode 100644 index 0000000..f392603 --- /dev/null +++ b/plugins/pf/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 2.8) +project(ucapf) + +find_package(PF) +find_package(FgLib5) +find_package(ClSerMe4) + +if (PF_FOUND AND CLSERME4_FOUND AND FGLIB5_FOUND) + set(UCA_CAMERA_NAME "pco") + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) + + include_directories(${PF_INCLUDE_DIRS} + ${CLSERME4_INCLUDE_DIR} + ${FGLIB5_INCLUDE_DIR}) + + add_library(ucapf SHARED + uca-pf-camera.c) + + target_link_libraries(ucapf + ${UCA_DEPS} + ${PF_LIBRARIES} + ${CLSERME4_LIBRARY} + ${FGLIB5_LIBRARY}) + + install(TARGETS ucapf + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca + COMPONENT ${UCA_CAMERA_NAME}) +endif() diff --git a/src/cameras/uca-pf-camera.c b/plugins/pf/uca-pf-camera.c index 35b5edd..35b5edd 100644 --- a/src/cameras/uca-pf-camera.c +++ b/plugins/pf/uca-pf-camera.c diff --git a/src/cameras/uca-pf-camera.h b/plugins/pf/uca-pf-camera.h index 3a309aa..3a309aa 100644 --- a/src/cameras/uca-pf-camera.h +++ b/plugins/pf/uca-pf-camera.h diff --git a/plugins/pylon/CMakeLists.txt b/plugins/pylon/CMakeLists.txt new file mode 100644 index 0000000..18823a4 --- /dev/null +++ b/plugins/pylon/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 2.8) +project(ucapylon) + +find_package(Pylon) + +if (PYLON_FOUND) + set(UCA_CAMERA_NAME "pylon") + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) + + include_directories(${LIBPYLONCAM_INCLUDEDIR}) + + add_library(ucapylon SHARED + uca-pylon-camera.c) + + target_link_libraries(ucapylon + ${UCA_DEPS} + ${LIBPYLONCAM_LIBRARIES}) + + install(TARGETS ucapylon + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca + COMPONENT ${UCA_CAMERA_NAME}) +endif() diff --git a/src/cameras/uca-pylon-camera.c b/plugins/pylon/uca-pylon-camera.c index 541b69b..541b69b 100644 --- a/src/cameras/uca-pylon-camera.c +++ b/plugins/pylon/uca-pylon-camera.c diff --git a/src/cameras/uca-pylon-camera.h b/plugins/pylon/uca-pylon-camera.h index eebf63c..eebf63c 100644 --- a/src/cameras/uca-pylon-camera.h +++ b/plugins/pylon/uca-pylon-camera.h diff --git a/plugins/ufo/CMakeLists.txt b/plugins/ufo/CMakeLists.txt new file mode 100644 index 0000000..fe89668 --- /dev/null +++ b/plugins/ufo/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 2.8) +project(ucaufo) + +find_package(IPE) + +if (IPE_FOUND) + set(UCA_CAMERA_NAME "ufo") + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh) + + include_directories(${IPE_INCLUDE_DIRS}) + + add_library(ucaufo SHARED + uca-ufo-camera.c) + + target_link_libraries(ucaufo + ${UCA_DEPS} + ${IPE_LIBRARIES}) + + install(TARGETS ucaufo + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca + COMPONENT ${UCA_CAMERA_NAME}) +endif() diff --git a/src/cameras/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c index 7542fdf..7542fdf 100644 --- a/src/cameras/uca-ufo-camera.c +++ b/plugins/ufo/uca-ufo-camera.c diff --git a/src/cameras/uca-ufo-camera.h b/plugins/ufo/uca-ufo-camera.h index 7030389..7030389 100644 --- a/src/cameras/uca-ufo-camera.h +++ b/plugins/ufo/uca-ufo-camera.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a681f67..4bf5820 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.8) +project(uca C) # --- Set sources ------------------------------------------------------------- set(uca_SRCS @@ -10,147 +11,15 @@ set(uca_HDRS uca-camera.h uca-plugin-manager.h) -set(cameras) - -set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") - -# --- Find packages and libraries --------------------------------------------- -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - -# --- Find camera interfaces -find_package(PCO) -find_package(PF) -find_package(IPE) -find_package(Pylon) - -# --- Find frame grabber interfaces -find_package(FgLib5) -find_package(ClSerMe4) - -# --- Miscellanous packages -find_package(PkgConfig) -find_program(GLIB2_MKENUMS glib-mkenums REQUIRED) -pkg_check_modules(GLIB2 glib-2.0>=2.24 REQUIRED) -pkg_check_modules(GOBJECT2 gobject-2.0>=2.24 REQUIRED) -pkg_check_modules(GMODULE2 gmodule-2.0>=2.24 REQUIRED) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/cameras - ${GLIB2_INCLUDE_DIRS} - ${GOBJECT2_INCLUDE_DIRS}) - -# --- Configure step -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h) - -set(uca_LIBS - ${GLIB2_LIBRARIES} - ${GOBJECT2_LIBRARIES} - ${GMODULE2_LIBRARIES}) - -set(uca_enum_hdrs uca-camera.h) - -# --- Build options ----------------------------------------------------------- -option(HAVE_MOCK_CAMERA "Camera: Dummy" ON) - - -# --- Add sources if camera/framegrabber access sources are available --------- -if (PF_FOUND) - option(HAVE_PHOTON_FOCUS "Camera: Photon Focus MV2-D1280-640-CL-8" ON) - - if (HAVE_PHOTON_FOCUS AND CLSERME4_FOUND AND FGLIB5_FOUND) - list(APPEND uca_enum_hdrs cameras/uca-pf-camera.h) - - include_directories( - ${PF_INCLUDE_DIRS} - ${CLSERME4_INCLUDE_DIR} - ${FGLIB5_INCLUDE_DIR}) - - add_library(ucapf SHARED cameras/uca-pf-camera.c) - - target_link_libraries(ucapf - ${uca_LIBS} - ${CLSERME4_LIBRARY} - ${FGLIB5_LIBRARY} - ${PF_LIBRARIES}) - endif() -endif() - -if (PCO_FOUND AND CLSERME4_FOUND AND FGLIB5_FOUND) - option(HAVE_PCO_CL "Camera: CameraLink-based pco" ON) - - if (HAVE_PCO_CL) - list(APPEND uca_enum_hdrs cameras/uca-pco-camera.h) - - include_directories( - ${PCO_INCLUDE_DIRS} - ${CLSERME4_INCLUDE_DIR} - ${FGLIB5_INCLUDE_DIR}) - - add_library(ucapco SHARED cameras/uca-pco-camera.c) - - target_link_libraries(ucapco - ${uca_LIBS} - ${PCO_LIBRARIES} - ${CLSERME4_LIBRARY} - ${FGLIB5_LIBRARY}) - - install(TARGETS ucapco - LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca) - endif() -endif() - -if (IPE_FOUND) - option(HAVE_UFO_CAMERA "Camera: Custom based on Xilinx FPGA" ON) - - if (HAVE_UFO_CAMERA) - list(APPEND uca_enum_hdrs cameras/uca-ufo-camera.h) - - include_directories(${IPE_INCLUDE_DIRS}) - - add_library(ucaufo SHARED cameras/uca-ufo-camera.c) - target_link_libraries(ucaufo - ${uca_LIBS} - ${IPE_LIBRARIES} - ) - - install(TARGETS ucaufo - LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca) - endif() -endif() - -if (PYLON_FOUND) - option(HAVE_PYLON_CAMERA "Camera: Pylon based (Basler)" ON) - - if (HAVE_PYLON_CAMERA) - list(APPEND uca_SRCS cameras/uca-pylon-camera.c) - list(APPEND uca_HDRS cameras/uca-pylon-camera.h) - list(APPEND cameras "Pylon") - set(uca_LIBS ${uca_LIBS} ${LIBPYLONCAM_LIBRARIES}) - - include_directories(${LIBPYLONCAM_INCLUDEDIR}) - link_directories(${LIBPYLONCAM_LIBDIR}) - endif() - -endif() - -if (HAVE_MOCK_CAMERA) - add_library(ucamock SHARED cameras/uca-mock-camera.c) - install(TARGETS ucamock - LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca) -endif() - # --- Generate enum file add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h COMMAND ${GLIB2_MKENUMS} ARGS --template uca-enums.h.template - ${uca_enum_hdrs} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h + ${UCA_ENUM_HDRS} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${uca_enum_hdrs} + DEPENDS ${UCA_ENUM_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.h.template) add_custom_command( @@ -158,15 +27,34 @@ add_custom_command( COMMAND ${GLIB2_MKENUMS} ARGS --template uca-enums.c.template - ${uca_enum_hdrs} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.c + ${UCA_ENUM_HDRS} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${uca_enum_hdrs} + DEPENDS ${UCA_ENUM_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.c.template ) + +# --- Configure --------------------------------------------------------------- + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +set(prefix ${CMAKE_INSTALL_PREFIX}) +if (CI_INSTALL_PREFIX) + set(prefix ${CI_INSTALL_PREFIX}) +endif() + +set(exec_prefix "\${prefix}") +set(libdir ${prefix}/${LIB_INSTALL_DIR}) +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) + + # --- Build target ------------------------------------------------------------ -add_definitions("-std=c99 -Wall") add_library(uca SHARED ${uca_SRCS} @@ -176,8 +64,8 @@ set_target_properties(uca PROPERTIES VERSION ${UCA_ABI_VERSION} SOVERSION ${UCA_VERSION_MAJOR}) -target_link_libraries(uca - ${uca_LIBS}) +target_link_libraries(uca ${UCA_DEPS}) + # --- Build documentation ----------------------------------------------------- pkg_check_modules(GTK_DOC gtk-doc) @@ -269,37 +157,26 @@ endif() # --- Install target ---------------------------------------------------------- -set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") install(TARGETS uca - LIBRARY DESTINATION ${LIB_INSTALL_DIR}) - -install(FILES ${uca_HDRS} - DESTINATION include/uca) - -# --- install pkg-config file -set(prefix ${CMAKE_INSTALL_PREFIX}) -if (CI_INSTALL_PREFIX) - set(prefix ${CI_INSTALL_PREFIX}) -endif() + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + COMPONENT libraries) -set(exec_prefix "\${prefix}") -set(libdir ${prefix}/${LIB_INSTALL_DIR}) -set(includedir "\${prefix}/include") -set(VERSION ${UCA_VERSION_STRING}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uca.pc + DESTINATION lib/pkgconfig + COMPONENT libraries) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/uca.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/uca.pc" @ONLY IMMEDIATE) +install(FILES ${uca_HDRS} + DESTINATION include/uca + COMPONENT headers) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uca.pc DESTINATION lib/pkgconfig) +# --- Generate package description -------------------------------------------- set(CPACK_PACKAGE_DESCRIPTION "Unified Camera Access library") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Abstract interface for different camera classes and frame grabber devices") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GObject-based library for accessing scientific cameras") set(CPACK_PACKAGE_NAME "libuca") -# --- Distro specific -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.6), libgcc1 (>= 1:4.1)") - # this doesn't work when building RPMs on Jenkins set(CPACK_SET_DESTDIR ON) @@ -310,13 +187,12 @@ set(CPACK_PACKAGE_VERSION_MINOR ${UCA_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${UCA_VERSION_PATCH}) set(VERSION ${UCA_VERSION_STRING}) -set(CPACK_GENERATOR "DEB;RPM;") +set(CPACK_GENERATOR "RPM;") + set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_IGNORE_FILES ".git" "tags" ".bzr" ".swp") set(CPACK_SOURCE_PACKAGE_FILE_NAME "libuca-${UCA_VERSION_STRING}" CACHE INTERNAL "tarball basename") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${UCA_VERSION_STRING}-${CMAKE_SYSTEM_PROCESSOR}") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../libuca.spec.in" - "${CMAKE_CURRENT_BINARY_DIR}/../libuca.spec" @ONLY IMMEDIATE) include(CPack) |