summaryrefslogtreecommitdiffstats
path: root/plugins/xkit/CMakeLists.txt
blob: 6441c46b2f4f50709cbacb94c7a872f57eaa38b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required(VERSION 2.6)
project(ucaxkit CXX)

set(UCA_CAMERA_NAME "xkit")
set(PLUGIN_VERSION "0.1.0")
set(PLUGIN_REVISION "1")
set(PLUGIN_REQUIRES "libuca >= 1.2.0")

find_package(PkgConfig)
pkg_check_modules(XKIT xkit>=0.1.0)

if (XKIT_FOUND)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in
                   ${CMAKE_CURRENT_BINARY_DIR}/../../package-plugin-${UCA_CAMERA_NAME}.sh)

    message("includedir: ${XKIT_LIBRARIES}")

    include_directories(${XKIT_INCLUDEDIR}
                        ${UCA_CONFIGDIR})

    # We have to compile with g++ because the included header files have C++
    # style comments ...
    add_library(ucaxkit SHARED
                uca-xkit-camera.cc)

    target_link_libraries(ucaxkit
                          ${UCA_DEPS}
                          ${XKIT_LIBRARIES})

    install(TARGETS ucaxkit
            LIBRARY DESTINATION ${UCA_PLUGINDIR}
            COMPONENT ${UCA_CAMERA_NAME})
endif ()