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)
|
project(QtDialog)
|
||||||
|
find_package(Qt5Widgets QUIET)
|
||||||
|
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")
|
set(QT_MIN_VERSION "4.4.0")
|
||||||
find_package(Qt4 REQUIRED)
|
find_package(Qt4 REQUIRED)
|
||||||
|
|
||||||
if(NOT QT4_FOUND)
|
if(NOT QT4_FOUND)
|
||||||
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
|
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
AddCacheEntry.cxx
|
AddCacheEntry.cxx
|
||||||
AddCacheEntry.h
|
AddCacheEntry.h
|
||||||
|
|
Loading…
Reference in New Issue