Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.0.1
-
None
-
4caac1feea025b0ad496141e8f16ab88c04c2caa (qt/qtbase/dev)
Description
Looks like the pro2cmake.py translation made a bit of a mess of the file at qtbase/examples/widgets/tools/plugandpaint/app/CMakeLists.txt. There's invalid CMake syntax in various places and it looks like the translation went a bit haywire:
if(macx-xcode) target_link_libraries(plugandpaint PUBLIC ( ) pnp_basictools$ ) endif() if(NOT macx-xcode) target_link_libraries(plugandpaint PUBLIC pnp_basictools ) endif() if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (APPLE)) target_link_libraries(plugandpaint PUBLIC (LIBS, 0) (LIBS, 1) _debug ) endif() if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (WIN32)) target_link_libraries(plugandpaint PUBLIC (LIBS, 0) (LIBS, 1) d ) endif()
A secondary issue is that this CMakeLists.txt file refers to the pnp_basictools library, but that is built by a sibling directory. When the app example is built on its own, it can't find the pnp_basictools library because it isn't part of the same build.
I'm wondering if the app and plugins are supposed to be separate example projects or whether they should be a single project. There seems to be other examples that do it both ways, so there isn't a single consistent convention for this.
Attachments
Issue Links
- relates to
-
QTBUG-87449 Example not compiling due '/usr/bin/ld: cannot find -lpnp_basictools'
- Closed