CMake get Qt5 source directory variable
-
Hi guys,
how can I get Qt5 source directory in CMakeLists.txt?For example I have Qt5 installation on Windows: C:\Qt\5.12.9, on Linux ~/Qt/5.12.9. This folders contains Src path.
So I need following in my CMakeLists.txt:
set(MY_QT5_SRC_DIR C:\Qt\5.12.9\Src)
Thanks a lot!
-
Then copy the sources over to your sources. When I as a user want to compile your app and then would need the entire Qt sources I would give up.
-
FindQt[456].cmake will and can't return you the directory of the sources Qt was compiled from since the sources are normally not distributed and also not needed to compile and link against Qt. Why do you need the Qt sources when you compile your app?
-
@Christian-Ehrlicher yeah I see,
I wish build static library with C:\Qt\5.12.9\Src\qttools\src\shared\qtpropertybrowser for my app. :-). Yeah I know that can be find in Qt solution but in Qt source more comfortable because from the box.
-
Then copy the sources over to your sources. When I as a user want to compile your app and then would need the entire Qt sources I would give up.
-
-
@Christian-Ehrlicher but what the package I need to install for build my app using Qt sources?
-
The Qt source package I would guess?