diff --git a/CBot/src/CBot/CBotInstr/CBotInstr.h b/CBot/src/CBot/CBotInstr/CBotInstr.h index fda7ad12..6db33eca 100644 --- a/CBot/src/CBot/CBotInstr/CBotInstr.h +++ b/CBot/src/CBot/CBotInstr/CBotInstr.h @@ -38,7 +38,7 @@ class CBotDebug; * \endcode * the following structure is generated: * \dot - * # Generated using the CBot_compile_graph tool + * # Generated using the CBot-CompileGraph tool * # and slightly modified * digraph { * start [label= shape=box3d color=cyan] diff --git a/CMakeLists.txt b/CMakeLists.txt index 4eebf03c..78eb5b3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -444,6 +444,10 @@ add_subdirectory(colobot-app) add_subdirectory(po) +if(TOOLS) + add_subdirectory(tools) +endif() + if(DESKTOP) add_subdirectory(desktop) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6d9ec86b..f212e5f5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,3 @@ set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG}) # Unit tests add_subdirectory(unit) - -# CBot tests -add_subdirectory(cbot) diff --git a/test/cbot/CMakeLists.txt b/test/cbot/CMakeLists.txt deleted file mode 100644 index 01701852..00000000 --- a/test/cbot/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -add_executable(CBot_console console.cpp) -target_link_directories(CBot_console PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} -) -target_link_libraries(CBot_console PRIVATE - CBot - Colobot-Base # Needed for error strings (TODO: why are they on Colobot side? :/) -) - -add_executable(CBot_compile_graph compile_graph.cpp) -target_link_directories(CBot_compile_graph PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} -) -target_link_libraries(CBot_compile_graph CBot) - -if(COLOBOT_LINT_BUILD) - add_fake_header_sources("test/cbot" CBot_console) - add_fake_header_sources("test/cbot" CBot_compile_graph) -endif() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 00000000..968bf4cc --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(cbot-console) +add_subdirectory(cbot-graph) diff --git a/tools/cbot-console/CMakeLists.txt b/tools/cbot-console/CMakeLists.txt new file mode 100644 index 00000000..831f20e2 --- /dev/null +++ b/tools/cbot-console/CMakeLists.txt @@ -0,0 +1,13 @@ +add_executable(CBot-Console + src/console.cpp +) + +target_link_directories(CBot-Console PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(CBot-Console PRIVATE + CBot + Colobot-Base # Needed for error strings (TODO: why are they on Colobot side? :/) +) diff --git a/test/cbot/console.cpp b/tools/cbot-console/src/console.cpp similarity index 100% rename from test/cbot/console.cpp rename to tools/cbot-console/src/console.cpp diff --git a/tools/cbot-graph/CMakeLists.txt b/tools/cbot-graph/CMakeLists.txt new file mode 100644 index 00000000..c450ccce --- /dev/null +++ b/tools/cbot-graph/CMakeLists.txt @@ -0,0 +1,14 @@ +add_executable(CBot-CompileGraph + src/compile_graph.cpp +) + +target_link_directories(CBot-CompileGraph PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(CBot-CompileGraph PRIVATE CBot) + +if(COLOBOT_LINT_BUILD) + add_fake_header_sources("test/cbot" CBot-CompileGraph) +endif() diff --git a/test/cbot/compile_graph.cpp b/tools/cbot-graph/src/compile_graph.cpp similarity index 95% rename from test/cbot/compile_graph.cpp rename to tools/cbot-graph/src/compile_graph.cpp index 8c428337..90b0e59f 100644 --- a/test/cbot/compile_graph.cpp +++ b/tools/cbot-graph/src/compile_graph.cpp @@ -29,13 +29,13 @@ * * To generate the graph, pass the output to GraphViz: * \code{.sh} - * ./CBot_compile_graph < input_file.txt | dot -Tx11 + * ./CBot-CompileGraph < input_file.txt | dot -Tx11 * \endcode * * or for output to file: * * \code{.sh} - * ./CBot_compile_graph < input_file.txt | dot -Tpng -o output.png + * ./CBot-CompileGraph < input_file.txt | dot -Tpng -o output.png * \endcode */