Update version info for release v4.6.1 (#2122)
[WRF.git] / external / io_grib_share / CMakeLists.txt
blobedc5347dd4e797744b990c76f861904ca8e92a12
1 # WRF CMake Build
3 get_filename_component( FOLDER_COMPILE_TARGET ${CMAKE_CURRENT_SOURCE_DIR} NAME)
5 add_library(
6             ${FOLDER_COMPILE_TARGET}
7               STATIC
8               )
10 target_sources(
11                 ${FOLDER_COMPILE_TARGET}
12                 PRIVATE
13                   io_grib_share.F
14                   get_region_center.c
15                   gridnav.c
16                   open_file.c
17                   )
19 set_target_properties( 
20                       ${FOLDER_COMPILE_TARGET} 
21                         PROPERTIES
22                           Fortran_MODULE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${FOLDER_COMPILE_TARGET}
23                           Fortran_FORMAT           FREE
24                           EXPORT_PROPERTIES        Fortran_MODULE_DIRECTORY
25                       )
28 target_include_directories( ${FOLDER_COMPILE_TARGET}
29                             PRIVATE
30                               ${CMAKE_CURRENT_SOURCE_DIR}/../ioapi_share
31                             )
33 install(
34         TARGETS ${FOLDER_COMPILE_TARGET}
35         EXPORT  ${EXPORT_NAME}Targets
36         RUNTIME DESTINATION bin/
37         ARCHIVE DESTINATION lib/
38         LIBRARY DESTINATION lib/
39         )