mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2536 Build System AppFwk : Several updates
Simplified automoc Use target_include_directories and target_link_libraries Use CMake 2.8.12
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (CommonCode)
|
project (CommonCode)
|
||||||
|
|
||||||
@@ -15,8 +15,6 @@ include_directories(
|
|||||||
${LibGuiQt_SOURCE_DIR}
|
${LibGuiQt_SOURCE_DIR}
|
||||||
${LibRender_SOURCE_DIR}
|
${LibRender_SOURCE_DIR}
|
||||||
${LibViewing_SOURCE_DIR}
|
${LibViewing_SOURCE_DIR}
|
||||||
|
|
||||||
${cafPdmCore_SOURCE_DIR}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# These headers need to go through Qt's MOC compiler
|
# These headers need to go through Qt's MOC compiler
|
||||||
@@ -54,3 +52,22 @@ add_library( ${PROJECT_NAME}
|
|||||||
|
|
||||||
${MOC_FILES_CPP}
|
${MOC_FILES_CPP}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries ( ${PROJECT_NAME}
|
||||||
|
LibCore
|
||||||
|
LibGeometry
|
||||||
|
LibViewing
|
||||||
|
LibRender
|
||||||
|
LibGuiQt
|
||||||
|
|
||||||
|
cafPdmCore
|
||||||
|
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafAnimControl)
|
project (cafAnimControl)
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ set( QOBJECT_HEADERS
|
|||||||
cafAnimationToolBar.h
|
cafAnimationToolBar.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) )
|
if ( NOT CMAKE_AUTOMOC )
|
||||||
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -30,8 +30,21 @@ set( QRC_FILES
|
|||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library( ${PROJECT_NAME}
|
set( PROJECT_FILES
|
||||||
|
cafFrameAnimationControl.h
|
||||||
cafFrameAnimationControl.cpp
|
cafFrameAnimationControl.cpp
|
||||||
|
cafAnimationToolBar.h
|
||||||
cafAnimationToolBar.cpp
|
cafAnimationToolBar.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library( ${PROJECT_NAME}
|
||||||
|
${PROJECT_FILES}
|
||||||
${MOC_FILES_CPP}
|
${MOC_FILES_CPP}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
# Qt
|
# Qt
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
||||||
@@ -13,7 +13,7 @@ set( QOBJECT_HEADERS
|
|||||||
cafCmdFeatureManager.h
|
cafCmdFeatureManager.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) )
|
if ( NOT CMAKE_AUTOMOC )
|
||||||
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -70,5 +70,4 @@ target_link_libraries ( ${PROJECT_NAME}
|
|||||||
cafProjectDataModel
|
cafProjectDataModel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafPdmCvf)
|
project (cafPdmCvf)
|
||||||
|
|
||||||
@@ -8,14 +8,8 @@ include (${QT_USE_FILE})
|
|||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${LibCore_SOURCE_DIR}
|
${LibCore_SOURCE_DIR}
|
||||||
${cafProjectDataModel_SOURCE_DIR}
|
|
||||||
${cafUserInterface_SOURCE_DIR}
|
|
||||||
|
|
||||||
${cafPdmCore_SOURCE_DIR}
|
|
||||||
${cafPdmUiCore_SOURCE_DIR}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_library( ${PROJECT_NAME}
|
add_library( ${PROJECT_NAME}
|
||||||
cafPdmCoreColor3f.h
|
cafPdmCoreColor3f.h
|
||||||
cafPdmUiCoreColor3f.cpp
|
cafPdmUiCoreColor3f.cpp
|
||||||
@@ -39,11 +33,15 @@ add_library( ${PROJECT_NAME}
|
|||||||
cafPdmFieldCvfMat4d.h
|
cafPdmFieldCvfMat4d.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries ( ${PROJECT_NAME}
|
target_link_libraries ( ${PROJECT_NAME}
|
||||||
cafPdmCore
|
|
||||||
cafPdmUiCore
|
|
||||||
cafUserInterface
|
cafUserInterface
|
||||||
cafProjectDataModel
|
|
||||||
LibCore
|
LibCore
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ target_include_directories(${PROJECT_NAME}
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafPdmCore)
|
project (cafPdmCore)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui )
|
find_package ( Qt4 COMPONENTS QtCore QtGui )
|
||||||
include (${QT_USE_FILE})
|
include (${QT_USE_FILE})
|
||||||
|
|||||||
@@ -53,4 +53,4 @@ target_include_directories(${PROJECT_NAME}
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
find_package ( Qt4 COMPONENTS QtCore )
|
find_package ( Qt4 COMPONENTS QtCore )
|
||||||
include (${QT_USE_FILE})
|
include (${QT_USE_FILE})
|
||||||
@@ -26,6 +26,8 @@ target_link_libraries ( ${PROJECT_NAME}
|
|||||||
${THREAD_LIBRARY}
|
${THREAD_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|
||||||
# Copy Qt Dlls
|
# Copy Qt Dlls
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set (QTLIBLIST QtCore )
|
set (QTLIBLIST QtCore )
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui )
|
find_package ( Qt4 COMPONENTS QtCore QtGui )
|
||||||
include (${QT_USE_FILE})
|
include (${QT_USE_FILE})
|
||||||
@@ -12,10 +12,9 @@ include_directories (
|
|||||||
set( PROJECT_FILES
|
set( PROJECT_FILES
|
||||||
cafPdmBasicTest.cpp
|
cafPdmBasicTest.cpp
|
||||||
cafProjectDataModel_UnitTests.cpp
|
cafProjectDataModel_UnitTests.cpp
|
||||||
Child.cpp
|
Child.cpp
|
||||||
Parent.cpp
|
Parent.cpp
|
||||||
TestObj.cpp
|
TestObj.cpp
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# add the executable
|
# add the executable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafTensor)
|
project (cafTensor)
|
||||||
|
|
||||||
@@ -17,6 +17,11 @@ add_library( ${PROJECT_NAME}
|
|||||||
${PROJECT_FILES}
|
${PROJECT_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries( ${PROJECT_NAME} LibCore )
|
target_link_libraries( ${PROJECT_NAME} LibCore )
|
||||||
|
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
# Qt
|
# Qt
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl )
|
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl )
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
# Qt
|
# Qt
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
||||||
@@ -42,7 +42,7 @@ set( QOBJECT_HEADERS
|
|||||||
cafPdmUiDoubleValueEditor.h
|
cafPdmUiDoubleValueEditor.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) )
|
if ( NOT CMAKE_AUTOMOC )
|
||||||
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
||||||
include (${QT_USE_FILE})
|
include (${QT_USE_FILE})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafViewer)
|
project (cafViewer)
|
||||||
|
|
||||||
@@ -12,8 +12,6 @@ include_directories(
|
|||||||
${LibViewing_SOURCE_DIR}
|
${LibViewing_SOURCE_DIR}
|
||||||
${LibRender_SOURCE_DIR}
|
${LibRender_SOURCE_DIR}
|
||||||
${LibGuiQt_SOURCE_DIR}
|
${LibGuiQt_SOURCE_DIR}
|
||||||
|
|
||||||
${cafAnimControl_SOURCE_DIR}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# These headers need to go through Qt's MOC compiler
|
# These headers need to go through Qt's MOC compiler
|
||||||
@@ -21,7 +19,7 @@ set( QOBJECT_HEADERS
|
|||||||
cafViewer.h
|
cafViewer.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) )
|
if ( NOT CMAKE_AUTOMOC )
|
||||||
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -44,3 +42,19 @@ add_library( ${PROJECT_NAME}
|
|||||||
|
|
||||||
${MOC_FILES_CPP}
|
${MOC_FILES_CPP}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries ( ${PROJECT_NAME}
|
||||||
|
LibCore
|
||||||
|
LibGeometry
|
||||||
|
LibViewing
|
||||||
|
LibRender
|
||||||
|
LibGuiQt
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
project (cafVizExtensions)
|
project (cafVizExtensions)
|
||||||
|
|
||||||
@@ -36,3 +36,22 @@ add_library( ${PROJECT_NAME}
|
|||||||
cafHexGridIntersectionTools/cafHexGridIntersectionTools.h
|
cafHexGridIntersectionTools/cafHexGridIntersectionTools.h
|
||||||
cafHexGridIntersectionTools/cafHexGridIntersectionTools.cpp
|
cafHexGridIntersectionTools/cafHexGridIntersectionTools.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries ( ${PROJECT_NAME}
|
||||||
|
LibCore
|
||||||
|
LibGeometry
|
||||||
|
LibViewing
|
||||||
|
LibRender
|
||||||
|
LibGuiQt
|
||||||
|
|
||||||
|
CommonCode
|
||||||
|
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
Reference in New Issue
Block a user