Move from qt_wrap_ui to AUTOUIC for launcher and wizard

(#7348)
master
pi03k 2 months ago committed by Pi03k
parent ac7b54af80
commit 18080a83d6

@ -33,16 +33,6 @@ set(LAUNCHER_HEADER
utils/openalutil.hpp
)
# Headers that must be pre-processed
set(LAUNCHER_UI
${CMAKE_CURRENT_SOURCE_DIR}/ui/datafilespage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/graphicspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/mainwindow.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/importpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/settingspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/directorypicker.ui
)
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
set(QT_USE_QTGUI 1)
@ -57,9 +47,7 @@ if(WIN32)
endif(WIN32)
QT_ADD_RESOURCES(RCC_SRCS ${LAUNCHER_RES})
QT_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT WIN32)
include_directories(${LIBUNSHIELD_INCLUDE_DIR})
endif(NOT WIN32)
@ -70,8 +58,6 @@ openmw_add_executable(openmw-launcher
${LAUNCHER}
${LAUNCHER_HEADER}
${RCC_SRCS}
${MOC_SRCS}
${UI_HDRS}
)
add_dependencies(openmw-launcher qm-files)
@ -95,6 +81,8 @@ endif()
if(USE_QT)
set_property(TARGET openmw-launcher PROPERTY AUTOMOC ON)
set_property(TARGET openmw-launcher PROPERTY AUTOUIC ON)
set_property(TARGET openmw-launcher PROPERTY AUTOUIC_SEARCH_PATHS ui)
endif(USE_QT)
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)

@ -33,21 +33,9 @@ set(WIZARD_HEADER
utils/componentlistwidget.hpp
)
set(WIZARD_UI
${CMAKE_CURRENT_SOURCE_DIR}/ui/componentselectionpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/conclusionpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/existinginstallationpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/importpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/installationtargetpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/intropage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/languageselectionpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/methodselectionpage.ui
)
if (OPENMW_USE_UNSHIELD)
set (WIZARD ${WIZARD} installationpage.cpp unshield/unshieldworker.cpp)
set (WIZARD_HEADER ${WIZARD_HEADER} installationpage.hpp unshield/unshieldworker.hpp)
set (WIZARD_UI ${WIZARD_UI} ${CMAKE_CURRENT_SOURCE_DIR}/ui/installationpage.ui)
add_definitions(-DOPENMW_USE_UNSHIELD)
endif (OPENMW_USE_UNSHIELD)
@ -66,9 +54,6 @@ if(WIN32)
endif(WIN32)
QT_ADD_RESOURCES(RCC_SRCS ${WIZARD_RES})
QT_WRAP_UI(UI_HDRS ${WIZARD_UI})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if (OPENMW_USE_UNSHIELD)
include_directories(${LIBUNSHIELD_INCLUDE_DIRS})
@ -79,7 +64,6 @@ openmw_add_executable(openmw-wizard
${WIZARD}
${WIZARD_HEADER}
${RCC_SRCS}
${UI_HDRS}
)
add_dependencies(openmw-wizard qm-files)
@ -109,4 +93,6 @@ endif(WIN32)
if(USE_QT)
set_property(TARGET openmw-wizard PROPERTY AUTOMOC ON)
set_property(TARGET openmw-wizard PROPERTY AUTOUIC ON)
set_property(TARGET openmw-wizard PROPERTY AUTOUIC_SEARCH_PATHS ui)
endif(USE_QT)

Loading…
Cancel
Save