mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
Build with Qt5 if it is found.
This commit is contained in:
parent
717f31a877
commit
25a4f56754
@ -9,16 +9,33 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
project(QtDialog)
|
|
||||||
set(QT_MIN_VERSION "4.4.0")
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
|
|
||||||
if(NOT QT4_FOUND)
|
project(QtDialog)
|
||||||
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
|
find_package(Qt5Widgets QUIET)
|
||||||
return()
|
if (Qt5Widgets_FOUND)
|
||||||
|
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||||
|
add_definitions(${Qt5Widgets_DEFINITONS})
|
||||||
|
macro(qt4_wrap_ui)
|
||||||
|
qt5_wrap_ui(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
macro(qt4_wrap_cpp)
|
||||||
|
qt5_wrap_cpp(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
macro(qt4_add_resources)
|
||||||
|
qt5_add_resources(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
set(QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
|
||||||
|
else()
|
||||||
|
set(QT_MIN_VERSION "4.4.0")
|
||||||
|
find_package(Qt4 REQUIRED)
|
||||||
|
if(NOT QT4_FOUND)
|
||||||
|
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(${QT_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
AddCacheEntry.cxx
|
AddCacheEntry.cxx
|
||||||
AddCacheEntry.h
|
AddCacheEntry.h
|
||||||
|
Loading…
Reference in New Issue
Block a user