Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling on kde neon 22.04 #239

Closed
Blad3forc3 opened this issue Nov 5, 2022 · 5 comments
Closed

Error compiling on kde neon 22.04 #239

Blad3forc3 opened this issue Nov 5, 2022 · 5 comments

Comments

@Blad3forc3
Copy link

-- The C compiler identification is GNU 9.5.0
-- The CXX compiler identification is GNU 9.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Found ALSA: /usr/lib/x86_64-linux-gnu/libasound.so (found version "1.2.6.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libudev'
-- Found libudev, version 249
-- Found X11: /usr/local/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found Qt: 5.15.7
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for modules 'libavformat;libavcodec;libswresample;libswscale;libavutil'
-- Found libavformat, version 58.76.100
-- Found libavcodec, version 58.134.100
-- Found libswresample, version 3.9.100
-- Found libswscale, version 5.9.100
-- Found libavutil, version 56.70.100
-- Configuring done
CMake Error at src/CMakeLists.txt:602 (add_executable):
Target "punes" links to target "Qt5::Gui," but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

@punesemu
Copy link
Owner

punesemu commented Nov 5, 2022

-- Found Qt: 5.15.7

on line 651 of the src/CMakeList.txt there is this condition:

$<IF:$<VERSION_LESS:${QT_VERSION},5.15.0>,
	Qt5::Core
	Qt5::Network
	Qt5::Widgets
	Qt5::Svg
	Qt5::Gui
	,
	Qt::Core
	Qt::Network
	Qt::Widgets
	Qt::Svg
	Qt::Gui
	$<IF:$<VERSION_GREATER_EQUAL:${QT_VERSION},6.0.0>,Qt::OpenGLWidgets,>
>

your log tells me that cmake tries to use Qt5::Gui despite the version of QT you use is greater than 5.15.0, it should use Qt::Gui instead. Really weird, I haven't encountered this problem on any distribution I've tried. I will try to install your distribution in a virtual machine to see if I can reproduce the problem.

@punesemu
Copy link
Owner

punesemu commented Nov 6, 2022

Try with last commit.

@Blad3forc3
Copy link
Author

Yes it now compiles correctly. Thanks

@winterheart
Copy link
Contributor

Since 5.15 Qt moved libraries targets to more generic Qt:: namespace which ease to Qt6 transition. When I worked on CMake buildsystem, I capped minimal version as 5.15.0 for this reason.

@punesemu
Copy link
Owner

punesemu commented Nov 6, 2022

First of all, thanks again for your work, I will never stop thanking you.

Since 5.15 Qt moved libraries targets to more generic Qt:: namespace which ease to Qt6 transition. When I worked on CMake buildsystem, I capped minimal version as 5.15.0 for this reason.

I had guessed this could be the reason but I needed to keep the possibility of being able to compile even with QTs prior to 5.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants