File qnotepad-use-system-libs.patch of Package mingw64-qnotepad

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c97753..82c1974 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,9 +10,6 @@ endif()
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
-add_subdirectory(thirdparty/spdlog)
-add_subdirectory(thirdparty/fmt)
-
 include_directories(src) # This shouldn't be needed, but we do it so ui_mainwindow.h can see editor.h
 
 set(CMAKE_AUTOMOC ON)
@@ -23,15 +20,18 @@ file(GLOB SOURCES "src/*.cpp")
 
 find_package(QT NAMES Qt5 COMPONENTS Widgets REQUIRED)
 find_package(Qt5 COMPONENTS Widgets REQUIRED)
+find_package(fmt REQUIRED)
+find_package(spdlog REQUIRED)
 
 add_executable(qnotepad ${SOURCES})
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
-target_link_libraries(qnotepad Qt5::Widgets spdlog fmt stdc++fs)
+#target_link_libraries(qnotepad Qt5::Widgets spdlog::spdlog fmt stdc++fs)
+target_link_libraries(qnotepad Qt5::Widgets spdlog::spdlog fmt)
 else()
-target_link_libraries(qnotepad Qt5::Widgets spdlog fmt)
+target_link_libraries(qnotepad Qt5::Widgets spdlog::spdlog fmt)
 endif()
 
 install(TARGETS qnotepad DESTINATION bin)
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
     install(FILES ${CMAKE_SOURCE_DIR}/qnotepad.desktop DESTINATION /usr/share/applications)
-endif ()
\ No newline at end of file
+endif ()
openSUSE Build Service is sponsored by