diff options
-rw-r--r-- | host/cmake/Modules/FindORC.cmake | 28 | ||||
-rw-r--r-- | host/lib/convert/CMakeLists.txt | 9 |
2 files changed, 32 insertions, 5 deletions
diff --git a/host/cmake/Modules/FindORC.cmake b/host/cmake/Modules/FindORC.cmake new file mode 100644 index 000000000..bb212fb1b --- /dev/null +++ b/host/cmake/Modules/FindORC.cmake @@ -0,0 +1,28 @@ +######################################################################## +# Find the library for ORC development files +######################################################################## + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.11") + +FIND_PATH( + ORC_INCLUDE_DIRS + NAMES orc/orc.h + HINTS $ENV{ORC_DIR}/include/orc-0.4 + ${PC_ORC_INCLUDEDIR} + PATHS /usr/local/include/orc-0.4 + /usr/include/orc-0.4 +) + +FIND_LIBRARY( + ORC_LIBRARIES + NAMES orc-0.4 + HINTS $ENV{ORC_DIR}/lib + ${PC_ORC_LIBDIR} + PATHS /usr/local/lib + /usr/lib +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC DEFAULT_MSG ORC_LIBRARIES ORC_INCLUDE_DIRS) +MARK_AS_ADVANCED(ORC_LIBRARIES ORC_INCLUDE_DIRS) diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index 0d9d0983f..28defa8bc 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -24,12 +24,11 @@ MESSAGE(STATUS "") ######################################################################## # Look for Orc support ######################################################################## -FIND_PACKAGE(PkgConfig) -IF(PKG_CONFIG_FOUND) -PKG_CHECK_MODULES(ORC "orc-0.4 > 0.4.11") -ENDIF(PKG_CONFIG_FOUND) +FIND_PACKAGE(ORC) -FIND_PROGRAM(ORCC_EXECUTABLE orcc) +IF(NOT ORCC_EXECUTABLE) + FIND_PROGRAM(ORCC_EXECUTABLE orcc) +ENDIF() LIBUHD_REGISTER_COMPONENT("ORC" ENABLE_ORC ON "ENABLE_LIBUHD;ORC_FOUND;ORCC_EXECUTABLE" OFF) |