diff --git a/cmake/ComplexLibrary.cmake b/cmake/ComplexLibrary.cmake index 5e91582e9..98ef345e9 100644 --- a/cmake/ComplexLibrary.cmake +++ b/cmake/ComplexLibrary.cmake @@ -47,9 +47,11 @@ function(export_complex_library) message(FATAL_ERROR "export_complex_library requires a name to be set") endif() if (NOT ${PREFIX}_MODULE) + # get the module prefix and remove it from libname string(REPLACE "-" ";" LIBNAME_LIST "${${PREFIX}_LIBNAME}") list(GET LIBNAME_LIST 0 MODULE) - list(GET LIBNAME_LIST 1 LIBNAME) + list(REMOVE_AT LIBNAME_LIST 0) + string(REPLACE ";" "-" LIBNAME "${LIBNAME_LIST}") else() set(MODULE ${${PREFIX}_MODULE}) set(LIBNAME ${${PREFIX}_LIBNAME})