CMake: Keep more accurate information on build types

Do not map anything vaguely library-related into DynamicLibraryType. This
will prevent creator from e.g. trying to deploy ObjectLibraries.

Change-Id: I34a0d981d2a949f587e1804268cc66231aedd545
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2019-06-19 13:25:27 +02:00
parent 019447c535
commit 0026d3dc3d
2 changed files with 9 additions and 8 deletions

View File

@@ -36,10 +36,11 @@
namespace CMakeProjectManager { namespace CMakeProjectManager {
enum TargetType { enum TargetType {
ExecutableType = 0, ExecutableType,
StaticLibraryType = 2, StaticLibraryType,
DynamicLibraryType = 3, DynamicLibraryType,
UtilityType = 64 ObjectLibraryType,
UtilityType
}; };
class CMAKE_EXPORT CMakeBuildTarget class CMAKE_EXPORT CMakeBuildTarget

View File

@@ -201,10 +201,10 @@ QList<CMakeBuildTarget> ServerModeReader::takeBuildTargets(QString &errorMessage
type = ExecutableType; type = ExecutableType;
else if (t->type == "STATIC_LIBRARY") else if (t->type == "STATIC_LIBRARY")
type = StaticLibraryType; type = StaticLibraryType;
else if (t->type == "MODULE_LIBRARY" else if (t->type == "OBJECT_LIBRARY")
|| t->type == "SHARED_LIBRARY" type = ObjectLibraryType;
|| t->type == "INTERFACE_LIBRARY" else if (t->type == "MODULE_LIBRARY" || t->type == "SHARED_LIBRARY"
|| t->type == "OBJECT_LIBRARY") || t->type == "INTERFACE_LIBRARY")
type = DynamicLibraryType; type = DynamicLibraryType;
else else
type = UtilityType; type = UtilityType;