Change qrenderdoc from ExternalProject to custom_command

* ExternalProject doesn't re-invoke on build to let qmake figure out if
  any files need rebuilding, so it's the totally wrong thing for
  qrenderdoc.
This commit is contained in:
baldurk
2016-08-02 16:02:01 +02:00
parent 377bf10505
commit 8dafb11456
+8 -5
View File
@@ -1,7 +1,10 @@
set(output_dir ${CMAKE_BINARY_DIR}/bin)
include(ExternalProject)
ExternalProject_Add(qrenderdoc
DEPENDS renderdoc
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND qmake "CONFIG+=debug" "DESTDIR=${output_dir}" ${CMAKE_CURRENT_SOURCE_DIR})
# The case here is deliberately not matching the executable name
# This means the custom command doesn't create this output file,
# which causes CMake to rerun this target every time so that Qt
# can do dependency checking and rebuild anything necessary.
add_custom_command(OUTPUT QRenderDoc
COMMAND qmake "CONFIG+=debug" "DESTDIR=${output_dir}" ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND MAKEFLAGS= make --no-print-directory)
add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc)