mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Remove support for Qt4
This commit is contained in:
@@ -3,18 +3,8 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project ( cafProjectDataModel_UnitTests )
|
||||
|
||||
# Qt
|
||||
if (NOT DEFINED(CEE_USE_QT5))
|
||||
option(CEE_USE_QT5 "Use Qt5" OFF)
|
||||
endif(NOT DEFINED(CEE_USE_QT5))
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Xml Gui)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtXml QtGui)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Xml Gui)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml Qt5::Gui)
|
||||
|
||||
if (MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code related to TR1
|
||||
@@ -49,19 +39,8 @@ target_link_libraries ( ${PROJECT_NAME}
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
# Copy Qt Dlls
|
||||
if (CEE_USE_QT5)
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
else()
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtXml)
|
||||
foreach (qtlib ${QTLIBLIST})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_BINARY_DIR}/$<IF:$<CONFIG:Debug>,${qtlib}d4.dll,${qtlib}4.dll> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach( qtlib )
|
||||
endif(MSVC)
|
||||
endif(CEE_USE_QT5)
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
Reference in New Issue
Block a user