Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use find_package_handle_standard_args in Find Modules #19

Merged
merged 2 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Modules/Findbacio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ if(DEFINED ENV{BACIO_LIB4})
if(EXISTS ${${uppercase_name}_LIB${kind}} )
get_filename_component(lib_dir ${${uppercase_name}_LIB${kind}} DIRECTORY)
find_library(bacio_path_${kind} NAMES ${versioned_lib_name} PATHS ${lib_dir} NO_DEFAULT_PATH)

add_library(${lib_name} STATIC IMPORTED)
set_target_properties(${lib_name} PROPERTIES
IMPORTED_LOCATION ${bacio_path_${kind}})
endif()
endforeach()

endif()

find_package_handle_standard_args(bacio
REQUIRED_VARS bacio_path_4)

3 changes: 3 additions & 0 deletions Modules/Findbufr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ if(DEFINED ENV{BUFR_LIB4} )
endforeach()

endif()

find_package_handle_standard_args(bufr
REQUIRED_VARS bufr_path_4)
3 changes: 3 additions & 0 deletions Modules/Findcrtm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ if(DEFINED ENV{CRTM_LIB})
IMPORTED_LOCATION ${crtm_path}
INTERFACE_INCLUDE_DIRECTORIES ${${uppercase_name}_INC})
endif()

find_package_handle_standard_args(crtm
REQUIRED_VARS crtm_path)
3 changes: 3 additions & 0 deletions Modules/Findg2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ if(DEFINED ENV{G2_LIBd})
endif()
endforeach()
endif()

find_package_handle_standard_args(g2
REQUIRED_VARS g2_path_d)
3 changes: 3 additions & 0 deletions Modules/Findg2tmpl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ if(DEFINED ENV{G2TMPL_LIBd} )
endif()
endforeach()
endif()

find_package_handle_standard_args(g2tmpl
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
REQUIRED_VARS g2tmpl_path)
3 changes: 3 additions & 0 deletions Modules/Findgfsio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ if(DEFINED ENV{GFSIO_LIB4} )
endif()
endforeach()
endif()

find_package_handle_standard_args(gfsio
REQUIRED_VARS gfsio_path_4)
3 changes: 3 additions & 0 deletions Modules/Findip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ if(DEFINED ENV{IP_LIBd} )
endif()
endforeach()
endif()

find_package_handle_standard_args(ip
REQUIRED_VARS ip_path_d)
3 changes: 3 additions & 0 deletions Modules/Findlandsfcutil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ if(DEFINED ENV{LANDSFCUTIL_LIB4} )
endif()
endforeach()
endif()

find_package_handle_standard_args(landsfcutil
REQUIRED_VARS landsfcutil_path_4)
6 changes: 4 additions & 2 deletions Modules/Findnemsio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ if(DEFINED ENV{NEMSIO_LIB} )
set(version ${CMAKE_MATCH_1})

set(versioned_lib_name ${name}_${version})
message("looking for ${${uppercase_name}_LIB}")

if(EXISTS ${${uppercase_name}_LIB} )
message("found ${${uppercase_name}_LIB}")
get_filename_component(lib_dir ${${uppercase_name}_LIB} DIRECTORY)
find_library(nemsio_path NAMES ${versioned_lib_name} PATHS ${lib_dir} NO_DEFAULT_PATH)

Expand All @@ -23,3 +22,6 @@ if(DEFINED ENV{NEMSIO_LIB} )
INTERFACE_INCLUDE_DIRECTORIES ${${uppercase_name}_INC})
endif()
endif()

find_package_handle_standard_args(nemsio
REQUIRED_VARS nemsio_path)
3 changes: 3 additions & 0 deletions Modules/Findnemsiogfs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ if(DEFINED ENV{NEMSIOGFS_LIB} )
INTERFACE_INCLUDE_DIRECTORIES ${${uppercase_name}_INC})
endif()
endif()

find_package_handle_standard_args(nemsiogfs
REQUIRED_VARS nemsiogfs_path)
3 changes: 3 additions & 0 deletions Modules/Findsfcio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ if(DEFINED ENV{SFCIO_LIB4} )
endif()
endforeach()
endif()

find_package_handle_standard_args(sfcio
REQUIRED_VARS sfcio_path)
3 changes: 3 additions & 0 deletions Modules/Findsigio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ if(DEFINED ENV{SIGIO_LIB4} )
endif()
endforeach()
endif()

find_package_handle_standard_args(sigio
REQUIRED_VARS sigio_path)
3 changes: 3 additions & 0 deletions Modules/Findsp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ if(DEFINED ENV{SP_LIBd})
endif()
endforeach()
endif()

find_package_handle_standard_args(sp
REQUIRED_VARS sp_path_d)
3 changes: 3 additions & 0 deletions Modules/Findw3emc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ if(DEFINED ENV{W3EMC_LIBd} )
endif()
endforeach()
endif()

find_package_handle_standard_args(w3emc
REQUIRED_VARS w3emc_path_d)
3 changes: 3 additions & 0 deletions Modules/Findw3nco.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ if(DEFINED ENV{W3NCO_LIBd} )
endif()
endforeach()
endif()

find_package_handle_standard_args(w3nco
REQUIRED_VARS w3nco_path_d)