Commit b1aa926a436558092ae17757d48b335432659c6f

Authored by Benjamin Renard
1 parent 48cc7d7a

Add extern "c"

Add new dierctory where to find CDF library
Fix error in executable name for themis decoders
cmake/modules/FindCDF.cmake
... ... @@ -5,8 +5,8 @@
5 5 # libcdf_INCLUDE_DIR - the libcdf include directory
6 6 # libcdf_LIBRARIES - the libcdf library directory
7 7  
8   -FIND_PATH(libcdf_INCLUDE_DIR cdf.h PATHS /include /usr/include /usr/local/include ${USERLOCAL_ROOT}/include)
9   -FIND_LIBRARY(libcdf_LIBRARIES NAMES cdf PATHS /lib /usr/lib /usr/local/lib ${USERLOCAL_ROOT}/lib )
  8 +FIND_PATH(libcdf_INCLUDE_DIR cdf.h PATHS /include /usr/include /usr/local/include /usr/local/cdf/include ${USERLOCAL_ROOT}/include)
  9 +FIND_LIBRARY(libcdf_LIBRARIES NAMES cdf PATHS /lib /usr/lib /usr/local/lib /usr/local/cdf/lib ${USERLOCAL_ROOT}/lib )
10 10  
11 11 # set FOUND flag
12 12 IF(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES)
... ...
src/DECODERS/themis/esa2nc/CMakeLists.txt
1 1  
2   -PROJECT(esa2nc)
  2 +PROJECT(themis_esa2nc)
3 3  
4 4 include_directories(
5 5 ${CMAKE_HOME_DIRECTORY}/src/INCLUDE/
... ... @@ -14,13 +14,13 @@ file(
14 14 ./*
15 15 )
16 16  
17   -ADD_EXECUTABLE (esa2nc ${source_files} )
  17 +ADD_EXECUTABLE (themis_esa2nc ${source_files} )
18 18  
19 19 target_link_libraries(
20   - esa2nc
  20 + themis_esa2nc
21 21 DD_Client
22 22 ${NETCDFLIBRARY}
23 23 ${libcdf_LIBRARIES}
24 24 )
25 25  
26   -install (TARGETS esa2nc DESTINATION bin)
  26 +install (TARGETS themis_esa2nc DESTINATION bin)
... ...
src/DECODERS/themis/esafull2nc/CMakeLists.txt
1 1  
2   -PROJECT(esafull2nc)
  2 +PROJECT(themis_esafull2nc)
3 3  
4 4 include_directories(
5 5 ${CMAKE_HOME_DIRECTORY}/src/INCLUDE/
... ... @@ -14,13 +14,13 @@ file(
14 14 ./*
15 15 )
16 16  
17   -ADD_EXECUTABLE (esafull2nc ${source_files} )
  17 +ADD_EXECUTABLE (themis_esafull2nc ${source_files} )
18 18  
19 19 target_link_libraries(
20   - esafull2nc
  20 + themis_esafull2nc
21 21 DD_Client
22 22 ${NETCDFLIBRARY}
23 23 ${libcdf_LIBRARIES}
24 24 )
25 25  
26   -install (TARGETS esafull2nc DESTINATION bin)
  26 +install (TARGETS themis_esafull2nc DESTINATION bin)
... ...
src/DECODERS/themis/esamom2nc/CMakeLists.txt
1 1  
2   -PROJECT(esamom2nc)
  2 +PROJECT(themis_esamom2nc)
3 3  
4 4 include_directories(
5 5 ${CMAKE_HOME_DIRECTORY}/src/INCLUDE/
... ... @@ -14,13 +14,13 @@ file(
14 14 ./*
15 15 )
16 16  
17   -ADD_EXECUTABLE (esamom2nc ${source_files} )
  17 +ADD_EXECUTABLE (themis_esamom2nc ${source_files} )
18 18  
19 19 target_link_libraries(
20   - esamom2nc
  20 + themis_esamom2nc
21 21 DD_Client
22 22 ${NETCDFLIBRARY}
23 23 ${libcdf_LIBRARIES}
24 24 )
25 25  
26   -install (TARGETS esamom2nc DESTINATION bin)
  26 +install (TARGETS themis_esamom2nc DESTINATION bin)
... ...
src/DECODERS/themis/fgm2nc/CMakeLists.txt
1 1  
2   -PROJECT(fgm2nc)
  2 +PROJECT(themis_fgm2nc)
3 3  
4 4 include_directories(
5 5 ${CMAKE_HOME_DIRECTORY}/src/INCLUDE/
... ... @@ -14,13 +14,13 @@ file(
14 14 ./*
15 15 )
16 16  
17   -ADD_EXECUTABLE (fgm2nc ${source_files} )
  17 +ADD_EXECUTABLE (themis_fgm2nc ${source_files} )
18 18  
19 19 target_link_libraries(
20   - fgm2nc
  20 + themis_fgm2nc
21 21 DD_Client
22 22 ${NETCDFLIBRARY}
23 23 ${libcdf_LIBRARIES}
24 24 )
25 25  
26   -install (TARGETS fgm2nc DESTINATION bin)
  26 +install (TARGETS themis_fgm2nc DESTINATION bin)
... ...
src/DECODERS/themis/sst2nc/CMakeLists.txt
1 1  
2   -PROJECT(sst2nc)
  2 +PROJECT(themis_sst2nc)
3 3  
4 4 include_directories(
5 5 ${CMAKE_HOME_DIRECTORY}/src/INCLUDE/
... ... @@ -14,13 +14,13 @@ file(
14 14 ./*
15 15 )
16 16  
17   -ADD_EXECUTABLE (sst2nc ${source_files} )
  17 +ADD_EXECUTABLE (themis_sst2nc ${source_files} )
18 18  
19 19 target_link_libraries(
20   - sst2nc
  20 + themis_sst2nc
21 21 DD_Client
22 22 ${NETCDFLIBRARY}
23 23 ${libcdf_LIBRARIES}
24 24 )
25 25  
26   -install (TARGETS sst2nc DESTINATION bin)
  26 +install (TARGETS themis_sst2nc DESTINATION bin)
... ...
src/INCLUDE/DD.h
... ... @@ -30,6 +30,10 @@ typedef struct { int type; /* Type of variable in netcdf style */
30 30  
31 31 /*------------------- FUNCTIONS ---------------------------*/
32 32  
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
33 37 extern int DD_SetVariable(char *VarName);
34 38 /*
35 39 * VarName - full name of variable <project>:<instrument>:<Variable>
... ... @@ -100,6 +104,10 @@ extern int DD_AddDataSet(char *DataSetName, char *RemSetID, char *BaseName);
100 104 * Request for new VI. See ../DOC/TECHDOC/DDServFunct.html
101 105 */
102 106  
  107 +#ifdef __cplusplus
  108 +}
  109 +#endif
  110 +
103 111 /*--------------------- CONSTANTS -----------------------------------------*/
104 112 #define MOREDATA 1 /* There is data, but we have to call GetData again right now*/
105 113 #define MOREDELAY 2 /* There is data, but we have to call GetData again after delay */
... ...