This commit is contained in:
parent
029823a6b4
commit
a5e339a358
@ -46,17 +46,16 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|||||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||||
file(GLOB_RECURSE HEADERS "src/*.hpp")
|
file(GLOB_RECURSE HEADERS "src/*.hpp")
|
||||||
|
|
||||||
# Add custom target to run make_createagent.sh at the start of the build process
|
# Add custom target to run cmake_prebuild.sh at the start of the build process
|
||||||
add_custom_target(run_createagent ALL
|
add_custom_target(run_prebuild_script ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Running make_createagent.sh..."
|
COMMAND ${CMAKE_COMMAND} -E echo "Running cmake_prebuild.sh..."
|
||||||
COMMAND ${CMAKE_COMMAND} -E env bash ${CMAKE_CURRENT_SOURCE_DIR}/make_createagent.sh
|
COMMAND ${CMAKE_COMMAND} -E env bash ${CMAKE_CURRENT_SOURCE_DIR}/cmake_prebuild.sh
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Running make_createagent.sh before build"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add executable
|
# Add executable
|
||||||
add_executable(dropshell ${SOURCES})
|
add_executable(dropshell ${SOURCES})
|
||||||
add_dependencies(dropshell run_createagent)
|
add_dependencies(dropshell run_prebuild_script)
|
||||||
|
|
||||||
# Mark the generated files as GENERATED so CMake knows they'll be created during build
|
# Mark the generated files as GENERATED so CMake knows they'll be created during build
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# CMake pre-build script.
|
||||||
|
# Runs before the build process.
|
||||||
|
|
||||||
# This script creates two files:
|
# This script creates two files:
|
||||||
# src/utils/createagent.hpp
|
# src/utils/createagent.hpp
|
||||||
# src/utils/createagent.cpp
|
# src/utils/createagent.cpp
|
Loading…
x
Reference in New Issue
Block a user