Skip to content

Commit

Permalink
Merge pull request #413 from clintonstimpson/tpl-findcgns
Browse files Browse the repository at this point in the history
Update find of CGNS using modern cmake files.
  • Loading branch information
gsjaardema authored Oct 16, 2023
2 parents f4481e6 + eebfff3 commit 71702b7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/tribits/common_tpls/FindTPLCGNS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ if ((CGNS_ALLOW_MODERN AND HDF5_FOUND_MODERN_CONFIG_FILE) OR CGNS_FORCE_MODERN)
if (CGNS_FOUND)
message("-- Found CGNS_CONFIG=${CGNS_CONFIG}")
message("-- Generating CGNS::all_libs and CGNSConfig.cmake")
set(CGNS_TARGET CGNS::cgns_shared)
if(NOT TARGET CGNS::cgns_shared)
set(CGNS_TARGET CGNS::cgns_static)
endif()
tribits_extpkg_create_imported_all_libs_target_and_config_file(
CGNS
INNER_FIND_PACKAGE_NAME CGNS
IMPORTED_TARGETS_FOR_ALL_LIBS cgns)
IMPORTED_TARGETS_FOR_ALL_LIBS ${CGNS_TARGET})
set(TPL_CGNS_NOT_FOUND FALSE)
endif()

Expand Down Expand Up @@ -107,4 +111,4 @@ tribits_tpl_find_include_dirs_and_libraries( CGNS
REQUIRED_HEADERS ${REQUIRED_HEADERS}
REQUIRED_LIBS_NAMES ${REQUIRED_LIBS_NAMES})

endif()
endif()

0 comments on commit 71702b7

Please sign in to comment.