diff --git a/CMakeLists.txt b/CMakeLists.txt index 67bb6a1..2bebc02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,8 +36,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) file(GLOB_RECURSE SOURCES "src/*.cpp") file(GLOB_RECURSE HEADERS "src/*.hpp") +# Add custom target to run make_createagent.sh at the start of the build process +add_custom_target(run_createagent ALL + COMMAND ${CMAKE_COMMAND} -E echo "Running make_createagent.sh..." + COMMAND ${CMAKE_COMMAND} -E env bash ${CMAKE_CURRENT_SOURCE_DIR}/make_createagent.sh + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Running make_createagent.sh before build" +) + # Add executable add_executable(dropshell ${SOURCES}) +add_dependencies(dropshell run_createagent) # Set include directories # build dir goes first so that we can use the generated version.hpp