mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Require qt creator to locate the cmake project to build on non-windows
* Previously the cmake build would put librenderdoc.so in a /bin folder in the source folder so the qt creator project could link against a fixed path when just opening the project solo. * This won't scale though for fetching the SWIG outputs from cmake, and it's ugly to modify the source folder for out-of-source builds. * Instead we have cmake generate a qt creator include file with all of the settings and paths needed, and pass the CMAKE_BINARY_DIR into qmake when building. This does mean that when opening the project in qt creator you need to specify CMAKE_DIR=/path/to/build though. * As a bonus, this means we can let cmake identify where python is and have qt creator link against it rather than having to hardcode include paths etc.
This commit is contained in:
@@ -68,10 +68,14 @@ win32 {
|
||||
DEFINES += RENDERDOC_PLATFORM_WIN32
|
||||
|
||||
} else {
|
||||
isEmpty(DESTDIR) {
|
||||
DESTDIR = $$_PRO_FILE_PWD_/../bin
|
||||
isEmpty(CMAKE_DIR) {
|
||||
error("When run from outside CMake, please set the Build Environment Variable CMAKE_DIR to point to your CMake build root. In Qt Creator add CMAKE_DIR=/path/to/renderdoc/build under 'Additional arguments' in the qmake Build Step. If running qmake directly, add CMAKE_DIR=/path/to/renderdoc/build/ to the command line.")
|
||||
}
|
||||
|
||||
DESTDIR=$$CMAKE_DIR/bin
|
||||
|
||||
include($$CMAKE_DIR/qrenderdoc/qrenderdoc_cmake.pri)
|
||||
|
||||
# Temp files into .obj
|
||||
MOC_DIR = .obj
|
||||
UI_DIR = .obj
|
||||
@@ -79,7 +83,7 @@ win32 {
|
||||
OBJECTS_DIR = .obj
|
||||
|
||||
# Link against the core library
|
||||
LIBS += -L$$DESTDIR -lrenderdoc
|
||||
LIBS += -lrenderdoc
|
||||
QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN\',-rpath,\'\$$ORIGIN/../lib\''
|
||||
|
||||
CONFIG += warn_off
|
||||
@@ -91,7 +95,7 @@ win32 {
|
||||
DEFINES += RENDERDOC_PLATFORM_POSIX RENDERDOC_PLATFORM_APPLE
|
||||
ICON = $$OSX_ICONFILE
|
||||
|
||||
INFO_PLIST_PATH = $$shell_quote($${DESTDIR}/$${TARGET}.app/Contents/Info.plist)
|
||||
INFO_PLIST_PATH = $$shell_quote($$DESTDIR/$${TARGET}.app/Contents/Info.plist)
|
||||
QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Add :CFBundleShortVersionString string $${RENDERDOC_VERSION}.0\" -c \"Set :CFBundleIdentifier org.renderdoc.qrenderdoc\" $${INFO_PLIST_PATH}
|
||||
} else {
|
||||
QT += x11extras
|
||||
|
||||
Reference in New Issue
Block a user