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

Works in Ubuntu with Qt5 but I have to manually hack in CMake #1

Open
artemis-beta opened this issue Jan 1, 2022 · 1 comment
Open

Comments

@artemis-beta
Copy link

artemis-beta commented Jan 1, 2022

The macro:

#if QT_VERSION >= 0x050000
#include <QtZlib/zlib.h>
#else
#include <zlib.h>
#endif

fails for me. After some online searching it looks like this header was a private one no longer present in Qt. In order to get this to work I have to manually copy zlib.h to a location as QtZlib/zlib.h to mock the behaviour. I have added AbZip as a git submodule to my project:

# AbZip assumes QtZlib/zlib.h exists when it does not so have to dummy it
add_custom_target( MOCK_QTLZIB 
    COMMAND ${CMAKE_COMMAND} -E copy ${ZLIB_INCLUDE_DIRS}/zlib.h ${CMAKE_BINARY_DIR}/QtZlib/zlib.h
)
target_include_directories( ${ABZIP} PUBLIC ${CMAKE_BINARY_DIR}/zlib )
add_dependencies( ${ABZIP} MOCK_QTLZIB )

I recommend removing this and adding the requirement for zlib.h or finding another way of doing this.

But I can confirm this works! Also does exactly what I have been wanting to do so thank you 🙂

@artemis-beta
Copy link
Author

Repository of project: https://github.com/Railway-Op-Sim/ROSPkgManager

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

1 participant