Cherry-pick: Make maxctrl rebuild when sources change
Cherry-picked 12e6ada259c38d535003c068a49bc525c33830d8 into 2.3. Since the maxctrl build process uses add_custom_command, we must explicitly list the sources that it depends on. With this change, maxctrl is rebuild whenever the sources change.
This commit is contained in:
@ -6,7 +6,10 @@ if (BUILD_MAXCTRL)
|
|||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE MAXCTRL_SOURCES lib/*)
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/maxctrl/maxctrl
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/maxctrl/maxctrl
|
||||||
|
DEPENDS ${MAXCTRL_SOURCES} maxctrl.js
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.sh ${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.sh ${CMAKE_SOURCE_DIR}
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
add_custom_target(maxctrl ALL DEPENDS ${CMAKE_BINARY_DIR}/maxctrl/maxctrl)
|
add_custom_target(maxctrl ALL DEPENDS ${CMAKE_BINARY_DIR}/maxctrl/maxctrl)
|
||||||
|
|||||||
Reference in New Issue
Block a user