forked from OpendTect/OpendTect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
153 lines (123 loc) · 4.27 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
#_______________________Pmake__________________________________________________
#
# CopyRight: dGB Beheer B.V.
# Jan 2012 K. Tingdahl
#_______________________________________________________________________________
cmake_minimum_required ( VERSION 3.14.7 )
set( MAIN_GIT_BRANCH main )
set( OpendTect_VERSION_MAJOR 6 )
set( OpendTect_VERSION_MINOR 8 )
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 ( POLICY CMP0048 )
cmake_policy( SET CMP0048 NEW )
endif()
if ( POLICY CMP0091 )
cmake_policy( SET CMP0091 NEW )
endif()
project( "OpendTect"
VERSION ${OpendTect_VERSION_MAJOR}.${OpendTect_VERSION_MINOR}.${OpendTect_VERSION_PATCH}
DESCRIPTION "OpendTect" )
if ( POLICY CMP0011 )
cmake_policy( SET CMP0011 NEW )
endif()
if( APPLE )
if ( POLICY CMP0042 )
cmake_policy( SET CMP0042 OLD )
endif()
endif()
if ( POLICY CMP0057 )
cmake_policy( SET CMP0057 NEW )
endif()
if ( POLICY CMP0074 )
cmake_policy( SET CMP0074 NEW)
endif()
if ( POLICY CMP0110 )
cmake_policy( SET CMP0110 NEW)
endif()
include( CTest )
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
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_QT "Turn off all QT" OFF )
option ( OD_NO_OSG "Do not build anything with 3D visualisation" OFF )
option ( OD_ENABLE_BREAKPAD "Use breakpad" OFF )
include( OD_SetupOD )
# Note: the order of these modules *IS* important!
# Make sure dependent modules are *after* the ones that they depend upon.
set( OD_MODULES
Basic CRS 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 )
list( APPEND OD_MODULES
visBase visSurvey uiOSG uiVis
uiODMain
)
endif()
set( OD_SPECPROGS ODSeis ODvisBase uiBase )
OD_SETUP_EXTERNALS()
OD_ADD_EXTERNALS() # Once, in main scope
OD_ADD_MODULES( src ${OD_MODULES} )
include( plugins/CMakeLists.txt )
OD_ADD_MODULES( spec ${OD_SPECPROGS} )
OD_CREATE_PACKAGE_DEFINITION()
include( ODInternal )
OD_WRITE_MODDEPS( ${OD_BINARY_BASEDIR}/data )
OD_WRITE_FINDFILE()
OD_WRITE_TEST_PROJECT_DESC( ${OD_BINARY_BASEDIR}/test )
OD_ADD_PACKAGES_TARGET()
if ( WIN32 )
OD_ADD_SIGNLIBRARIES_TARGET()
endif()
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()
if ( OD_BINARY_DEBUG_BASEDIR AND NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
set( OD_BINARY_DEBUG_BASEDIR "${OD_BINARY_DEBUG_BASEDIR}" CACHE PATH "Binary
project in Debug mode" INTERNAL )
endif()
#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} )