49 lines
2.2 KiB
Diff
49 lines
2.2 KiB
Diff
From 56769d3e2cc12670b73a1ddd9dfaab959340c2e2 Mon Sep 17 00:00:00 2001
|
|
From: Christian Kellner <christian@kellner.me>
|
|
Date: Thu, 11 Jul 2019 21:27:02 +0200
|
|
Subject: [PATCH] CMake: py3.8 support, ability to patch swig
|
|
|
|
Add 3.8 to list of python versions and ability to patch the custom
|
|
swig, also needed for 3.8
|
|
---
|
|
CMakeLists.txt | 2 +-
|
|
qrenderdoc/CMakeLists.txt | 2 ++
|
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 13818e5b8..00feda2ad 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -308,7 +308,7 @@ add_subdirectory(renderdoc)
|
|
# are handled in common
|
|
if(ENABLE_QRENDERDOC OR ENABLE_PYRENDERDOC)
|
|
# Make sure Python 3 is found
|
|
- set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7)
|
|
+ set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8)
|
|
find_package(PythonInterp 3 REQUIRED)
|
|
find_package(PythonLibs 3 REQUIRED)
|
|
# we also need python3-config for swig
|
|
diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt
|
|
index 9fd65b2d3..1ef284349 100644
|
|
--- a/qrenderdoc/CMakeLists.txt
|
|
+++ b/qrenderdoc/CMakeLists.txt
|
|
@@ -7,6 +7,7 @@ endif()
|
|
|
|
set(QMAKE_QT5_COMMAND ${QT_QMAKE_EXECUTABLE} CACHE STRING "Command to run to invoke Qt5's qmake. Normally this is qmake, possibly with qtchooser, but might be qmake-qt5")
|
|
set(RENDERDOC_SWIG_PACKAGE https://github.com/baldurk/swig/archive/renderdoc-modified-6.zip CACHE STRING "The location where RenderDoc's swig fork source can be found. By default points to the URL on github but can be pointed to a local file.")
|
|
+set(RENDERDOC_SWIG_PATCH "" CACHE STRING "The location for the patch to apply to swig.")
|
|
|
|
set(QMAKE_CONFIG "debug")
|
|
set(QMAKE_LDFLAGS "")
|
|
@@ -99,6 +100,7 @@ ExternalProject_Add(custom_swig
|
|
# using an URL to a zip directly so we don't clone the history etc
|
|
URL ${RENDERDOC_SWIG_PACKAGE}
|
|
BUILD_IN_SOURCE 1
|
|
+ PATCH_COMMAND patch -p1 -i ${RENDERDOC_SWIG_PATCH} > /dev/null
|
|
CONFIGURE_COMMAND ./autogen.sh > /dev/null 2>&1
|
|
COMMAND CC=${SWIG_CONFIGURE_CC} CXX=${SWIG_CONFIGURE_CXX} CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --with-pcre=yes --prefix=${CMAKE_BINARY_DIR} > /dev/null
|
|
BUILD_COMMAND ${GENERATOR_MAKE} > /dev/null 2>&1
|
|
--
|
|
2.21.0
|
|
|