From 233df05f68d24172d5858fcf996116e58db39c27 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 27 Feb 2018 20:00:56 +0100 Subject: [PATCH] #2536 Build System : Remove obsolete includes and update depending includes --- ApplicationCode/CMakeLists.txt | 27 +++---------------- .../GeoMech/GeoMechDataModel/CMakeLists.txt | 12 ++++++++- .../GeoMech/OdbReader/CMakeLists.txt | 1 - .../UserInterface/RiuNightchartsWidget.h | 2 +- .../WellPathImportSsihub/CMakeLists.txt | 2 +- CMakeLists.txt | 2 +- Fwk/AppFwk/cafViewer/CMakeLists.txt | 3 +++ Fwk/AppFwk/cafVizExtensions/CMakeLists.txt | 1 - .../NRLib/well_UnitTests/CMakeLists.txt | 2 -- .../custom-opm-flowdiag-app/CMakeLists.txt | 5 ++++ .../custom-opm-flowdiagnostics/CMakeLists.txt | 5 ++++ 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index ade87f19a1..1709c2705f 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 2.8.12) project (ApplicationCode) @@ -15,29 +15,10 @@ if (MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11)) endif() include_directories( - ${cafPdmCore_SOURCE_DIR} - ${cafPdmUiCore_SOURCE_DIR} - ${cafPdmXml_SOURCE_DIR} - ${cafProjectDataModel_SOURCE_DIR} - - ${cafCommand_SOURCE_DIR} - ${cafViewer_SOURCE_DIR} - ${cafAnimControl_SOURCE_DIR} - ${cafUserInterface_SOURCE_DIR} - ${cafPdmCvf_SOURCE_DIR} - ${CommonCode_SOURCE_DIR} - ${cafVizExtensions_SOURCE_DIR} - ${cafTensor_SOURCE_DIR} - - ${ResInsight_SOURCE_DIR}/ThirdParty - ${ResInsight_SOURCE_DIR}/ThirdParty/NRLib/nrlib/well - ${ResInsight_SOURCE_DIR}/ThirdParty/Qwt/src - - ${boost-Subset_SOURCE_DIR} - ${custom-opm-flowdiagnostics_SOURCE_DIR}/opm-flowdiagnostics/ - ${custom-opm-flowdiag-app_SOURCE_DIR}/opm-flowdiagnostics-applications/ - ${custom-opm-flowdiag-app_SOURCE_DIR}/opmCore + # required for compilation of gtest, should be refactored + ${ResInsight_SOURCE_DIR}/ThirdParty + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Adm ${CMAKE_CURRENT_SOURCE_DIR}/Application diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index 84ac9d44ee..c42c903c13 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -40,6 +40,16 @@ target_include_directories(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} ) -target_link_libraries( ${PROJECT_NAME} LibCore cafTensor ResultStatisticsCache RifOdbReader) +target_link_libraries( ${PROJECT_NAME} + LibCore + + cafPdmCvf + cafTensor + cafUserInterface + CommonCode + + ResultStatisticsCache + RifOdbReader +) source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt index 8537fa1696..b6c1af5f96 100644 --- a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt +++ b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt @@ -36,7 +36,6 @@ endif(MSVC) include_directories( ${RESINSIGHT_ODB_API_DIR}/include - ${RigGeoMechDataModel_SOURCE_DIR} ${LibCore_SOURCE_DIR} ) diff --git a/ApplicationCode/UserInterface/RiuNightchartsWidget.h b/ApplicationCode/UserInterface/RiuNightchartsWidget.h index 777b112d96..0a0ba6df5a 100644 --- a/ApplicationCode/UserInterface/RiuNightchartsWidget.h +++ b/ApplicationCode/UserInterface/RiuNightchartsWidget.h @@ -19,7 +19,7 @@ #pragma once -#include "nightcharts/nightcharts.h" +#include "nightcharts.h" #include "cafPdmPointer.h" diff --git a/ApplicationCode/WellPathImportSsihub/CMakeLists.txt b/ApplicationCode/WellPathImportSsihub/CMakeLists.txt index fd34856a6f..acaa843178 100644 --- a/ApplicationCode/WellPathImportSsihub/CMakeLists.txt +++ b/ApplicationCode/WellPathImportSsihub/CMakeLists.txt @@ -43,7 +43,7 @@ add_library( ${PROJECT_NAME} ) target_link_libraries ( ${PROJECT_NAME} - cafUserInterface + cafUserInterface cafPdmCvf CommonCode ) source_group("" FILES ${PROJECT_FILES}) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1df8eeada..fe0a25768a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 2.8.12) include (CheckCSourceCompiles) project (ResInsight) diff --git a/Fwk/AppFwk/cafViewer/CMakeLists.txt b/Fwk/AppFwk/cafViewer/CMakeLists.txt index 20f87a547f..0a4e14227d 100644 --- a/Fwk/AppFwk/cafViewer/CMakeLists.txt +++ b/Fwk/AppFwk/cafViewer/CMakeLists.txt @@ -54,6 +54,9 @@ target_link_libraries ( ${PROJECT_NAME} LibViewing LibRender LibGuiQt + + cafAnimControl + ${QT_LIBRARIES} ) diff --git a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt index be8d96a763..11a4548332 100644 --- a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt +++ b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt @@ -11,7 +11,6 @@ include_directories( ${LibGuiQt_SOURCE_DIR} ${LibRender_SOURCE_DIR} ${LibViewing_SOURCE_DIR} - ${CommonCode_SOURCE_DIR} ) add_library( ${PROJECT_NAME} diff --git a/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt b/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt index 7b63af94da..7938ccdb9a 100644 --- a/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt +++ b/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt @@ -4,8 +4,6 @@ project ( well_UnitTests ) include_directories ( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. ) diff --git a/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt b/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt index d04bfd3989..c37bd33e02 100644 --- a/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt +++ b/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt @@ -33,3 +33,8 @@ target_link_libraries(custom-opm-flowdiag-app if (MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4190 /wd4267") endif() + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/opm-flowdiagnostics-applications +) diff --git a/ThirdParty/custom-opm-flowdiagnostics/CMakeLists.txt b/ThirdParty/custom-opm-flowdiagnostics/CMakeLists.txt index 3e072c7c1e..447ed4e265 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/CMakeLists.txt +++ b/ThirdParty/custom-opm-flowdiagnostics/CMakeLists.txt @@ -24,3 +24,8 @@ add_library(${PROJECT_NAME} if (MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4267") endif() + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/opm-flowdiagnostics +)