mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
#3754 Qt4/Qt5 CMake build configuration for Nightcharts and ExpressionParser
This commit is contained in:
parent
cc672eb31b
commit
83c5f63291
14
ThirdParty/expressionparser/CMakeLists.txt
vendored
14
ThirdParty/expressionparser/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (expressionparser)
|
||||
|
||||
@ -7,6 +7,14 @@ if(MSVC)
|
||||
message(STATUS "MSVC: Enabled increased number of sections in object files")
|
||||
endif()
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
ExpressionParser.h
|
||||
ExpressionParser.cpp
|
||||
@ -28,4 +36,8 @@ if(MSVC)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||
endif()
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
12
ThirdParty/nightcharts/CMakeLists.txt
vendored
12
ThirdParty/nightcharts/CMakeLists.txt
vendored
@ -2,6 +2,14 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (nightcharts)
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Widgets)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
nightcharts.h
|
||||
nightcharts.cpp
|
||||
@ -19,4 +27,8 @@ target_include_directories(${PROJECT_NAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Widgets)
|
||||
endif()
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
Loading…
Reference in New Issue
Block a user