Fetch nowide on Windows

This commit is contained in:
Luke Street 2025-04-04 17:29:38 -06:00
parent 9584303083
commit 6febcc2c79
2 changed files with 13 additions and 0 deletions

View File

@ -59,6 +59,18 @@ endif()
include (CMakePackageConfigHelpers)
if (WIN32 AND NOT TARGET nowide)
include(FetchContent)
FetchContent_Declare(
nowide
URL https://github.com/boostorg/nowide/releases/download/v11.3.0/nowide_standalone_v11.3.0.tar.gz
URL_HASH SHA256=153ac93173c8de9c08e7701e471fa750f84c27e51fe329570c5aa06016591f8c
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(nowide)
endif ()
if(NOT TARGET spdlog)
find_package(spdlog REQUIRED)
endif()

View File

@ -36,6 +36,7 @@ target_link_libraries(nod PUBLIC $<BUILD_INTERFACE:spdlog::spdlog>)
if(WIN32)
target_sources(nod PRIVATE FileIOWin32.cpp)
target_link_libraries(nod PRIVATE nowide::nowide)
else()
target_compile_options(nod PRIVATE -Wno-multichar)
target_sources(nod PRIVATE FileIOFILE.cpp)