Skip to content

Commit

Permalink
fix: Fix compilation in Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Dave <[email protected]>
  • Loading branch information
dmga44 authored and ictus4u committed Feb 7, 2025
1 parent 56232dd commit f461643
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,28 @@
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"hidden": true
},
{
"name": "windows",
"inherits": ["default", "vcpkg"],
"generator": "MinGW Makefiles",
"cacheVariables": {
"SOCKET_LIBRARIES": "C:/msys64/mingw64/lib/libws2_32.a",
"VCPKG_TARGET_TRIPLET": "x64-mingw-static",
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"ENABLE_DOCS": "OFF",
"ENABLE_CLIENT_LIB": "OFF",
"ENABLE_URAFT": "OFF",
"ENABLE_NFS_GANESHA": "OFF",
"GSH_CAN_HOST_LOCAL_FS": "OFF",
"ENABLE_POLONAISE": "OFF",
"ENABLE_TESTS": "OFF",
"ENABLE_PROMETHEUS": "OFF",
"ENABLE_NFS_ACL_SUPPORT": "OFF",
"CODE_COVERAGE": "OFF",
"SAUNAFS_TEST_POINTER_OBFUSCATION": "OFF",
"ENABLE_WERROR": "ON"
}
},
{
"name": "debug",
"binaryDir": "${sourceDir}/build/saunafs/debug",
Expand Down
6 changes: 5 additions & 1 deletion src/slogger/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
collect_sources(SLOGGER)

shared_add_library(slogger ${SLOGGER_SOURCES})
target_link_libraries(slogger fmt::fmt spdlog::spdlog)
if(MINGW)
target_link_libraries(slogger fmt::fmt)
else()
target_link_libraries(slogger fmt::fmt spdlog::spdlog)
endif()
shared_target_link_libraries(slogger STATIC config sfserr SHARED config_pic sfserr_pic)

0 comments on commit f461643

Please sign in to comment.