| 1 |
# find ORC |
| 2 |
# - Try to find LibOrc-0.4 |
| 3 |
# Once done this will define |
| 4 |
# ORC_FOUND - System has LibOrc |
| 5 |
# ORC_INCLUDE_DIRS - The LibOrc include directories |
| 6 |
# ORC_LIBRARIES - The libraries needed to use LibOrc |
| 7 |
# ORC_DEFINITIONS - Compiler switches required for using LibOrc |
| 8 |
|
| 9 |
find_package(PkgConfig) |
| 10 |
pkg_check_modules(PC_ORC orc-0.4) |
| 11 |
set(ORC_DEFINITIONS ${PC_ORC_CFLAGS_OTHER}) |
| 12 |
|
| 13 |
find_path(ORC_INCLUDE_DIR orc/orc.h |
| 14 |
HINTS ${PC_ORC_INCLUDEDIR} ${PC_ORC_INCLUDE_DIRS} |
| 15 |
PATH_SUFFIXES orc) |
| 16 |
|
| 17 |
find_library(ORC_LIBRARY NAMES orc-0.4 |
| 18 |
HINTS ${PC_ORC_LIBDIR} ${PC_ORC_LIBRARY_DIRS} ) |
| 19 |
|
| 20 |
set(ORC_LIBRARIES ${ORC_LIBRARY} ) |
| 21 |
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR} ) |
| 22 |
include(FindPackageHandleStandardArgs) |
| 23 |
# handle the QUIETLY and REQUIRED arguments and set ORC_FOUND to TRUE |
| 24 |
# if all listed variables are TRUE |
| 25 |
find_package_handle_standard_args(LibOrc DEFAULT_MSG |
| 26 |
ORC_LIBRARY ORC_INCLUDE_DIR) |
| 27 |
|
| 28 |
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ) |
| 29 |
# End find ORC |