build: replace brew find_package with FetchContent for fmt and spdlog
Removes the Homebrew dependency so the build works on any platform with only CMake 3.24+ and a C++20 compiler. fmt and spdlog are now fetched and compiled from source alongside the other FetchContent deps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-9
@@ -8,18 +8,20 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
|||||||
# All executables land in build/bin so studio-manager finds node binaries next to itself
|
# All executables land in build/bin so studio-manager finds node binaries next to itself
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
# Homebrew on Apple Silicon
|
|
||||||
if(APPLE)
|
|
||||||
list(APPEND CMAKE_PREFIX_PATH /opt/homebrew)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
# ── fmt (brew install fmt — already installed) ───────────────────────────────
|
# ── fmt ──────────────────────────────────────────────────────────────────────
|
||||||
find_package(fmt REQUIRED)
|
FetchContent_Declare(fmt
|
||||||
|
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||||
|
GIT_TAG 12.1.0)
|
||||||
|
FetchContent_MakeAvailable(fmt)
|
||||||
|
|
||||||
# ── spdlog (brew install spdlog — just installed) ────────────────────────────
|
# ── spdlog (uses the fmt target fetched above) ────────────────────────────────
|
||||||
find_package(spdlog REQUIRED)
|
set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_Declare(spdlog
|
||||||
|
GIT_REPOSITORY https://github.com/gabime/spdlog.git
|
||||||
|
GIT_TAG v1.17.0)
|
||||||
|
FetchContent_MakeAvailable(spdlog)
|
||||||
|
|
||||||
# ── stduuid (header-only; no brew formula) ───────────────────────────────────
|
# ── stduuid (header-only; no brew formula) ───────────────────────────────────
|
||||||
set(UUID_SYSTEM_GENERATOR ON CACHE BOOL "" FORCE) # use CoreFoundation on macOS
|
set(UUID_SYSTEM_GENERATOR ON CACHE BOOL "" FORCE) # use CoreFoundation on macOS
|
||||||
|
|||||||
Reference in New Issue
Block a user