Blame view

CMakeLists.txt 3.78 KB
4243d674   Benjamin Renard   First commit
1
2
3
4
cmake_minimum_required(VERSION 2.6)

PROJECT(DDServer)

7c416dd4   Benjamin Renard   Fix some bugs wit...
5
add_definitions( -DLINUX )
4243d674   Benjamin Renard   First commit
6
7
8
9
10
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/)
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/)

if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
  #64 bits
7c416dd4   Benjamin Renard   Fix some bugs wit...
11
  MESSAGE( STATUS "64 bits" )
4243d674   Benjamin Renard   First commit
12
13
  set(CMAKE_C_FLAGS_DEBUG "-ggdb -DLINUX -Dlinux -m64 -march=core2 -fPIC -D_REENTRANT -pthread")
  set(CMAKE_C_FLAGS_RELEASE "-DLINUX -Dlinux -m64 -march=core2 -fPIC -D_REENTRANT -pthread")
3c7c7fa7   Benjamin Renard   Set library path ...
14
  set(USRLIB_DIR "/usr/lib64/:/usr/local/lib64/")
4243d674   Benjamin Renard   First commit
15
16
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
  #32 bits
7c416dd4   Benjamin Renard   Fix some bugs wit...
17
  MESSAGE( STATUS "32 bits" )
4243d674   Benjamin Renard   First commit
18
19
  set(CMAKE_C_FLAGS_DEBUG "-ggdb -DLINUX -march=i686 -fPIC -Dlinux -D_REENTRANT -malign-double -pthread")
  set(CMAKE_C_FLAGS_DEBUG "-DLINUX -march=i686 -fPIC -Dlinux -D_REENTRANT -malign-double -pthread")
3c7c7fa7   Benjamin Renard   Set library path ...
20
  set(USRLIB_DIR "/usr/lib/:/usr/local/lib/")
4243d674   Benjamin Renard   First commit
21
22
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )

4cedf03b   Benjamin Renard   Update script use...
23
24
25
26
27
28
set (USERLOCAL_ROOT "/usr/local/lib/")
if (EXISTS "$ENV{USERLOCAL_ROOT}")
    set(USERLOCAL_ROOT "$ENV{USERLOCAL_ROOT}")
    message("USERLOCAL_ROOT forced to ${USERLOCAL_ROOT}")
endif()

4243d674   Benjamin Renard   First commit
29
30
31
32
33
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")

find_package( Threads REQUIRED )
find_package( CRYPT REQUIRED )
find_package( NetCDF REQUIRED )
bab9407b   Benjamin Renard   DDClient is now a...
34
find_package( DDClient REQUIRED )
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
35
find_package( CDF REQUIRED )
531fafe7   Benjamin Renard   Install AddLocalV...
36
find_package( LibXML2 REQUIRED ) 
4243d674   Benjamin Renard   First commit
37

3c7c7fa7   Benjamin Renard   Set library path ...
38
get_filename_component(NETCDFLIB_DIR ${NETCDFLIBRARIES} PATH)
bab9407b   Benjamin Renard   DDClient is now a...
39
get_filename_component(DDCLIENTLIB_DIR ${DDCLIENTLIBRARIES} PATH)
5f5e337d   Benjamin Renard   First step to rem...
40
41
set(DDSERVICE_URL $ENV{DDSERVICE_URL})
set(DDRESPATH $ENV{DDRESPATH})
e01f0872   Benjamin Renard   Automatic user re...
42
set(DDBASEPATH "$ENV{DDBASEPATH}")
4cedf03b   Benjamin Renard   Update script use...
43
44
set(DDBASEDATA "$ENV{DDBASEPATH}/DATA")
set(DDBASEINFO "$ENV{DDBASEPATH}/INFO")
e01f0872   Benjamin Renard   Automatic user re...
45
set(USERMANAGER "$ENV{INSTALL_DIR}/bin/USERMANAGER")
d1327dc0   Benjamin Renard   Fix RemoteData ac...
46
47
48
49
50
51
52
set(PROXY_HOST $ENV{PROXY_HOST})
set(PROXY_USERPWD $ENV{PROXY_USERPWD})

configure_file (
 "${CMAKE_SOURCE_DIR}/scripts/DDServer.env.in"
 "${CMAKE_SOURCE_DIR}/scripts/DDServer.env"
)
5f5e337d   Benjamin Renard   First step to rem...
53
54
55
56
57
58
59
60
61
62
63

configure_file (
 "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/DDserverWeb_ini.php.in"
 "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/DDserverWeb_ini.php"
)

configure_file (
 "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/dd.wsdl.in"
 "${CMAKE_SOURCE_DIR}/src/DDSERVICES/SOAP/dd.wsdl"
)

3c7c7fa7   Benjamin Renard   Set library path ...
64
MESSAGE( STATUS "Build DD_Server Project" )
4243d674   Benjamin Renard   First commit
65
add_subdirectory(src/SERVER)
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
66
add_subdirectory(src/DECODERS/ascii2nc)
e3583186   Benjamin Renard   Remove cdf2nc fro...
67
#add_subdirectory(src/DECODERS/cdf2nc)
893d690d   Elena.Budnik   cdfnew2nc
68
add_subdirectory(src/DECODERS/cdfnew2nc)
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
69
add_subdirectory(src/DECODERS/nc2nc)
7d7445ea   Elena.Budnik   THEMIS remote center
70
add_subdirectory(src/DECODERS/themis)
0ec21281   Elena.Budnik   reorganization + ...
71
add_subdirectory(src/DATA/TOOLS)
05fbcab0   Elena.Budnik   DDServices reorga...
72
add_subdirectory(src/DDSERVICES/TOOLS)
cb4b7775   Elena.Budnik   USERMANAGER TOOLS
73
add_subdirectory(src/DDADMIN/TOOLS)
86f177cf   Benjamin Renard   Lock system imple...
74
add_subdirectory(tests)
4243d674   Benjamin Renard   First commit
75
76

install(FILES "scripts/StartServer" DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
531fafe7   Benjamin Renard   Install AddLocalV...
77
install(FILES "scripts/DDServer.env" DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
cb4b7775   Elena.Budnik   USERMANAGER TOOLS
78
79
file(GLOB scripts "scripts/*.sh")
install(FILES ${scripts} DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
162f5e88   Elena.Budnik   immediate VI lock
80

bd9dfce2   Benjamin Renard   Add CALLEXT and D...
81
install(DIRECTORY "src/CALLEXT/" DESTINATION bin/CALLEXT)
531fafe7   Benjamin Renard   Install AddLocalV...
82
install(DIRECTORY "src/DATA/MANAGER/" DESTINATION bin/DATAMANAGER)
162f5e88   Elena.Budnik   immediate VI lock
83
install(DIRECTORY "src/DATA/TEMPLATES/" DESTINATION bin)
0ec21281   Elena.Budnik   reorganization + ...
84
install(DIRECTORY "src/REMOTEDATA/" DESTINATION bin/REMOTEDATA)
cb4b7775   Elena.Budnik   USERMANAGER TOOLS
85
install(DIRECTORY "src/DDADMIN/MANAGER/" DESTINATION bin/USERMANAGER)
05fbcab0   Elena.Budnik   DDServices reorga...
86
87
install(DIRECTORY "src/DDSERVICES/SOAP/" DESTINATION DDService)
install(DIRECTORY "src/DDSERVICES/REST/" DESTINATION DDService)
4243d674   Benjamin Renard   First commit
88

e3583186   Benjamin Renard   Remove cdf2nc fro...
89
#install(FILES "src/DECODERS/cdf2nc/cdf_to_netcdf_mapping.dat" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE  GROUP_READ  WORLD_READ) 
9af6e03a   Elena.Budnik   config info separ...
90
91
92

file(GLOB config_files "info/REMOTEDATA/*.xml")
install(FILES ${config_files} DESTINATION ${DDBASEINFO} PERMISSIONS OWNER_READ OWNER_WRITE  GROUP_READ WORLD_READ)
e3e17497   Benjamin Renard   Some fix around r...
93

4243d674   Benjamin Renard   First commit
94
SET(CMAKE_VERBOSE_MAKEFILE ON)