nodeguy/config/qt.cmake
Atul R 86c3ef089c
Integration with Qode 2.0 (#400)
* Moves qt integration solely to the nodegui core addon

* Adds lint fixes

* moved to integration core

* cleans up export snippet

* revert package.json

* Add exit if app->exec finishes.

* lint fix

* Makes QApplication custom

* adds qobject to wrap of qapp

* Adds working qt run looper

* Adds font default

* Adds qt installer

* Updates qode integration to v2.0.1

* fix cpp lints

* Fixes lint and deps

* Adds miniqt installation

* adds setup mini qt script

* skips tests due to issues with jest

* fix config and download path for linux and windows

* Adds multiple artifact downloader

* fix qt config and compilation

* Fixes qode path for windows (now it can load dll's easily)

* Add compilation

* fix windows path setup

* use scripts directly

* enabled tests back

* fix ubuntu deps

* update to alpha release

* fix workflow

* adds more artifacts and funding field

* change to alpha v2

* update prebuild yml

* revert build action

* disabling prebuild for now

* switch to stable release 5.14.1

* version bump
2020-03-07 10:28:30 +01:00

26 lines
848 B
CMake

# Adds Qt support
# make sure you include this at the top of whichever Cmakelist file you are going to use.
# Need for automatic moc.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(QTCONFIG_FILE ${CMAKE_CURRENT_LIST_DIR}/qtConfig.js)
macro(AddQtSupport addonName)
execute_process(COMMAND node -p "require('${QTCONFIG_FILE}').qtCmakeDir"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE QT_CMAKE_HOME_DIR
)
string(REPLACE "\n" "" QT_CMAKE_HOME_DIR "${QT_CMAKE_HOME_DIR}")
string(REPLACE "\"" "" QT_CMAKE_HOME_DIR "${QT_CMAKE_HOME_DIR}")
message(STATUS "Using QT installation for ${addonName} QT_CMAKE_HOME_DIR:${QT_CMAKE_HOME_DIR}")
set(Qt5_DIR ${QT_CMAKE_HOME_DIR})
find_package(Qt5 COMPONENTS Widgets Gui Core REQUIRED)
endmacro(AddQtSupport addonName)