|
|
@@ -7,6 +7,7 @@ function(find_module module name path) |
|
|
|
if (TARGET ${module}) |
|
|
|
return() |
|
|
|
endif() |
|
|
|
add_library(${module} INTERFACE) |
|
|
|
find_library(${module}_LIBRARY_DIR NAMES ${name} NAMES_PER_DIR PATHS ${path} |
|
|
|
PATH_SUFFIXES lib |
|
|
|
) |
|
|
@@ -15,9 +16,5 @@ function(find_module module name path) |
|
|
|
if ("${${module}_LIBRARY_DIR}" STREQUAL "${module}_LIBRARY_DIR-NOTFOUND") |
|
|
|
message(FATAL_ERROR "${name} not found in ${path}") |
|
|
|
endif() |
|
|
|
|
|
|
|
add_library(${module} SHARED IMPORTED) |
|
|
|
set_target_properties(${module} PROPERTIES |
|
|
|
IMPORTED_LOCATION ${${module}_LIBRARY_DIR} |
|
|
|
) |
|
|
|
target_link_libraries(${module} INTERFACE ${${module}_LIBRARY_DIR}) |
|
|
|
endfunction() |