qmake

Qt project include subprojects build in qmake

微笑、不失礼 提交于 2021-02-19 08:18:13
问题 I have a cross-platform project written in Qt/C++, this project uses a static library that is written in Go as a dependency. Go project generates two files ( .a and .h as expected) using GNU Make. I am trying to automate builds for which I am using qmake to generate Makefile and then calling default target of this Makefile as simple $ make . Right now my build first explicitly does git clone go-subproject && cd go-subproject && make , then it copies over resulting library and headers file and

Build a 3rd party library from source within an existing Qt project

孤街浪徒 提交于 2021-02-06 11:09:45
问题 My project requires a version of zlib that isn't present on all target machines, so I want to build zlib from source in my project. Then when I make my project, it should first build zlib so it can be linked to when compiling my project. One complication is that zlib requires configure to be run before make can be run. I'm not even sure where to start here. Is there functionality built in to Qt Creator for importing 3rd party library source code like this, or do I need to code out a custom

Build a 3rd party library from source within an existing Qt project

冷暖自知 提交于 2021-02-06 11:04:34
问题 My project requires a version of zlib that isn't present on all target machines, so I want to build zlib from source in my project. Then when I make my project, it should first build zlib so it can be linked to when compiling my project. One complication is that zlib requires configure to be run before make can be run. I'm not even sure where to start here. Is there functionality built in to Qt Creator for importing 3rd party library source code like this, or do I need to code out a custom

Build a 3rd party library from source within an existing Qt project

冷暖自知 提交于 2021-02-06 11:04:15
问题 My project requires a version of zlib that isn't present on all target machines, so I want to build zlib from source in my project. Then when I make my project, it should first build zlib so it can be linked to when compiling my project. One complication is that zlib requires configure to be run before make can be run. I'm not even sure where to start here. Is there functionality built in to Qt Creator for importing 3rd party library source code like this, or do I need to code out a custom

how can i include python.h in QMake

旧街凉风 提交于 2021-02-05 06:12:05
问题 INCLUDEPATH = -L /usr/include/python2.7 LIBS += /usr/local/lib/python2.7 QMAKE_CXXFLAGS += /usr/local/lib/python2.7 error: cannot find /usr/local/lib/python2.7: File format not recognized There is a problem. I have already installed python-all-dev. 回答1: You must use the following format: LIBS += -L {path of your library.so} -l{library} INCLUDEPATH += {path of your headers} DEPENDPATH += {path of your headers} In your case: LIBS += -L /usr/local/lib/python2.7 -lpython2.7 INCLUDEPATH += /usr

PyQtdeploy-V2.4 User Guide 中文 (二)

耗尽温柔 提交于 2021-02-02 03:44:08
PyQtdeploy 用户指南 <span id = mulu>目录</span> 介绍 与V1.0+的差异 作者 证书 安装 部署过程概览 PyQt的演示 构建演示 Android IOS Linux MacOS Windos 构建系统根目录 标准组建插件 创建Sysroot规范文件 PyQt演示的Sysroot 命令行 编写组建插件 创建PyQtdeploy项目 定义应用程序源 定义qmake配置 添加标准库包 添加其他包 添加其他扩展模块 定义文件和目录位置 构建应用程序 命令行 Windows和动态加载扩展模块 使用pyrcc的应用程序 支持PEP 302可选导入挂钩 pdytools模块 <span id = bsgcgl>部署过程概览</span> PyQtdeploy的母的是将Python应用程序、Python解释器、Python标准库、Python C扩展模块、第三方Python包和第三方扩展模块转换为对于特定目标的单个可执行文件。根据目标,可执行文件可能需要通过某种方式打包才能真正部署。例如:Android应用程序需要签名并打包为 .apk 文件。任何此类打包都不在PyQtdeploy的范围内。 虽然PyQtdeploy允许你创建单个可执行文件,但你能根据需要将组建保留在可执行文件外部。 PyQtdeploy支持一下目标体系结构: Android -32

Static linking against Qt on Windows using CMake

无人久伴 提交于 2021-01-29 03:24:02
问题 I'm working on a Qt project that is developed on Linux, but also has a statically linked Windows build. I can build it on Linux and Windows using the same CMakeLists.txt file. It strips down to: project(muckturnier) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_REQUIRED TRUE) find_package(Qt5 COMPONENTS Widgets Sql) include_directories(${Qt5Widgets_INCLUDES} ${Qt5Sql_INCLUDES}) set(CMAKE_AUTOMOC ON) set(muckturnier_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/SomeCode.cpp) add_executable(muckturnier $

Static linking against Qt on Windows using CMake

烈酒焚心 提交于 2021-01-29 03:17:29
问题 I'm working on a Qt project that is developed on Linux, but also has a statically linked Windows build. I can build it on Linux and Windows using the same CMakeLists.txt file. It strips down to: project(muckturnier) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_REQUIRED TRUE) find_package(Qt5 COMPONENTS Widgets Sql) include_directories(${Qt5Widgets_INCLUDES} ${Qt5Sql_INCLUDES}) set(CMAKE_AUTOMOC ON) set(muckturnier_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/SomeCode.cpp) add_executable(muckturnier $

Convert qmake into CMake

会有一股神秘感。 提交于 2021-01-28 11:37:07
问题 I am new to CMake, but I used to use qmake. In my qmake, I have the following for adding a static library that is inside a folder called bin, inside the project folder: QT -= gui QT += core CONFIG += c++11 console CONFIG -= app_bundle DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ main.cpp macx: LIBS += -L$$PWD/bin/lib/ -lnanomsg INCLUDEPATH += $$PWD/bin/include DEPENDPATH += $$PWD/bin/include macx: PRE_TARGETDEPS += $$PWD/bin/lib/libnanomsg.a What is the corresponding CMake syntax? I tried

qmake to Cmake transition: syntax for external librairies

亡梦爱人 提交于 2021-01-28 06:08:21
问题 For a specific project I am moving out of qmake and now have to use cmake. My path are the following: Source : ~/Projects/Project External static library (OSVR in this instance) paths : ~/osvr/lib/ , ~/osvr/include/osvr /osvr/include/jsoncpp Using qmake, the linking part to that library used to be: INCLUDEPATH += /usr/include LIBS += -L$$PWD/../../osvr/lib/ -losvrClientKit -losvrClient -losvrCommon -losvrUtil -ljsoncpp INCLUDEPATH += $$PWD/../../osvr/include/ INCLUDEPATH += $$PWD/../..