File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,3 +47,4 @@ CMakeSettings.json
4747install
4848trace.json
4949.cache /
50+ build_examples /
Original file line number Diff line number Diff line change 2121# ##############################################################################
2222include (FindPackageHandleStandardArgs )
2323
24+ # On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
25+ # /usr/local (Intel Macs). Detect the prefix dynamically so cmake finds
26+ # dependencies regardless of Mac architecture.
27+ if (APPLE )
28+ execute_process (
29+ COMMAND brew --prefix brotli
30+ OUTPUT_VARIABLE HOMEBREW_BROTLI_PREFIX
31+ OUTPUT_STRIP_TRAILING_WHITESPACE
32+ ERROR_QUIET
33+ )
34+ if (HOMEBREW_BROTLI_PREFIX)
35+ list (APPEND CMAKE_PREFIX_PATH ${HOMEBREW_BROTLI_PREFIX} )
36+ endif ()
37+ endif ()
38+
2439find_path (BROTLI_INCLUDE_DIR "brotli/decode.h" )
2540
2641find_library (BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static )
Original file line number Diff line number Diff line change 55# HIREDIS_INCLUDE_DIRS - hiredis include directories
66# HIREDIS_LIBRARIES - libraries need to use hiredis
77
8+ # On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
9+ # /usr/local (Intel Macs). Detect the prefix dynamically so cmake finds
10+ # dependencies regardless of Mac architecture.
11+ if (APPLE )
12+ execute_process (
13+ COMMAND brew --prefix hiredis
14+ OUTPUT_VARIABLE HOMEBREW_HIREDIS_PREFIX
15+ OUTPUT_STRIP_TRAILING_WHITESPACE
16+ ERROR_QUIET
17+ )
18+ if (HOMEBREW_HIREDIS_PREFIX)
19+ list (APPEND CMAKE_PREFIX_PATH ${HOMEBREW_HIREDIS_PREFIX} )
20+ endif ()
21+ endif ()
22+
823if (HIREDIS_INCLUDE_DIRS AND HIREDIS_LIBRARIES)
924 set (HIREDIS_FIND_QUIETLY TRUE )
1025 set (Hiredis_FOUND TRUE )
Original file line number Diff line number Diff line change 1010# false, do not try to use jsoncpp.
1111# Jsoncpp_lib - The imported target library.
1212
13+ # On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
14+ # /usr/local (Intel Macs). Detect the prefix dynamically so cmake finds
15+ # dependencies regardless of Mac architecture.
16+ if (APPLE )
17+ execute_process (
18+ COMMAND brew --prefix jsoncpp
19+ OUTPUT_VARIABLE HOMEBREW_JSONCPP_PREFIX
20+ OUTPUT_STRIP_TRAILING_WHITESPACE
21+ ERROR_QUIET
22+ )
23+ if (HOMEBREW_JSONCPP_PREFIX)
24+ list (APPEND CMAKE_PREFIX_PATH ${HOMEBREW_JSONCPP_PREFIX} )
25+ endif ()
26+ endif ()
27+
28+
1329# only look in default directories
1430find_path (JSONCPP_INCLUDE_DIRS
1531 NAMES json/json.h
Original file line number Diff line number Diff line change 1313# SQLite3_FOUND - True if sqlite3 found.
1414# SQLite3_lib - The imported target library.
1515
16+ # On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
17+ # /usr/local (Intel Macs). Detect the prefix dynamically so cmake finds
18+ # dependencies regardless of Mac architecture.
19+ if (APPLE )
20+ execute_process (
21+ COMMAND brew --prefix sqlite3
22+ OUTPUT_VARIABLE HOMEBREW_SQLITE3_PREFIX
23+ OUTPUT_STRIP_TRAILING_WHITESPACE
24+ ERROR_QUIET
25+ )
26+ if (HOMEBREW_SQLITE3_PREFIX)
27+ list (APPEND CMAKE_PREFIX_PATH ${HOMEBREW_SQLITE3_PREFIX} )
28+ endif ()
29+ endif ()
30+
1631# Look for the header file.
1732find_path (SQLITE3_INCLUDE_DIRS NAMES sqlite3.h )
1833
Original file line number Diff line number Diff line change 77# PostgreSQL.
88# pg_lib - The imported target library.
99
10+ # On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
11+ # /usr/local (Intel Macs). Detect the prefix dynamically so cmake finds
12+ # dependencies regardless of Mac architecture.
13+ if (APPLE )
14+ execute_process (
15+ COMMAND brew --prefix libpq
16+ OUTPUT_VARIABLE HOMEBREW_PG_PREFIX
17+ OUTPUT_STRIP_TRAILING_WHITESPACE
18+ ERROR_QUIET
19+ )
20+ if (HOMEBREW_PG_PREFIX)
21+ list (APPEND CMAKE_PREFIX_PATH ${HOMEBREW_PG_PREFIX} )
22+ endif ()
23+ endif ()
24+
1025find_package (PostgreSQL )
1126if (PostgreSQL_FOUND)
1227 set (PG_LIBRARIES ${PostgreSQL_LIBRARIES} )
You can’t perform that action at this time.
0 commit comments