]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
Small clanup (just move functions around)
[lyx.git] / CMakeLists.txt
index 5c8828b827838cfbe172403e6960ed6d69adb389..4e64a013571066c2ff326be905e3830b6b270fae 100644 (file)
@@ -462,8 +462,31 @@ if(NOT MSVC)
        endif()
 endif()
 
+find_package(Qt5Core QUIET)
+if (Qt5Core_FOUND)
+       find_package(Qt5Widgets REQUIRED)
+       set(QTVERSION ${Qt5Core_VERSION})
+       macro (qt_use_modules)
+               qt5_use_modules(${ARGN})
+       endmacro()
+       macro (qt_add_resources)
+               qt5_add_resources(${ARGN})
+       endmacro()
+       macro (qt_wrap_uifiles)
+               qt5_wrap_ui(${ARGN})
+       endmacro()
+else()
+       find_package(Qt4 "4.5.0" REQUIRED)
+       macro (qt_use_modules)
+       endmacro()
+       macro (qt_add_resources)
+               qt4_add_resources(${ARGN})
+       endmacro()
+       macro (qt_wrap_uifiles)
+               qt4_wrap_ui(${ARGN})
+       endmacro()
+endif()
 
-find_package(Qt4 "4.5.0" REQUIRED)
 find_package(Magic)
 if(Magic_FOUND)
        set(HAVE_MAGIC_H 1)