https://bugs.kde.org/show_bug.cgi?id=382175
Bug ID: 382175 Summary: Some ThreadWeaver examples cannot be compiled standalone Product: frameworks-threadweaver Version: 5.36.0 Platform: MS Windows OS: MS Windows Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: mi...@kde.org Reporter: athai...@gmail.com CC: kdelibs-b...@kde.org Target Milestone: --- I encountered issues trying to follow chapter 2 of the "KDE Frameworks Cookbook". I wanted to follow along with the chapter, placing the code snippets into a project as they appeared in the book and seeing if it ran. However, that didn't work. I next tried cloning ThreadWeaver's source. There are issues preventing the examples from being configured individually with each example's CMakeLists.txt file (as opposed to configuring the examples as part of configuring ThreadWeaver using its root CMakeLists.txt file): 1. HelloWorld: The call to project()[1] is after the call to find_package()[2]. This causes CMake 3.8.2 to break in odd ways. It's strongly recommended to put the call to project() *before* any other calls since project() apparently sets some important variables. [1] https://github.com/KDE/threadweaver/blob/v5.36.0/examples/HelloWorld/CMakeLists.txt#L18 [2] https://github.com/KDE/threadweaver/blob/v5.36.0/examples/HelloWorld/CMakeLists.txt#L6 2. HelloInternet: - Missing cmake_minimum_required() - Missing fix found in f75f0ca (already applied to HelloWorld) - kde_enable_exceptions() and set(CMAKE_INCLUDE_CURRENT_DIR ON) need to go into an else() block (it's defined in a CMakeLists.txt outside this folder) - Missing find_package() for Qt - Won't compile despite these fixes: R:\include\KF5\ThreadWeaver\threadweaver/exception.h(34): fatal error C1083: Cannot open include file: 'threadweaver_export.h': No such file or directory Found in 5.36.0 and master (aec8f5e as of writing) and most likely since the examples were added to the repo. The other two examples (HelloWorldRaw, ThumbNailer) also have most of the issues HelloInternet does. I'd like to see these fixed as that would make them good *standalone* examples as opposed to something more like unit tests that aren't being run. -- You are receiving this mail because: You are watching all bug changes.