diff options
author | Volker Kaiser <volker.kaiser@softwareschneiderei.de> | 2012-08-01 14:58:46 +0200 |
---|---|---|
committer | Volker Kaiser <volker.kaiser@softwareschneiderei.de> | 2012-08-01 14:58:46 +0200 |
commit | 6683a6e9a6fc0259d5e5dfd97279680e292d7938 (patch) | |
tree | b9bbda868e18319173611fcae75725f61623021c | |
parent | 3e1c17378f21a737de85ad4c0e07210be9fcd5dd (diff) | |
download | libuca-6683a6e9a6fc0259d5e5dfd97279680e292d7938.tar.gz libuca-6683a6e9a6fc0259d5e5dfd97279680e292d7938.tar.bz2 libuca-6683a6e9a6fc0259d5e5dfd97279680e292d7938.tar.xz libuca-6683a6e9a6fc0259d5e5dfd97279680e292d7938.zip |
fixed pylon build
-rw-r--r-- | cmake/FindPylon.cmake | 16 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/CMakeLists.txt | 1 |
3 files changed, 11 insertions, 10 deletions
diff --git a/cmake/FindPylon.cmake b/cmake/FindPylon.cmake index be3ce85..9c678bc 100644 --- a/cmake/FindPylon.cmake +++ b/cmake/FindPylon.cmake @@ -8,7 +8,9 @@ # PYLON_LIB - pco library # check for environment variable PYLON_ROOT -message("DEFINED PYLON ROOT $ENV{PYLON_ROOT}") +find_package(YAT) +find_package(PkgConfig) + if (NOT "$ENV{PYLON_ROOT}" STREQUAL "") message("PYLON_ROOT=$ENV{PYLON_ROOT}") set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:$ENV{PYLON_ROOT}/lib") @@ -16,16 +18,16 @@ if (NOT "$ENV{PYLON_ROOT}" STREQUAL "") set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH};$ENV{PYLON_ROOT}/genicam/bin/Linux64_x64") set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH};$ENV{PYLON_ROOT}/genicam/bin/Linux32_i86") + pkg_check_modules(LIBPYLONCAM pyloncam>=0.1 REQUIRED) - find_package(YAT) + find_library(YAT_LIB yat ${YAT_LIBRARY_DIRS}) find_package(PackageHandleStandardArgs) - find_path(PYLON_INCLUDE_DIR libpyloncam/pylon_camera.h) - find_library(PYLON_LIB pyloncam) - - message("INCLUDE ${PYLON_INCLUDE_DIR}") + find_package_handle_standard_args(PYLON DEFAULT_MSG LIBPYLONCAM_INCLUDEDIR LIBPYLONCAM_LIBRARIES) - find_package_handle_standard_args(PYLON DEFAULT_MSG PYLON_LIB PYLON_INCLUDE_DIR) + mark_as_advanced( + LIBPYLONCAM_INCLUDEDIR + LIBPYLONCAM_LIBRARIES) else() message("Environment variable PYLON_ROOT not found! => unable to build pylon camera support") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c114cce..9238106 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -98,9 +98,9 @@ if (PYLON_FOUND) 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} ${PYLON_LIB}) + set(uca_LIBS ${uca_LIBS} ${LIBPYLONCAM_LIBRARIES}) - include_directories(${PYLON_INCLUDE_DIR}) + include_directories(${LIBPYLONCAM_INCLUDEDIR}) endif() endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5fb8133..4cd43ce 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,7 +36,6 @@ if (HAVE_PYLON_CAMERA) set(PYLON_LIB_DIRS $ENV{PYLON_ROOT}/lib64 $ENV{PYLON_ROOT}/bin ${GENICAM_ROOT}/bin/Linux32_i86 ${GENICAM_ROOT}/bin/Linux32_i86/GenApi/Generic) endif() - message("PYLON LIB DIRS ${PYLON_LIB_DIRS}") link_directories(${PYLON_LIB_DIRS}) endif() |