diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-01 15:36:50 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-05 15:54:48 (GMT) |
commit | 4ccc9921be03d26436a1a70dd134ee044c3734ab (patch) | |
tree | d423ea6a82e9210ba4ff7d27b6ccb3078173abe3 /Source/QtDialog | |
parent | e4d601546044be33f6eee549373ea093aa240d43 (diff) | |
download | CMake-4ccc9921be03d26436a1a70dd134ee044c3734ab.zip CMake-4ccc9921be03d26436a1a70dd134ee044c3734ab.tar.gz CMake-4ccc9921be03d26436a1a70dd134ee044c3734ab.tar.bz2 |
QtDialog: use qt5 functions for special Qt sources
Automoc is not supported in bootstrap builds, so it cannot be used
unconditionally.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 08047b4..4a03f0b 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -6,15 +6,6 @@ CMake_OPTIONAL_COMPONENT(cmake-gui) find_package(Qt5Widgets REQUIRED) 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(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES}) @@ -102,6 +93,7 @@ set(SRCS CMakeSetup.cxx CMakeSetupDialog.cxx CMakeSetupDialog.h + Compilers.h FirstConfigure.cxx FirstConfigure.h QCMake.cxx @@ -115,7 +107,7 @@ set(SRCS WarningMessagesDialog.cxx WarningMessagesDialog.h ) -QT4_WRAP_UI(UI_SRCS +qt5_wrap_ui(UI_SRCS CMakeSetupDialog.ui Compilers.ui CrossCompiler.ui @@ -123,7 +115,7 @@ QT4_WRAP_UI(UI_SRCS RegexExplorer.ui WarningMessagesDialog.ui ) -QT4_WRAP_CPP(MOC_SRCS +qt5_wrap_cpp(MOC_SRCS AddCacheEntry.h Compilers.h CMakeSetupDialog.h @@ -134,14 +126,24 @@ QT4_WRAP_CPP(MOC_SRCS RegexExplorer.h WarningMessagesDialog.h ) -QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) +qt5_add_resources(RC_SRCS CMakeSetup.qrc) + +if (FALSE) # CMake's bootstrap binary does not support automoc + set(CMAKE_AUTOMOC 1) + set(CMAKE_AUTORCC 1) + set(CMAKE_AUTOUIC 1) +else () + list(APPEND SRCS + ${UI_SRCS} + ${MOC_SRCS} + ${RC_SRCS}) +endif () -set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS}) if(WIN32) - set(SRCS ${SRCS} CMakeSetup.rc) + list(APPEND SRCS CMakeSetup.rc) endif() if(APPLE) - set(SRCS ${SRCS} CMakeSetup.icns) + list(APPEND SRCS CMakeSetup.icns) set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns) set_source_files_properties(CMakeSetup.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) |