Blame view

CMakeLists.txt 2.09 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
23
24
25
26
27
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")

find_package( Threads REQUIRED )
find_package( CRYPT REQUIRED )
find_package( NetCDF REQUIRED )
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
28
find_package( CDF REQUIRED )
4243d674   Benjamin Renard   First commit
29

3c7c7fa7   Benjamin Renard   Set library path ...
30
31
32
33
34
35
36
37
get_filename_component(NETCDFLIB_DIR ${NETCDFLIBRARIES} PATH)

configure_file (
 "${CMAKE_SOURCE_DIR}/scripts/StartServer.in"
 "${CMAKE_SOURCE_DIR}/scripts/StartServer"
)

MESSAGE( STATUS "Build DD_Server Project" )
4243d674   Benjamin Renard   First commit
38
39
add_subdirectory(src/CLIENT)
add_subdirectory(src/SERVER)
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
40
41
42
43
44
45
46
47
add_subdirectory(src/DECODERS/ascii2nc)
add_subdirectory(src/DECODERS/cdf2nc)
add_subdirectory(src/DECODERS/nc2nc)
add_subdirectory(src/DECODERS/themis/esa2nc)
add_subdirectory(src/DECODERS/themis/esafull2nc)
add_subdirectory(src/DECODERS/themis/esamom2nc)
add_subdirectory(src/DECODERS/themis/fgm2nc)
add_subdirectory(src/DECODERS/themis/sst2nc)
4b95fb97   Benjamin Renard   Add TimesUpdate &...
48
49
add_subdirectory(src/TIMESUPDATE)
add_subdirectory(src/TIMESUPDATENODATA)
86f177cf   Benjamin Renard   Lock system imple...
50
add_subdirectory(tests)
4243d674   Benjamin Renard   First commit
51
52
53

install(FILES "scripts/StartServer" DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY "src/INCLUDE/" DESTINATION include)
bd9dfce2   Benjamin Renard   Add CALLEXT and D...
54
install(DIRECTORY "src/CALLEXT/" DESTINATION bin/CALLEXT)
4243d674   Benjamin Renard   First commit
55
56

SET(CMAKE_VERBOSE_MAKEFILE ON)