ungrib build
[WPS.git] / ungrib / src / ngl / g2 / CMakeLists.txt
blob3dc642e53e6ea4bce82f8b36468f1d3db53af683
1 get_filename_component( FOLDER_COMPILE_TARGET ${CMAKE_CURRENT_SOURCE_DIR} NAME )
3 add_library( ${FOLDER_COMPILE_TARGET} STATIC )
5 set_target_properties( 
6                       ${FOLDER_COMPILE_TARGET}
7                         PROPERTIES
8                           Fortran_MODULE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${FOLDER_COMPILE_TARGET}
9                           # Fortran_FORMAT           FREE
10                       )
12 target_compile_definitions(
13                             ${FOLDER_COMPILE_TARGET}
14                             PRIVATE
15                               __64BIT__
16                           )
17 # target_link_libraries(  ${FOLDER_COMPILE_TARGET}
18 #                           PRIVATE
19 #                             ${netCDF_LIBRARIES}
20 #                             $<$<BOOL:${USE_MPI}>:$<TARGET_NAME_IF_EXISTS:MPI::MPI_Fortran>>
21 #                             $<$<BOOL:${USE_OPENMP}>:$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_Fortran>>
22 #                             $<TARGET_NAME_IF_EXISTS:Jasper::Jasper>
23 #                         )
25 target_sources( 
26                 ${FOLDER_COMPILE_TARGET}
27                 PRIVATE
28                   gridtemplates.f
29                   pdstemplates.f
30                   drstemplates.f
31                   gribmod.f
32                   realloc.f
33                   intmath.f
34                   addfield.F
35                   addgrid.f
36                   addlocal.f
37                   getfield.f
38                   gb_info.f
39                   gf_getfld.f
40                   gf_free.f
41                   gf_unpack1.f
42                   gf_unpack2.f
43                   gf_unpack3.f
44                   gf_unpack4.f
45                   gf_unpack5.f
46                   gf_unpack6.f
47                   gf_unpack7.F
48                   gettemplates.f
49                   getlocal.f
50                   getdim.f
51                   getpoly.f
52                   gribcreate.f
53                   gribend.f
54                   gribinfo.f
55                   mkieee.f
56                   rdieee.f
57                   simunpack.f
58                   reduce.f
59                   comunpack.f
60                   specunpack.f
61                   jpcunpack.F
62                   dec_jpeg2000.c
63                   pngunpack.F
64                   dec_png.c
65                   gbytesc.f
66                   skgb.f
67                   ixgb2.f
68                   getidx.f
69                   getg2i.f
70                   getg2ir.f
71                   getgb2s.f
72                   getgb2r.f
73                   getgb2l.f
74                   getgb2.f
75                   getgb2p.f
76                   getgb2rp.f
77                   putgb2.f
78                   g2grids.f
79                   gdt2gds.f
80                   params.f
81                   params_ecmwf.f
82                   mova2i.c
83                 )
85 install(
86         TARGETS ${FOLDER_COMPILE_TARGET}
87         EXPORT ${EXPORT_NAME}Targets
88         RUNTIME DESTINATION bin/
89         ARCHIVE DESTINATION lib/
90         LIBRARY DESTINATION lib/
91         )