File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ project ("Calculator")
8
8
# Добавьте источник в исполняемый файл этого проекта.
9
9
add_executable (Calculator "Calculator.cpp" "Calculator.h" "Operator.h" "Loader.h" "Loader.cpp" "Operations.h" "Operations.cpp" "Parser.h" "Parser.cpp" )
10
10
11
+ add_custom_target (AddPlugins ALL )
11
12
12
- file (COPY "${PROJECT_SOURCE_DIR} /plugins" DESTINATION "${CMAKE_BINARY_DIR} " )
13
+ add_custom_command (
14
+ TARGET AddPlugins
15
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR} /plugins
16
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR} /plugins ${CMAKE_BINARY_DIR} /plugins
17
+
18
+ )
19
+
20
+ add_dependencies ("Calculator" AddPlugins)
13
21
# TODO: Добавьте тесты и целевые объекты, если это необходимо.
Original file line number Diff line number Diff line change 3
3
4
4
int main (int argc, char ** argv)
5
5
{
6
- // std::string folder = "./plugins";//for Visual Studio
7
- std::string folder = " ..\\ plugins" ;// for Cmake project
6
+ std::string folder = " plugins" ;
8
7
std::string extension = " .dll" ;
9
8
Calculator app (folder, extension);
10
9
while (true )
You can’t perform that action at this time.
0 commit comments