]> git.lyx.org Git - lyx.git/commit
Cmake build: Simplify use of qt5 modules
authorKornel Benko <kornel@lyx.org>
Sat, 9 Jun 2018 21:59:47 +0000 (23:59 +0200)
committerKornel Benko <kornel@lyx.org>
Sat, 9 Jun 2018 21:59:47 +0000 (23:59 +0200)
commit72a2f922393f8029b658fffe3c5a2e3e2c81ac1d
tree3b0d648e903adb466f398f9c9ce6af71056fb985
parentd6b21e20e254c96d963c6ab4988ad635f8f4e44b
Cmake build: Simplify use of qt5 modules

According to this page:
http://doc.qt.io/qt-5/cmake-manual.html
the way to replace use of qt5_use_modules() for module "_mod" and target "_target"
is to use
1.) cmake_minimum_required(VERSION 3.1.0)
2.) find_package(Qt5${_mod} CONFIG REQUIRED)
3.) target_link_libraries(${_target} Qt5::${_mod})
The last one sets all reguired libraries, compile flags and needed includes for the ${_target}
CMakeLists.txt