Skip to content

Commit

Permalink
cmake: FindRE.cmake similar to baresip
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Sep 18, 2024
1 parent c8f6124 commit 63628f7
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions cmake/FindRE.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBRE QUIET libre)

find_path(RE_INCLUDE_DIR re.h
HINTS ../re/include ${PC_LIBRE_INCLUDEDIR} ${PC_LIBRE_INCLUDE_DIRS})
find_path(RE_INCLUDE_DIR
NAME re.h
HINTS
../re/include
${PC_LIBRE_INCLUDEDIR}
${PC_LIBRE_INCLUDE_DIRS}
PATHS /usr/local/include/re /usr/include/re
)

find_library(RE_LIBRARY NAMES re libre re-static
HINTS ../re ../re/build ../re/build/Debug
${PC_LIBRE_LIBDIR} ${PC_LIBRE_LIBRARY_DIRS})
find_library(RE_LIBRARY
NAMES re libre re-static
HINTS
../re
../re/build
../re/build/Debug
${PC_LIBRE_LIBDIR}
${PC_LIBRE_LIBRARY_DIRS}
PATHS /usr/local/lib64 /usr/lib64 /usr/local/lib /usr/lib
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RE DEFAULT_MSG RE_LIBRARY RE_INCLUDE_DIR)
Expand Down

0 comments on commit 63628f7

Please sign in to comment.