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

Using Qt5AutoUpdater w/ CMake & Qt5.6 #7

Closed
jordanbaucke opened this issue May 16, 2017 · 3 comments
Closed

Using Qt5AutoUpdater w/ CMake & Qt5.6 #7

jordanbaucke opened this issue May 16, 2017 · 3 comments

Comments

@jordanbaucke
Copy link

jordanbaucke commented May 16, 2017

I have attempted to add Qt5AutoUpdater to a project with CMake.

Initially, we attempted to just use source files and compile them ourselves. This appears to have some issues on MSVC, so I would prefer to just reference the compiled binaries.

I'm a relative novice with CMake, so any advice would be appreciated:

I have downloaded: 2.1.0 (which appears to have CMake files included, however, it is targeting Qt 5.8), and then the earlier 2.0.0 that do not have any CMake files.

Here is my attempt at a creating a CMakified version:
https://github.com/jordanbaucke/qtautoupdater_cmake

I removed:

include_directories("")
link_directories("")

As I wasn't sure if I needed to "install" the precompiled binaries first - or how to do that without seeing a CMakeLists.txt or Find_Package module for QtAutoUpdater.

Thanks.

@Skycoder42
Copy link
Owner

I'm very sorry, but I won't be of any help with cmake, because I did not create those files. I never even used cmake. I use the Qt module project structure, and it automatically generates those files as part of the deployment step. And since I don't know cmake, I cannot verify those files.

The reason they appear with 2.1.0 is, that starting there I use the Qt build system. You need to copy the whole module (binaries, headers, etc.) into the Qt installation directory to make it work (This is what the repository does automatically).

If you need them for Qt 5.7, you can try to compile QtAutoUpdater 2.1.0 with Qt 5.7 yourself (using qmake, see Point 4). However, I'm not sure it compiles with 5.7, and I only use the msvc 2015 compilers, I can't say anything for older versions.

If you run the whole build process, it will automatically copy all created binaries, headers, etc. to the correct locations. Once thats done, you should be able to use it as any other Qt Module (core, gui, etc.), even from cmake.

Keep me updated, and if you need help with the compilation of the library itself, feel free to post them here. I may be able to post workarounds, if it's not build with older versions.

@jordanbaucke
Copy link
Author

jordanbaucke commented May 17, 2017

@Skycoder42 ,

Thank you for the quick reply. I was able to successfully link the pre-compiled version of the libraries into my app with CMake (using target_link_libraries), I updated my repo.

Obviously, it's a stop-gap, and libraries should be built from source and than link the library (but I had to get this done).

If anyone with more CMake knowledge comes along and helps create a find_package / installer we could upstream it here for other Qt/CMake people.

Thanks again,

Jordan

@Skycoder42
Copy link
Owner

I'm glad you could get it to work :) And at least since 5.8, it should be easily usable with cmake.

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

2 participants