This commit updates the Brewfile to include additional optional dependencies such as Vulkan headers, RapidJSON, and various libraries for enhanced functionality. It also modifies CMake files to make the handling of optional components more user-friendly, allowing missing dependencies to disable features without causing build failures on macOS. Additionally, it refines the search paths for the Sparkle framework and adjusts the linking of the discord-rpc library based on the availability of RapidJSON.
32 lines
861 B
CMake
32 lines
861 B
CMake
# Try to find RapidJSON (header-only).
|
|
#
|
|
# This project uses `find_package(RapidJSON)` and expects:
|
|
# - RapidJSON_FOUND
|
|
# - RapidJSON_INCLUDE_DIRS
|
|
#
|
|
# Homebrew's `rapidjson` formula commonly installs headers to:
|
|
# /opt/homebrew/include/rapidjson
|
|
# but does not always ship a `RapidJSONConfig.cmake`, so we provide this
|
|
# Find-module fallback.
|
|
|
|
find_path(RapidJSON_INCLUDE_DIR
|
|
NAMES rapidjson/document.h
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(RapidJSON
|
|
REQUIRED_VARS RapidJSON_INCLUDE_DIR
|
|
)
|
|
|
|
if(RapidJSON_FOUND)
|
|
set(RapidJSON_INCLUDE_DIRS "${RapidJSON_INCLUDE_DIR}")
|
|
endif()
|
|
|
|
if(RapidJSON_FOUND AND NOT TARGET RapidJSON::RapidJSON)
|
|
add_library(RapidJSON::RapidJSON INTERFACE IMPORTED)
|
|
set_target_properties(RapidJSON::RapidJSON PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${RapidJSON_INCLUDE_DIR}"
|
|
)
|
|
endif()
|
|
|