diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index e7f4179abf3..efc995b5d23 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -182,6 +182,9 @@ table_session_account_connect_attrs.cc ) MYSQL_ADD_PLUGIN(perfschema ${PERFSCHEMA_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY) -IF(WITH_PERFSCHEMA_STORAGE_ENGINE AND WITH_UNIT_TESTS) - ADD_SUBDIRECTORY(unittest) -ENDIF() +IF (TARGET perfschema) + ADD_DEPENDENCIES(perfschema GenServerSource) + IF(WITH_UNIT_TESTS) + ADD_SUBDIRECTORY(unittest) + ENDIF(WITH_UNIT_TESTS) +ENDIF(TARGET perfschema)