diff --git a/source/dub/compilers/compiler.d b/source/dub/compilers/compiler.d index 078fb0a..85aeb66 100644 --- a/source/dub/compilers/compiler.d +++ b/source/dub/compilers/compiler.d @@ -345,7 +345,7 @@ { assert(settings.targetName.length > 0, "No target name set."); final switch(settings.targetType){ - case TargetType.autodetect: assert(false); + case TargetType.autodetect: assert(false, "Configurations must have a concrete target type."); case TargetType.none: return null; case TargetType.sourceLibrary: return null; case TargetType.executable: diff --git a/source/dub/package_.d b/source/dub/package_.d index d09ddf7..63548fd 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -128,7 +128,7 @@ } BuildSettingsTemplate lib_settings; - lib_settings.targetType = m_info.buildSettings.targetType; + lib_settings.targetType = m_info.buildSettings.targetType == TargetType.autodetect ? TargetType.library : m_info.buildSettings.targetType; lib_settings.excludedSourceFiles[""] = app_files; m_info.configurations ~= ConfigurationInfo("library", lib_settings); }