From 034204d3d8d1a32b1a20e50697c5f81db6fb20cf Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 31 Aug 2012 23:14:16 +0200 Subject: Initial plugin manager --- src/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9508c5c..1b814aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8) # --- Set sources ------------------------------------------------------------- set(uca_SRCS uca-camera.c + uca-plugin-manager.c ) set(uca_HDRS @@ -10,6 +11,8 @@ set(uca_HDRS set(cameras) +set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") + # --- Find packages and libraries --------------------------------------------- set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) @@ -107,9 +110,12 @@ if (PYLON_FOUND) endif() if (HAVE_MOCK_CAMERA) - list(APPEND uca_SRCS cameras/uca-mock-camera.c) - list(APPEND uca_HDRS cameras/uca-mock-camera.h) - list(APPEND cameras "Mock") + add_library(ucamock SHARED cameras/uca-mock-camera.c) + #list(APPEND uca_SRCS cameras/uca-mock-camera.c) + ##list(APPEND uca_HDRS cameras/uca-mock-camera.h) + #list(APPEND cameras "Mock") + install(TARGETS ucamock + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca) endif() # --- Generate enum file -- cgit v1.2.3 From 6dd3229337aa1920d266fbd2c4001fb7c65f5cf1 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 19 Sep 2012 18:04:32 +0200 Subject: Make most cameras plugins --- src/CMakeLists.txt | 104 +++++++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 46 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1b814aa..42f9dd8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,10 +31,25 @@ 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}) + ${GLIB2_LIBRARIES} + ${GOBJECT2_LIBRARIES} + ${GMODULE2_LIBRARIES}) + +set(uca_enum_hdrs uca-camera.h) # --- Build options ----------------------------------------------------------- option(HAVE_MOCK_CAMERA "Camera: Dummy" ON) @@ -45,18 +60,20 @@ 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_SRCS cameras/uca-pf-camera.c) - list(APPEND uca_HDRS cameras/uca-pf-camera.h) - list(APPEND cameras "Pf") - - set(uca_LIBS ${uca_LIBS} - ${CLSERME4_LIBRARY} - ${FGLIB5_LIBRARY} - ${PF_LIBRARIES}) + list(APPEND uca_enum_hdrs cameras/uca-pf-camera.h) - include_directories(${PF_INCLUDE_DIRS} + 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() @@ -64,19 +81,23 @@ 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_SRCS cameras/uca-pco-camera.c) - list(APPEND uca_HDRS cameras/uca-pco-camera.h) - list(APPEND cameras "Pco") - - set(uca_LIBS ${uca_LIBS} - ${PCO_LIBRARIES} - ${CLSERME4_LIBRARY} - ${FGLIB5_LIBRARY}) + 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() @@ -84,13 +105,18 @@ if (IPE_FOUND) option(HAVE_UFO_CAMERA "Camera: Custom based on Xilinx FPGA" ON) if (HAVE_UFO_CAMERA) - list(APPEND uca_SRCS cameras/uca-ufo-camera.c) - list(APPEND uca_HDRS cameras/uca-ufo-camera.h) - list(APPEND cameras "Ufo") - - set(uca_LIBS ${uca_LIBS} ${IPE_LIBRARIES}) + 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() @@ -111,9 +137,6 @@ endif() if (HAVE_MOCK_CAMERA) add_library(ucamock SHARED cameras/uca-mock-camera.c) - #list(APPEND uca_SRCS cameras/uca-mock-camera.c) - ##list(APPEND uca_HDRS cameras/uca-mock-camera.h) - #list(APPEND cameras "Mock") install(TARGETS ucamock LIBRARY DESTINATION ${LIB_INSTALL_DIR}/uca) endif() @@ -124,9 +147,9 @@ add_custom_command( COMMAND ${GLIB2_MKENUMS} ARGS --template uca-enums.h.template - ${uca_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_HDRS} + DEPENDS ${uca_enum_hdrs} ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.h.template) add_custom_command( @@ -134,29 +157,18 @@ add_custom_command( COMMAND ${GLIB2_MKENUMS} ARGS --template uca-enums.c.template - ${uca_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_HDRS} + DEPENDS ${uca_enum_hdrs} ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.c.template ) -# --- Configure step -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/cameras - ${GLIB2_INCLUDE_DIRS} - ${GOBJECT2_INCLUDE_DIRS}) - # --- Build target ------------------------------------------------------------ add_definitions("-std=c99 -Wall") -add_library(uca SHARED - ${uca_SRCS} +add_library(uca SHARED + ${uca_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.c) set_target_properties(uca PROPERTIES @@ -177,7 +189,7 @@ if(GTK_DOC_FOUND) set(docs_out "${docs_dir}/reference") file(MAKE_DIRECTORY ${docs_out}) - set(reference_files + set(reference_files "${docs_out}/index.html" "${docs_out}/api-index-full.html" "${docs_out}/ch01.html" @@ -261,7 +273,7 @@ set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") install(TARGETS uca LIBRARY DESTINATION ${LIB_INSTALL_DIR}) -install(FILES ${uca_HDRS} +install(FILES ${uca_HDRS} DESTINATION include/uca) # --- install pkg-config file -- cgit v1.2.3 From 7b32cb1f541a4606bfed3cdfe470d69a9ccbde5a Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 19 Sep 2012 18:07:14 +0200 Subject: Install plugin manager header file --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 42f9dd8..e186975 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,8 @@ set(uca_SRCS ) set(uca_HDRS - uca-camera.h) + uca-camera.h + uca-plugin-manager.h) set(cameras) -- cgit v1.2.3 From 99b737ae9f3f1d35a4696594821fa3bc39e8aa87 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 28 Sep 2012 18:16:56 +0200 Subject: Fix #146: Make a new top-level directory for cams ... and build a package for each camera. Moreover, for some reason we can live without the CMake generated spec file for RPM generation. AFAICS, the RPMs are prefixed correctly. --- src/CMakeLists.txt | 202 +++++++++++------------------------------------------ 1 file changed, 39 insertions(+), 163 deletions(-) (limited to 'src/CMakeLists.txt') 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) -- cgit v1.2.3 From b3dbedeec78a55802565a3824ab52188e8b9bd4d Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 8 Oct 2012 14:38:16 +0200 Subject: Generate introspection files Unfortunately, the gir tools recognize anything with $PREFIX_new_$SUFFIX as some kind of constructor. This means that we have to rename uca_plugin_manager_new_camera() to uca_plugin_manager_get_camera(). --- src/CMakeLists.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4bf5820..dd2f464 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,6 +37,9 @@ add_custom_command( # --- Configure --------------------------------------------------------------- +find_program(INTROSPECTION_SCANNER "g-ir-scanner") +find_program(INTROSPECTION_COMPILER "g-ir-compiler") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) @@ -67,7 +70,51 @@ set_target_properties(uca PROPERTIES target_link_libraries(uca ${UCA_DEPS}) +# --- Build introspection files ----------------------------------------------- + +if (INTROSPECTION_SCANNER AND INTROSPECTION_COMPILER) + option(WITH_GIR "Build introspection files" ON) + + if (WITH_GIR) + set(GIR_PREFIX "Uca-${UCA_ABI_VERSION}") + set(GIR_XML "${GIR_PREFIX}.gir") + set(GIR_TYPELIB "${GIR_PREFIX}.typelib") + set(_gir_input) + + foreach(_src ${uca_SRCS} ${uca_HDRS}) + list(APPEND _gir_input "${CMAKE_CURRENT_SOURCE_DIR}/${_src}") + endforeach() + + add_custom_command(OUTPUT ${GIR_XML} + COMMAND ${INTROSPECTION_SCANNER} + --namespace=Uca + --nsversion=${UCA_ABI_VERSION} + --library=uca + --no-libtool + --include=GObject-2.0 + --include=GModule-2.0 + --output ${GIR_XML} + --warn-all + ${_gir_input} + DEPENDS ${uca_SRCS} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + add_custom_command(OUTPUT ${GIR_TYPELIB} + COMMAND ${INTROSPECTION_COMPILER} + -o ${GIR_TYPELIB} + ${GIR_XML} + DEPENDS ${GIR_XML} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + add_custom_target(gir ALL DEPENDS ${GIR_XML} ${GIR_TYPELIB}) + add_dependencies(gir uca) + + endif() +endif() + + # --- Build documentation ----------------------------------------------------- + pkg_check_modules(GTK_DOC gtk-doc) if(GTK_DOC_FOUND) @@ -170,6 +217,16 @@ install(FILES ${uca_HDRS} DESTINATION include/uca COMPONENT headers) +if(WITH_GIR) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_XML} + DESTINATION share/gir-1.0 + COMPONENT libraries) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB} + DESTINATION ${LIB_INSTALL_DIR}/girepository-1.0 + COMPONENT libraries) +endif() + # --- Generate package description -------------------------------------------- -- cgit v1.2.3 From b72daf9dbba95a208a4fb84e5b1c629d64a72c00 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 9 Oct 2012 16:05:20 +0200 Subject: Fix #151: Rename trigger enum value --- src/CMakeLists.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dd2f464..160c52b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,7 @@ if(GTK_DOC_FOUND) "${docs_out}/api-index-full.html" "${docs_out}/ch01.html" "${docs_out}/UcaCamera.html" + "${docs_out}/UcaPluginManager.html" "${docs_out}/style.css" "${docs_out}/uca.devhelp2" "${docs_out}/home.png" @@ -137,18 +138,6 @@ if(GTK_DOC_FOUND) "${docs_out}/right.png" "${docs_out}/up.png") - # Put in uca-docs.xml and uca.types all cameras that are built - set(_xml_doc_input) - set(_types_input) - foreach (_cam ${cameras}) - # add camera to the installed documentation - list(APPEND reference_files "${docs_out}/Uca${_cam}Camera.html") - - string(TOLOWER ${_cam} _cam) - set(_xml_doc_input "${_xml_doc_input}\n") - set(_types_input "${_types_input}\nuca_${_cam}_camera_get_type") - endforeach() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/uca-docs.xml.in ${docs_out}/uca-docs.xml) -- cgit v1.2.3