https://bugs.kde.org/show_bug.cgi?id=400716

--- Comment #1 from Jos van den Oever <j...@vandenoever.info> ---
Nice to hear you got it working on windows.

Would these changes work for you?

diff --git a/examples/todos/CMakeLists.txt b/examples/todos/CMakeLists.txt
index 9a940af..8400542 100644
--- a/examples/todos/CMakeLists.txt
+++ b/examples/todos/CMakeLists.txt
@@ -37,7 +37,11 @@ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES
FATAL_ON_MISSING_REQUIRED_PACKAG
 ### build commands ###

 SET(RUST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rust")
-SET(RUST_LIB "${RUST_DIR}/${RUST_TARGET_DIR}/librust.a")
+if (MSVC)
+  SET(RUST_LIB "${RUST_DIR}/${RUST_TARGET_DIR}/rust.lib")
+else()
+  SET(RUST_LIB "${RUST_DIR}/${RUST_TARGET_DIR}/librust.a")
+endif()

 # generate c++ and rust code from bindings.json
 add_custom_command(
@@ -61,6 +65,9 @@ add_custom_command(
 add_custom_target(rust_target DEPENDS "${RUST_LIB}")

 list(APPEND Libs "${RUST_LIB}")
+if (MSVC)
+  list(APPEND Libs WS2_32.LIB Userenv.lib)
+endif()
 list(APPEND Libs Qt5::Core Qt5::Quick Threads::Threads ${CMAKE_DL_LIBS})
 set(SRCS src/main.cpp src/Bindings.cpp "qml.qrc")
 add_executable(todos ${SRCS})

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to