diff --git a/CMakeLists.txt b/CMakeLists.txt index 93d20f3..d42f7a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fabb45c..f98582e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -36,6 +36,7 @@ target_link_libraries(nod PUBLIC $) 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)