forked from OpendTect/OpendTect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
168 lines (136 loc) · 4.08 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#_______________________Pmake__________________________________________________
#
# CopyRight: dGB Beheer B.V.
# Jan 2012 K. Tingdahl
# SVN: $Id$
#_______________________________________________________________________________
cmake_minimum_required ( VERSION 2.8.11 )
set( MAIN_GIT_BRANCH master )
set( OpendTect_VERSION_MAJOR 6 )
set( OpendTect_VERSION_MINOR 7 )
if ( NOT DEFINED OpendTect_VERSION_PATCH OR OpendTect_VERSION_PATCH STREQUAL "" )
set( OpendTect_VERSION_PATCH 0 )
endif()
if ( NOT DEFINED OpendTect_FULL_VERSION )
set( OpendTect_FULL_VERSION
${OpendTect_VERSION_MAJOR}.${OpendTect_VERSION_MINOR}.${OpendTect_VERSION_PATCH} )
endif()
if ( CMAKE_VERSION VERSION_LESS 3.0.0 )
project( "OpendTect" )
else()
cmake_policy( SET CMP0042 OLD )
cmake_policy( SET CMP0048 NEW )
project( "OpendTect" VERSION ${OpendTect_VERSION_MAJOR}.${OpendTect_VERSION_MINOR}.${OpendTect_VERSION_PATCH} )
endif()
if( POLICY CMP0074 )
cmake_policy(SET CMP0074 NEW)
endif()
include( CTest )
set( OpendTect_DIR ${CMAKE_SOURCE_DIR} )
set( OD_BINARY_BASEDIR ${CMAKE_BINARY_DIR} )
if( NOT DEFINED CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Release or Debug" )
endif()
list( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules" )
set( OD_SUBSYSTEM "od" )
option ( OD_NO_OSG "Do not build anything with 3D visualisation" OFF )
include( OD_SetupOD )
if ( NOT OD_NO_OSG )
OD_ADD_OSGGEO()
endif()
# Note: the order of these modules *IS* important!
# Make sure dependent modules are *after* the ones that they depend upon.
set( OD_MODULES
Basic Algo General
Strat Network Batch
Geometry EarthModel Well MMProc Seis
NLA AttributeEngine Velocity
VolumeProcessing PreStackProcessing Attributes
MPEEngine EMAttrib WellAttrib
uiBase uiTools uiCmdDriver uiFlatView uiIo uiSysAdm
uiNLA uiSeis uiStrat uiEarthModel uiWell
uiVelocity uiPreStackProcessing uiAttributes
uiVolumeProcessing uiEMAttrib uiMPE uiViewer2D uiWellAttrib
)
if ( NOT OD_NO_OSG )
set( OD_MODULES ${OD_MODULES}
visBase visSurvey uiOSG uiVis
uiODMain
)
endif()
set( OD_PLUGINS
CEEMDAttrib
CRS
ExpAttribs
GLCM
GMT
ODHDF5
Hello
Madagascar
MadagascarAttribs
MATLABLink
Tut
VoxelConnectivityFilter
uiCEEMDAttrib
uiCRS
uiDPSDemo
uiExpAttribs
uiGLCM
uiGMT
uiGoogleIO
uiODHDF5
uiHello
uiImpGPR
uiMadagascar
uiMadagascarAttribs
uiMATLABLink
uiMMPTest
uiPresentationMaker
uiQtApp
uiSEGY
uiTut
uiTutMadagascar
uiVoxelConnectivityFilter
CmdDriver
)
if ( NOT OD_NO_OSG )
set( OD_PLUGINS ${OD_PLUGINS} uiPreStackViewer )
endif()
set( OD_SPECPROGS ODSeis visBase )
OD_CREATE_DEVEL_PACKAGE_DEFINITION()
OD_ADD_MODULES( src ${OD_MODULES} )
OD_ADD_MODULES( plugins ${OD_PLUGINS} )
OD_ADD_MODULES( spec ${OD_SPECPROGS} )
include( ODInternal )
OD_WRITE_MODDEPS( ${OD_BINARY_BASEDIR}/data )
OD_WRITE_FINDFILE()
OD_WRITE_TEST_PROJECT_DESC( ${OD_BINARY_BASEDIR}/test )
set( PLUGIN_DIR "" CACHE PATH "Path to eventual extra plugins" )
if ( EXISTS ${PLUGIN_DIR}/CMakeLists.txt )
include ( ${PLUGIN_DIR}/CMakeLists.txt )
endif()
if ( DEFINED ${MISC_INSTALL_PREFIX} )
OD_WRITE_ALOFILES( ${MISC_INSTALL_PREFIX}/plugins/${OD_PLFSUBDIR} )
else()
OD_WRITE_ALOFILES( ${CMAKE_BINARY_DIR}/plugins/${OD_PLFSUBDIR} )
endif()
#OD_ADD_KEYWORD_TEST( strcmp strcmp )
OD_ADD_KEYWORD_TEST( "sqrt(" sqrt "Use Math::Sqrt() instead of sqrt" )
OD_ADD_KEYWORD_TEST( "atan2(" atan2 "Use Math::Atan2() instead of atan2" )
OD_ADD_REGEXP_TEST( "ArrPtrMan[^;]+=[^?;]*new\\\\\\\\s+" mAllocLargeVarLenArr
"ArrPtrMan<Type> var = new is not allowed. Use mAllocLargeVarLenArr instead." )
OD_ADD_LINEEND_TEST()
OD_ADD_EXIT_PROGRAM_TEST()
OD_ADD_LINT_TEST()
if ( UNIX )
add_test( "PNGCompression" ${CMAKE_SOURCE_DIR}/dtect/FindCompactablePNGs.csh )
endif()
SETUP_QT_TRANSLATION( od )
OD_SETUP_TEST_FILTER()
if( BUILD_DOCUMENTATION )
OD_BUILD_DOCUMENTATION()
endif()
OD_ADD_PACKAGES_TARGET()
#Avoid warnings if specified on command line
set ( DUMMY ${ISTAG} ${BRANCH} ${CMAKE_PDB_OUTPUT_DIRECTORY} ${OD_RUN_LMSTRIP}
${COINDIR} ${BUILD_dGBPDF3D} ${PDF3D_ROOT} ${HDF5_ROOT} )