mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 16:50:44 +00:00
Add cmake parameters for linking qrenderdoc against static qt libs
* This is fine under LGPL as RenderDoc is also open source licensed, so any such builds can be fully recreated and linked against a new Qt.
This commit is contained in:
@@ -3,12 +3,22 @@ set(output_dir ${CMAKE_BINARY_DIR}/bin)
|
||||
get_git_hash(GIT_COMMIT_HASH)
|
||||
string(STRIP ${GIT_COMMIT_HASH} GIT_COMMIT_HASH)
|
||||
|
||||
option(STATIC_QRENDERDOC "Compile qrenderdoc as static" OFF)
|
||||
|
||||
set(QMAKE_CONFIG "debug")
|
||||
set(QMAKE_LDFLAGS "")
|
||||
|
||||
if(STATIC_QRENDERDOC)
|
||||
set(QMAKE_CONFIG "debug static")
|
||||
set(QMAKE_LDFLAGS "-static-libstdc++")
|
||||
endif()
|
||||
|
||||
# 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" "DEFINES+=GIT_COMMIT_HASH_LITERAL=${GIT_COMMIT_HASH}" "DESTDIR=${output_dir}" ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND qmake "CONFIG+=${QMAKE_CONFIG}" "QMAKE_LFLAGS+=${QMAKE_LDFLAGS}" "DEFINES+=GIT_COMMIT_HASH_LITERAL=${GIT_COMMIT_HASH}" "DESTDIR=${output_dir}" ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND MAKEFLAGS= make --no-print-directory)
|
||||
add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user