From c22c7e1254228c43cc56eecb03bd6ac171768a0d Mon Sep 17 00:00:00 2001 From: Volker Kaiser Date: Thu, 2 Aug 2012 10:22:28 +0200 Subject: use LIBPYLONCAM_OTHER_PREFIX to change prefix found with pkg-config --- cmake/FindPylon.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/FindPylon.cmake b/cmake/FindPylon.cmake index 9c678bc..a8b7182 100644 --- a/cmake/FindPylon.cmake +++ b/cmake/FindPylon.cmake @@ -10,6 +10,7 @@ # check for environment variable PYLON_ROOT find_package(YAT) find_package(PkgConfig) +find_package(PackageHandleStandardArgs) if (NOT "$ENV{PYLON_ROOT}" STREQUAL "") message("PYLON_ROOT=$ENV{PYLON_ROOT}") @@ -21,13 +22,18 @@ if (NOT "$ENV{PYLON_ROOT}" STREQUAL "") pkg_check_modules(LIBPYLONCAM pyloncam>=0.1 REQUIRED) find_library(YAT_LIB yat ${YAT_LIBRARY_DIRS}) - find_package(PackageHandleStandardArgs) find_package_handle_standard_args(PYLON DEFAULT_MSG LIBPYLONCAM_INCLUDEDIR LIBPYLONCAM_LIBRARIES) mark_as_advanced( LIBPYLONCAM_INCLUDEDIR LIBPYLONCAM_LIBRARIES) + if (DEFINED LIBPYLONCAM_OTHER_PREFIX) + string(REPLACE ${LIBPYLONCAM_PREFIX} ${LIBPYLONCAM_OTHER_PREFIX} + LIBPYLONCAM_INCLUDEDIR ${LIBPYLONCAM_INCLUDEDIR}) + string(REPLACE ${LIBPYLONCAM_PREFIX} ${LIBPYLONCAM_OTHER_PREFIX} + LIBPYLONCAM_LIBRARIES ${LIBPYLONCAM_LIBRARIES}) + endif() else() message("Environment variable PYLON_ROOT not found! => unable to build pylon camera support") -- cgit v1.2.3