mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
System : Remove support for Qt4
This commit is contained in:
parent
e4547b8e0d
commit
4b372b438e
@ -23,17 +23,11 @@ find_package( OpenGL )
|
||||
option(RESINSIGHT_ENABLE_GRPC "Enable the gRPC scripting framework" OFF)
|
||||
option(RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE "Bundle the gRPC python modules into the install folder" OFF)
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Network Script Widgets Xml Concurrent PrintSupport)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Script Qt5::Widgets Qt5::Xml Qt5::Concurrent Qt5::PrintSupport)
|
||||
else()
|
||||
set (QT_COMPONENTS_REQUIRED QtCore QtGui QtMain QtOpenGl QtNetwork QtScript)
|
||||
find_package(Qt4 COMPONENTS ${QT_COMPONENTS_REQUIRED} REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
# NB: The generated file is written to Cmake binary folder to avoid source tree pollution
|
||||
@ -300,13 +294,8 @@ set ( QT_MOC_HEADERS
|
||||
SocketInterface/RiaSocketServer.h
|
||||
)
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${QT_MOC_HEADERS} )
|
||||
qt5_wrap_ui( FORM_FILES_CPP ${QT_UI_FILES} )
|
||||
else()
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${QT_MOC_HEADERS} )
|
||||
qt4_wrap_ui( FORM_FILES_CPP ${QT_UI_FILES} )
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${QT_MOC_HEADERS} )
|
||||
qt5_wrap_ui( FORM_FILES_CPP ${QT_UI_FILES} )
|
||||
|
||||
|
||||
# NOTE! Resources in subfolders must append to QRC_FILES using the following statement
|
||||
@ -322,15 +311,9 @@ set( QRC_FILES
|
||||
)
|
||||
|
||||
# Runs RCC on specified files
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
qt5_add_resources( QRC_FILES_CPP
|
||||
${QRC_FILES}
|
||||
)
|
||||
else()
|
||||
qt4_add_resources( QRC_FILES_CPP
|
||||
${QRC_FILES}
|
||||
)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
qt5_add_resources( QRC_FILES_CPP
|
||||
${QRC_FILES}
|
||||
)
|
||||
|
||||
# Adding resource (RC) files for Windows
|
||||
if ( MSVC )
|
||||
@ -552,29 +535,22 @@ endif()
|
||||
if (MSVC)
|
||||
|
||||
# Qt DLLs
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
message(STATUS "Creating post build step for copying Qt DLLs")
|
||||
message(STATUS "Creating post build step for copying Qt DLLs")
|
||||
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ResInsight POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:ResInsight>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
if (_unityTargetName)
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ResInsight POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:ResInsight>
|
||||
add_custom_command(TARGET ${_unityTargetName} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${_unityTargetName}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
if (_unityTargetName)
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ${_unityTargetName} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${_unityTargetName}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
endif(_unityTargetName)
|
||||
endif(_unityTargetName)
|
||||
|
||||
else()
|
||||
set (QTLIBLIST QtCore QtGui QtGui QtOpenGl QtNetwork QtScript QtScriptTools)
|
||||
foreach (qtlib ${QTLIBLIST})
|
||||
list(APPEND RI_DLL_FILENAMES ${QT_BINARY_DIR}/$<IF:$<CONFIG:Debug>,${qtlib}d4.dll,${qtlib}4.dll>)
|
||||
endforeach( qtlib )
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
# Odb Dlls
|
||||
if (RESINSIGHT_USE_ODB_API)
|
||||
# Find all the dlls
|
||||
@ -688,7 +664,7 @@ if (RESINSIGHT_PRIVATE_INSTALL)
|
||||
|
||||
set (RESINSIGHT_FILES ${RI_DLL_FILENAMES})
|
||||
|
||||
if(RESINSIGHT_BUILD_WITH_QT5 AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
|
||||
if(WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
|
||||
get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION)
|
||||
|
||||
execute_process(
|
||||
|
@ -270,14 +270,7 @@ list(APPEND THIRD_PARTY_LIBRARIES
|
||||
################################################################################
|
||||
# Qt
|
||||
################################################################################
|
||||
option(RESINSIGHT_BUILD_WITH_QT5 "Use Qt5" ON)
|
||||
mark_as_advanced(FORCE RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui OpenGL Network Script ScriptTools Widgets)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl QtNetwork QtScript QtScriptTools REQUIRED)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui OpenGL Network Script ScriptTools Widgets)
|
||||
|
||||
# Open GL
|
||||
find_package( OpenGL )
|
||||
@ -347,13 +340,6 @@ set_property(TARGET
|
||||
PROPERTY FOLDER "Thirdparty"
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
# App and Viz Framework Qt5 setting, propagate settings in RESINSIGHT_BUILD_WITH_QT5
|
||||
################################################################################
|
||||
set(CEE_USE_QT5 ${RESINSIGHT_BUILD_WITH_QT5} CACHE BOOL "Flag used to enable Qt5 in AppFwk and VizFwk" FORCE)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Vizualization Framework
|
||||
################################################################################
|
||||
|
@ -18,15 +18,9 @@ set( MOC_HEADER_FILES
|
||||
cafMessagePanel.h
|
||||
)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
add_library( ${PROJECT_NAME}
|
||||
cafEffectCache.cpp
|
||||
|
@ -15,15 +15,9 @@ set( MOC_HEADER_FILES
|
||||
cafPopupMenuButton.h
|
||||
)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
# NOTE! Resources in this subfolder appends to the variable QRC_FILES in parent scope
|
||||
# CMakeList.txt in the application folder (parent scope) must use the following syntax
|
||||
|
@ -15,15 +15,9 @@ set (MOC_HEADER_FILES
|
||||
)
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
set( PROJECT_FILES
|
||||
|
||||
|
@ -14,15 +14,9 @@ set (MOC_HEADER_FILES
|
||||
)
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
set( PROJECT_FILES
|
||||
|
||||
|
@ -9,15 +9,9 @@ if (CAF_ENABLE_UNITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
add_definitions(-DCVF_USING_CMAKE)
|
||||
|
||||
|
@ -2,17 +2,8 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project ( cafPdmScripting_UnitTests )
|
||||
|
||||
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
|
||||
@ -47,13 +38,4 @@ if (Qt5Core_FOUND)
|
||||
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(Qt5Core_FOUND)
|
@ -9,13 +9,8 @@ if (CAF_ENABLE_UNITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtGui)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
|
||||
set( PROJECT_FILES
|
||||
cafFactory.h
|
||||
|
@ -8,16 +8,8 @@ if (CAF_ENABLE_UNITY_BUILD)
|
||||
set(CMAKE_UNITY_BUILD true)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
option(CEE_USE_QT5 "Use Qt 5 instead of Qt 4" true)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
|
||||
set( PROJECT_FILES
|
||||
|
||||
|
@ -3,17 +3,8 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project ( cafPdmCore_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 Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Gui)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtGui)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets 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
|
||||
@ -62,20 +53,8 @@ target_link_libraries ( ${PROJECT_NAME}
|
||||
)
|
||||
|
||||
# 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)
|
||||
# Copy Qt Dlls
|
||||
else()
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtGui)
|
||||
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)
|
||||
|
@ -17,15 +17,9 @@ set (MOC_HEADER_FILES
|
||||
)
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
include_directories (
|
||||
..
|
||||
|
@ -9,13 +9,8 @@ if (CAF_ENABLE_UNITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Xml)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtXml REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Xml)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
|
||||
include_directories (
|
||||
..
|
||||
|
@ -2,17 +2,8 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project ( cafPdmXml_UnitTests )
|
||||
|
||||
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)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtXml)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Xml)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
|
||||
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
|
||||
@ -54,13 +45,4 @@ if (Qt5Core_FOUND)
|
||||
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(Qt5Core_FOUND)
|
||||
endif(Qt5Core_FOUND)
|
||||
|
@ -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)
|
||||
|
@ -21,21 +21,10 @@ set( QRC_FILES
|
||||
textedit.qrc
|
||||
)
|
||||
|
||||
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 Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt5_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtGui QtMain QtOpenGl)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt4_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt5_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
|
||||
option(USE_COMMAND_FRAMEWORK "Use Caf Command Framework" ON)
|
||||
|
||||
@ -101,23 +90,11 @@ target_link_libraries ( ${PROJECT_NAME}
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
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()
|
||||
# Copy Qt Dlls
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtGui QtOpenGl 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)
|
||||
|
||||
|
||||
# cotire
|
||||
|
@ -55,15 +55,9 @@ set (MOC_HEADER_FILES
|
||||
cafPdmUiLabelEditor.h
|
||||
)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
set( PROJECT_FILES
|
||||
|
||||
|
@ -15,15 +15,9 @@ set( MOC_HEADER_FILES
|
||||
cafViewer.h
|
||||
)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
add_library( ${PROJECT_NAME}
|
||||
cafCadNavigation.cpp
|
||||
|
@ -12,15 +12,9 @@ endif()
|
||||
find_package( OpenGL )
|
||||
|
||||
# Qt
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
|
||||
add_library( ${PROJECT_NAME}
|
||||
cafDisplayCoordTransform.cpp
|
||||
|
@ -17,16 +17,8 @@ endif()
|
||||
|
||||
find_package(OpenGL)
|
||||
|
||||
# Qt
|
||||
option(CEE_USE_QT5 "Use Qt 5 instead of Qt 4" true)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGl REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
|
||||
set(CEE_HEADER_FILES
|
||||
cvfqtBasicAboutDialog.h
|
||||
|
@ -108,21 +108,6 @@ else()
|
||||
SET(OCTAVE_QT_QTCORE_LIB Qt5Core)
|
||||
SET(OCTAVE_QT_QTNETWORK_LIB Qt5Network)
|
||||
|
||||
else()
|
||||
message(STATUS "Compiling Octave plugins using system Qt4 - include path located at ${QT_QMAKE_EXECUTABLE}")
|
||||
|
||||
SET(OCTAVE_QT_QTCORE_INCLUDE_DIR ${QT_QTCORE_INCLUDE_DIR})
|
||||
SET(OCTAVE_QT_QTNETWORK_INCLUDE_DIR ${QT_QTNETWORK_INCLUDE_DIR})
|
||||
SET(OCTAVE_QT_LIBRARY_DIR ${QT_LIBRARY_DIR})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
SET(OCTAVE_QT_QTCORE_LIB QtCore4)
|
||||
SET(OCTAVE_QT_QTNETWORK_LIB QtNetwork4)
|
||||
else()
|
||||
SET(OCTAVE_QT_QTCORE_LIB QtCore)
|
||||
SET(OCTAVE_QT_QTNETWORK_LIB QtNetwork)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
endif(RESINSIGHT_OCTAVE_PLUGIN_QT)
|
||||
|
9
ThirdParty/expressionparser/CMakeLists.txt
vendored
9
ThirdParty/expressionparser/CMakeLists.txt
vendored
@ -8,13 +8,8 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core)
|
||||
set(QT_LIBRARIES Qt5::Core)
|
||||
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
ExpressionParser.h
|
||||
|
12
ThirdParty/nightcharts/CMakeLists.txt
vendored
12
ThirdParty/nightcharts/CMakeLists.txt
vendored
@ -2,15 +2,9 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (nightcharts)
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtWidgets)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Widgets)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
||||
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
nightcharts.h
|
||||
|
Loading…
Reference in New Issue
Block a user