Skip to content

Commit

Permalink
Merge pull request #26 from mark-a-potts/kind-fix
Browse files Browse the repository at this point in the history
fixed lingering kind issues
  • Loading branch information
climbfuji authored Feb 26, 2020
2 parents f90bde5 + ab04ead commit 4db1a06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Modules/Findg2tmpl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if(DEFINED ENV{G2TMPL_LIB} )
string(REGEX MATCH "(v[0-9]+\\.[0-9]+\\.[0-9]+)" _ ${${uppercase_name}_LIB})
set(version ${CMAKE_MATCH_1})

set(lib_name ${name}_${kind})
set(versioned_lib_name ${name}_${version}_${kind})
set(lib_name ${name})
set(versioned_lib_name ${name}_${version})

if(EXISTS ${${uppercase_name}_LIB} )
get_filename_component(lib_dir ${${uppercase_name}_LIB} DIRECTORY)
Expand Down
6 changes: 3 additions & 3 deletions Modules/Findgfsio.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This module looks for environment variables detailing where GFSIO lib is
# If variables are not set, GFSIO will be built from external source
if(DEFINED ENV{GFSIO_LIB4} )
set(GFSIO_LIB4 $ENV{GFSIO_LIB4} CACHE STRING "GFSIO Library Location" )
set(GFSIO_LIB4 $ENV{GFSIO_LIB4} CACHE STRING "GFSIO_4 Library Location" )
set(GFSIO_INC4 $ENV{GFSIO_INC4} CACHE STRING "GFSIO_4 Include Location" )

set(name "gfsio")
Expand All @@ -17,11 +17,11 @@ if(DEFINED ENV{GFSIO_LIB4} )

if(EXISTS ${${uppercase_name}_LIB${kind}} )
get_filename_component(lib_dir ${${uppercase_name}_LIB${kind}} DIRECTORY)
find_library(gfsio_path NAMES ${versioned_lib_name} PATHS ${lib_dir} NO_DEFAULT_PATH)
find_library(gfsio_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 ${gfsio_path}
IMPORTED_LOCATION ${gfsio_path_${kind}}
INTERFACE_INCLUDE_DIRECTORIES ${${uppercase_name}_INC${kind}})
endif()
endforeach()
Expand Down

0 comments on commit 4db1a06

Please sign in to comment.