diff --git a/include/project_parser.hpp b/include/project_parser.hpp index f065ccb..5a19605 100644 --- a/include/project_parser.hpp +++ b/include/project_parser.hpp @@ -45,6 +45,7 @@ enum TargetType { target_static, target_interface, target_custom, + target_object, }; template diff --git a/src/cmake_generator.cpp b/src/cmake_generator.cpp index 4f55433..639ef28 100644 --- a/src/cmake_generator.cpp +++ b/src/cmake_generator.cpp @@ -766,6 +766,12 @@ void generate_cmake(const char *path, const parser::Project *parent_project) { target_type = "SOURCES"; target_scope = "PUBLIC"; break; + case parser::target_object: + // NOTE: This is properly supported since 3.12 + add_command = "add_library"; + target_type = "OBJECT"; + target_scope = "PUBLIC"; + break; default: assert("Unimplemented enum value" && false); } diff --git a/src/project_parser.cpp b/src/project_parser.cpp index b18d827..b3d7ef7 100644 --- a/src/project_parser.cpp +++ b/src/project_parser.cpp @@ -9,7 +9,7 @@ #include template <> -const char *enumStrings::data[] = {"executable", "library", "shared", "static", "interface", "custom"}; +const char *enumStrings::data[] = {"executable", "library", "shared", "static", "interface", "custom", "object"}; namespace cmkr { namespace parser {