diff --git a/Modules/Findg2tmpl.cmake b/Modules/Findg2tmpl.cmake index 133e4a9..dc0d307 100644 --- a/Modules/Findg2tmpl.cmake +++ b/Modules/Findg2tmpl.cmake @@ -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) diff --git a/Modules/Findgfsio.cmake b/Modules/Findgfsio.cmake index 44b221a..fd34f72 100644 --- a/Modules/Findgfsio.cmake +++ b/Modules/Findgfsio.cmake @@ -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") @@ -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()