diff --git a/unittest/commands/CMakeLists.txt b/unittest/commands/CMakeLists.txt index 6fae0c2463..a658c8a25d 100644 --- a/unittest/commands/CMakeLists.txt +++ b/unittest/commands/CMakeLists.txt @@ -23,7 +23,9 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND PKG_PLUGIN) endif() add_executable(test_simple_commands test_simple_commands.cpp) -add_dependencies(test_simple_commands plugins) +if(PKG_PLUGIN) + add_dependencies(test_simple_commands plugins) +endif() target_link_libraries(test_simple_commands PRIVATE lammps GTest::GMock GTest::GTest) add_test(NAME SimpleCommands COMMAND test_simple_commands WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})