summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-10-18 19:40:49 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2019-02-07 08:26:31 +0000
commit97df448edbc035a2f531508a5cfe5739fb2de18d (patch)
tree732de8143e1dcb6a5b25e25eb8ec2954bf8ac87f
parent9a371088d6b8e8a0986a30a8dfb0076669275103 (diff)
Modernize cmake build
Add a CMake super project that includes the shiboken2, PySide2 and pyside2-tools subprojects, so that it's possible to build everything from Qt Creator (or any other IDE that supports CMake) with minimal set up effort, and thus inform the IDE CMake integration of all relevant files, for easier code editing, navigation and refactoring. This also lays the foundation for allowing 3rd parties to use the shiboken2 generator to generate custom modules. This is achieved by eliminating various hardcoded paths for libraries and include directories. Start using CMake targets throughout the build code to correctly propagate link flags and include dirs for libshiboken and shiboken2 executable targets. Same for the libpyside target. Generate two separate cmake config files (build-tree / install-tree) that can be used with find_package(Shiboken2), to make sure that the PySide2 project can be built as part of the super project build. This is currently the only way I've found to allow the super build to work. Note that for the build-tree find_package() to work, the CMAKE_MODULE_PATH has to be adjusted in the super project file. The generated config files contain variables and logic that allow usage of the installed shiboken package in downstream projects (PySide2). This involves things like getting the includes and libraries for the currently found python interpreter, the shiboken build type (release or debug), was shiboken built with limited api support, etc. Generate 2 separate (build-tree and install-tree) config files for PySide2, similar to how it's done for the shiboken case, for pyside2-tools to build correctly. Install shiboken2 target files using install(EXPORT) to allow building PySide2 with an installed Shiboken2 package (as opposed to one that is built as part of the super project). Same with PySide2 targets for pyside2-tools subproject. Make sure not to redefine uninstall targets if they are already defined. Add a --shorter-paths setup.py option, which would be used by the Windows CI, to circumvent creating paths that are too long, and thus avoiding build issues. Output the build characteristics / classifiers into the generated build_history/YYYY-MM-DD_AAAAAA/build_dir.txt file, so it can be used by the test runner to properly filter out blacklisted tests. This was necessary due to the shorter paths options. Fix various issues regarding target includes and library dependencies. Remove certain duplicated cmake code (like limited api check and build type checks) in PySide2, given that that information will now be present in the exported shiboken2 config file. Include a short README.cmake.md file that describes how to build the super project. References used https://rix0r.nl/blog/2015/08/13/cmake-guide/ https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/ https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1 https://cliutils.gitlab.io/modern-cmake/chapters/basics/functions.html https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html https://github.com/ComicSansMS/libstratcom/blob/master/CMakeLists.txt Abandoned approach using ExternalProject references: https://cmake.org/cmake/help/latest/module/ExternalProject.html https://stackoverflow.com/questions/44990964/how-to-perform-cmakefind-package-at-build-stage-only Fixes: PYSIDE-919 Change-Id: Iaa15d20b279a04c5e16ce2795d03f912bc44a389 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--CMakeLists.txt21
-rw-r--r--README.cmake.md39
-rw-r--r--build_scripts/main.py10
-rw-r--r--build_scripts/options.py1
-rw-r--r--coin_build_instructions.py7
m---------sources/pyside2-tools0
-rw-r--r--sources/pyside2/CMakeLists.txt128
-rw-r--r--sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtCharts/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt5
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtHelp/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtLocation/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtNetwork/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtPositioning/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtQml/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtQuick/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtScript/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtScxml/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtSensors/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtSql/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtSvg/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtTest/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtUiTools/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebKit/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWidgets/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtXml/CMakeLists.txt5
-rw-r--r--sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py9
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake26
-rw-r--r--sources/pyside2/doc/CMakeLists.txt2
-rw-r--r--sources/pyside2/libpyside/CMakeLists.txt69
-rw-r--r--sources/pyside2/libpyside/PySide2Config-spec.cmake.in27
-rw-r--r--sources/pyside2/libpyside/PySide2Config.cmake.in2
-rw-r--r--sources/pyside2/plugins/CMakeLists.txt8
-rw-r--r--sources/pyside2/tests/CMakeLists.txt4
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt16
-rw-r--r--sources/pyside2/tests/registry/init_platform.py8
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt4
-rw-r--r--sources/shiboken2/CMakeLists.txt96
-rw-r--r--sources/shiboken2/data/CMakeLists.txt39
-rw-r--r--sources/shiboken2/data/Shiboken2Config-spec.cmake.in65
-rw-r--r--sources/shiboken2/data/Shiboken2Config.cmake.in2
-rw-r--r--sources/shiboken2/data/shiboken2.pc.in6
-rw-r--r--sources/shiboken2/data/shiboken_helpers.cmake201
-rw-r--r--sources/shiboken2/generator/CMakeLists.txt5
-rw-r--r--sources/shiboken2/libshiboken/CMakeLists.txt48
-rw-r--r--sources/shiboken2/shibokenmodule/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/minimalbinding/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/otherbinding/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/samplebinding/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/smartbinding/CMakeLists.txt2
-rw-r--r--testing/buildlog.py34
77 files changed, 571 insertions, 487 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..2f9a6edf
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,21 @@
+project(pyside2_super_project)
+
+cmake_minimum_required(VERSION 3.1)
+cmake_policy(VERSION 3.1)
+
+if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+ message(FATAL_ERROR "In-source builds are not allowed.")
+endif()
+
+# Used to prevent overriding message function in both shiboken2 and pyside2.
+set(is_pyside2_superproject_build 1)
+
+add_subdirectory(sources/shiboken2)
+
+# Semi-hack to include exported shiboken variables.
+list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/shiboken2/data")
+add_subdirectory(sources/pyside2)
+
+# Semi-hack to include exported pyside2 variables.
+list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside2/libpyside")
+add_subdirectory(sources/pyside2-tools)
diff --git a/README.cmake.md b/README.cmake.md
new file mode 100644
index 00000000..60c446e8
--- /dev/null
+++ b/README.cmake.md
@@ -0,0 +1,39 @@
+# CMake super project
+For development convenience, a CMake super project is included in the root of the repository.
+
+The super project can be built using standalone CMake, or using an IDE's CMake integration
+(Qt Creator for example).
+
+Nevertheless the default build process is done via setup.py, in which case each of the
+sub-projects are built and installed separately, as mentioned, the super project is just
+for development convenience.
+
+## IDE (Qt Creator) case
+
+When using an IDE, just open the root CMakeLists.txt file as a new project, and make sure to
+specify the following things:
+
+ * LLVM_INSTALL_DIR - the environment variable should point to your libclang library location
+ * Qt - either select a Qt Kit when configuring the project, or make sure that the
+ qmake binary is present in the PATH environment variable.
+ * Python - the PATH environment variable should also point to the Python interpreter
+ which you wish to use for building the projects (can either be a system
+ interpreter, or a virtualenv one for example)
+
+Once that is done, just re-run CMake, so that it picks up the new environment values.
+If needed, all other cache variables defined by the project files can be re-adjusted
+(for example FORCE_LIMITED_API).
+
+## Command line CMake case
+
+When building using the command line CMake binary, make sure to invoke it in a separate
+build directory, and not in the root source directory.
+
+Make sure you have the correct environment variables set up, as described in the previous section.
+
+The invocation would then look like:
+```bash
+mkdir build && cd build
+cmake -DCMAKE_BUILD_TYPE=Release ..
+# make or nmake or msbuild or jom
+```
diff --git a/build_scripts/main.py b/build_scripts/main.py
index cdc6dce7..b9c83b93 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -655,8 +655,13 @@ class PysideBuild(_build):
update_env_path(additional_paths)
- build_name = "py{}-qt{}-{}-{}".format(py_version, qt_version,
- platform.architecture()[0], build_type.lower())
+ # Used for test blacklists and registry test.
+ self.build_classifiers = "py{}-qt{}-{}-{}".format(py_version, qt_version,
+ platform.architecture()[0], build_type.lower())
+ if OPTION_SHORTER_PATHS:
+ build_name = "p{}".format(py_version)
+ else:
+ build_name = self.build_classifiers
script_dir = setup_script_dir
sources_dir = os.path.join(script_dir, "sources")
@@ -714,6 +719,7 @@ class PysideBuild(_build):
fpath = os.path.join(unique_dir, 'build_dir.txt')
with open(fpath, 'w') as f:
print(build_dir, file=f)
+ print(self.build_classifiers, file=f)
log.info("Created {}".format(build_history))
if not OPTION_SKIP_PACKAGING:
diff --git a/build_scripts/options.py b/build_scripts/options.py
index 64464993..c17f6a10 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -180,6 +180,7 @@ OPTION_SANITIZE_ADDRESS = has_option("sanitize-address")
OPTION_SNAPSHOT_BUILD = has_option("snapshot-build")
OPTION_LIMITED_API = option_value("limited-api")
OPTION_PACKAGE_TIMESTAMP = option_value("package-timestamp")
+OPTION_SHORTER_PATHS = has_option("shorter-paths")
# This is used automatically by distutils.command.install object, to
# specify the final installation location.
diff --git a/coin_build_instructions.py b/coin_build_instructions.py
index b690012f..e4a27d26 100644
--- a/coin_build_instructions.py
+++ b/coin_build_instructions.py
@@ -119,6 +119,13 @@ def call_setup(python_ver):
if is_snapshot_build():
cmd += ["--snapshot-build"]
+ # Due to certain older CMake versions generating very long paths
+ # (at least with CMake 3.6.2) when using the export() function,
+ # pass the shorter paths option on Windows so we don't hit
+ # the path character length limit (260).
+ if CI_HOST_OS == "Windows":
+ cmd += ["--shorter-paths"]
+
cmd += ["--package-timestamp=" + CI_INTEGRATION_ID]
env = os.environ
diff --git a/sources/pyside2-tools b/sources/pyside2-tools
-Subproject 9d23904f5d5f13f8e6f72deebefff1d336163ff
+Subproject c99aa3447bffcd8c222566a7c22b9627c5a52c5
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index b2866a10..1e6f017d 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -8,20 +8,18 @@ cmake_policy(SET CMP0046 NEW)
project(pysidebindings)
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake_helpers/
- ${CMAKE_SOURCE_DIR}/cmake/Macros/
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_helpers/
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macros/
${CMAKE_MODULE_PATH})
include(helpers)
-option(USE_PYTHON_VERSION "Use specific python version to build pyside2." "")
-
# Don't display "up-to-date / install" messages when installing, to reduce visual clutter.
if (QUIET_BUILD)
set(CMAKE_INSTALL_MESSAGE NEVER)
endif()
# Override message not to display info messages when doing a quiet build.
-if (QUIET_BUILD)
+if (QUIET_BUILD AND is_pyside2_superproject_build)
function(message)
list(GET ARGV 0 MessageType)
if (MessageType STREQUAL FATAL_ERROR OR
@@ -34,15 +32,7 @@ if (QUIET_BUILD)
endfunction()
endif()
-if (USE_PYTHON_VERSION)
- find_package(PythonInterp ${USE_PYTHON_VERSION} REQUIRED)
- find_package(PythonLibs ${USE_PYTHON_VERSION} REQUIRED)
-else()
- find_package(PythonInterp 2.7)
- find_package(PythonLibs 2.7)
-endif()
-
-set(PYSIDE_VERSION_FILE_PATH "${CMAKE_SOURCE_DIR}/pyside_version.py")
+set(PYSIDE_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pyside_version.py")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
${PYSIDE_VERSION_FILE_PATH}
)
@@ -63,111 +53,28 @@ list(GET PYSIDE_VERSION_OUTPUT 3 BINDING_API_PRE_RELEASE_VERSION_TYPE)
# the number of the pre release (alpha1, beta3, rc7, etc.)
list(GET PYSIDE_VERSION_OUTPUT 4 BINDING_API_PRE_RELEASE_VERSION)
-macro(get_python_extension_suffix)
- # Result of imp.get_suffixes() depends on the platform, but generally looks something like:
- # [('.cpython-34m-x86_64-linux-gnu.so', 'rb', 3), ('.cpython-34m.so', 'rb', 3),
- # ('.abi3.so', 'rb', 3), ('.so', 'rb', 3), ('.py', 'r', 1), ('.pyc', 'rb', 2)]
- # We pick the first most detailed one, strip of the file extension part.
-
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "if True:
- import imp, re
- first_suffix = imp.get_suffixes()[0][0]
- res = re.search(r'^(.+)\\.', first_suffix)
- if res:
- first_suffix = res.group(1)
- else:
- first_suffix = ''
- print(first_suffix)
- "
- OUTPUT_VARIABLE PYTHON_EXTENSION_SUFFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_EXTENSION_SUFFIX: " ${PYTHON_EXTENSION_SUFFIX})
-endmacro()
-
-
-if (NOT PYTHON_EXTENSION_SUFFIX)
- get_python_extension_suffix()
-endif()
-
-# On Windows, PYTHON_LIBRARIES can be a list. Example:
-# optimized;C:/Python36/libs/python36.lib;debug;C:/Python36/libs/python36_d.lib
-# On other platforms, this result is not used at all.
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "if True:
- for lib in '${PYTHON_LIBRARIES}'.split(';'):
- if '/' in lib:
- prefix, py = lib.rsplit( '/', 1)
- if py.startswith('python3'):
- print(prefix + '/python3.lib')
- break
- "
- OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
if (WIN32)
set(PATH_SEP "\;")
else()
set(PATH_SEP ":")
endif()
-option(FORCE_LIMITED_API "Enable the limited API." "yes")
+find_package(Shiboken2 2.0.0 REQUIRED)
-set(PYTHON_LIMITED_API 0)
-if(FORCE_LIMITED_API STREQUAL "yes")
- # GREATER_EQUAL is available only from cmake 3.7 on. We mean python 3.5 .
- if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND ${PYTHON_VERSION_MINOR} GREATER 4)
- add_definitions("-DPy_LIMITED_API=0x03050000")
- set(PYTHON_LIMITED_API 1)
- endif()
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
endif()
+
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions("-DNDEBUG")
endif()
-if (PYTHON_LIMITED_API)
- if (WIN32 AND NOT EXISTS "${PYTHON_LIMITED_LIBRARIES}")
- message(FATAL_ERROR "The Limited API was enabled, but ${PYTHON_LIMITED_LIBRARIES} was not found!")
- endif()
+if (SHIBOKEN_PYTHON_LIMITED_API)
message(STATUS "******************************************************")
- message(STATUS "** Limited API enabled ${PYTHON_LIMITED_LIBRARIES}")
+ message(STATUS "** PySide2 Limited API enabled.")
message(STATUS "******************************************************")
endif()
-if (NOT PYTHON_CONFIG_SUFFIX)
- if (PYTHON_VERSION_MAJOR EQUAL 2)
- set(PYTHON_CONFIG_SUFFIX "-python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
- if (PYTHON_EXTENSION_SUFFIX)
- set(PYTHON_CONFIG_SUFFIX "${PYTHON_CONFIG_SUFFIX}${PYTHON_EXTENSION_SUFFIX}")
- endif()
- elseif (PYTHON_VERSION_MAJOR EQUAL 3)
- if (PYTHON_LIMITED_API)
- if(WIN32)
- set(PYTHON_EXTENSION_SUFFIX "")
- else()
- set(PYTHON_EXTENSION_SUFFIX ".abi3")
- endif()
- endif()
- set(PYTHON_CONFIG_SUFFIX "${PYTHON_EXTENSION_SUFFIX}")
- endif()
-endif()
-
-if (NOT PYTHON_SHARED_LIBRARY_SUFFIX)
- set(PYTHON_SHARED_LIBRARY_SUFFIX "${PYTHON_CONFIG_SUFFIX}")
-
- # Append a "v" to disambiguate the python version and the pyside version in the
- # shared library file name.
- if (APPLE AND PYTHON_VERSION_MAJOR EQUAL 2)
- set(PYTHON_SHARED_LIBRARY_SUFFIX "${PYTHON_SHARED_LIBRARY_SUFFIX}v")
- endif()
-endif()
-
-
-message(STATUS "PYTHON_EXTENSION_SUFFIX: ${PYTHON_EXTENSION_SUFFIX}")
-message(STATUS "PYTHON_CONFIG_SUFFIX: ${PYTHON_CONFIG_SUFFIX}")
-message(STATUS "PYTHON_SHARED_LIBRARY_SUFFIX: ${PYTHON_SHARED_LIBRARY_SUFFIX}")
-
-find_package(Shiboken2 2.0.0 REQUIRED)
find_package(Qt5 5.12 REQUIRED COMPONENTS Core)
add_definitions(${Qt5Core_DEFINITIONS})
@@ -188,7 +95,7 @@ endif()
option(BUILD_TESTS "Build tests." TRUE)
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
-set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
if(CMAKE_HOST_APPLE)
set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "Deprecated. CMake now finds the proper include dir itself.")
set(OSX_USE_LIBCPP "OFF" CACHE BOOL "Explicitly link the libc++ standard library (useful for osx deployment targets lower than 10.9.")
@@ -231,7 +138,6 @@ else()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
if(ENABLE_GCC_OPTIMIZATION)
- set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Os -Wl,-O1")
if(NOT CMAKE_HOST_APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--hash-style=gnu")
@@ -249,10 +155,6 @@ else()
endif()
message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
-endif()
-
set(BINDING_NAME PySide2)
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide2 version" FORCE)
@@ -441,13 +343,17 @@ message(STATUS "Detected OS: ${AUTO_OS}")
# Define supported Qt Version
set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
+
# uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
-add_custom_target(uninstall "${CMAKE_COMMAND}"
- -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+# When opening super project, prevent redefinition of uninstall target.
+if (NOT TARGET uninstall)
+ add_custom_target(uninstall "${CMAKE_COMMAND}"
+ -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+endif()
if (NOT PYTHON_SITE_PACKAGES)
execute_process(
diff --git a/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt
index 258a011b..73682b3b 100644
--- a/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt
@@ -29,9 +29,7 @@ set(Qt3DAnimation_include_dirs
${Qt53DCore_INCLUDE_DIRS}
${Qt53DRender_INCLUDE_DIRS}
${Qt53DAnimation_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${Qt3DCore_GEN_DIR}
@@ -39,8 +37,6 @@ set(Qt3DAnimation_include_dirs
${Qt3DAnimation_GEN_DIR})
set(Qt3DAnimation_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DAnimation_LIBRARIES})
set(Qt3DAnimation_deps Qt3DRender)
diff --git a/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt
index d046f8fc..e28de3f0 100644
--- a/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt
@@ -50,16 +50,12 @@ set(Qt3DCore_include_dirs
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt53DCore_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtNetwork_GEN_DIR})
set(Qt3DCore_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DCore_LIBRARIES})
set(Qt3DCore_deps QtGui QtNetwork)
diff --git a/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt
index bd750949..e581bc26 100644
--- a/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt
@@ -56,17 +56,13 @@ set(Qt3DExtras_include_dirs
${Qt53DCore_INCLUDE_DIRS}
${Qt53DRender_INCLUDE_DIRS}
${Qt53DExtras_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${Qt3DCore_GEN_DIR}
${Qt3DRender_GEN_DIR})
set(Qt3DExtras_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DExtras_LIBRARIES})
set(Qt3DExtras_deps Qt3DRender)
diff --git a/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt
index a3366c9b..a910e30d 100644
--- a/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt
@@ -32,16 +32,12 @@ set(Qt3DInput_include_dirs
${Qt3DInput_BINARY_DIR}
${pyside2_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${Qt3DCore_GEN_DIR})
set(Qt3DInput_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DInput_LIBRARIES})
set(Qt3DInput_deps Qt3DCore)
diff --git a/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt
index 8cf4de37..09306f48 100644
--- a/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt
@@ -13,16 +13,12 @@ set(Qt3DLogic_include_dirs
${pyside2_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${Qt3DCore_GEN_DIR})
set(Qt3DLogic_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DLogic_LIBRARIES})
set(Qt3DLogic_deps Qt3DCore)
diff --git a/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt
index 011536ce..c8bf08f4 100644
--- a/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt
+++ b/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt
@@ -131,16 +131,12 @@ set(Qt3DRender_include_dirs
${pyside2_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${Qt3DCore_GEN_DIR})
set(Qt3DRender_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt53DRender_LIBRARIES})
set(Qt3DRender_deps Qt3DCore)
diff --git a/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt b/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
index 6e9492d4..d7de684b 100644
--- a/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
@@ -21,16 +21,12 @@ set(QtAxContainer_include_dirs
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR})
set(QtAxContainer_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5AxContainer_LIBRARIES}
${Qt5AxBase_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
index c7611edb..a327017a 100644
--- a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
@@ -64,16 +64,12 @@ set(QtCharts_include_dirs ${QtCharts_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Charts_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR})
set(QtCharts_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Charts_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt b/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
index 9bd5c054..b9c5e4b7 100644
--- a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
@@ -10,15 +10,12 @@ set(QtConcurrent_include_dirs ${QtConcurrent_SOURCE_DIR}
${QtConcurrent_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Concurrent_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtConcurrent_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${QtConcurrent_LIBRARIES}
+ ${Qt5Core_LIBRARIES}
)
set(QtConcurrent_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
index 25d30e8b..5725c012 100644
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
@@ -191,13 +191,9 @@ configure_file("${QtCore_SOURCE_DIR}/typesystem_core.xml.in"
set(QtCore_include_dirs ${QtCore_SOURCE_DIR}
${QtCore_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
)
set(QtCore_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
)
diff --git a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
index 59c779fb..40dafdc4 100644
--- a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
@@ -46,15 +46,11 @@ set(QtDataVisualization_include_dirs ${QtDataVisualization_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5DataVisualization_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR})
set(QtDataVisualization_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5DataVisualization_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
index f514ea7c..48354987 100644
--- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
@@ -233,14 +233,10 @@ set(QtGui_include_dirs ${QtGui_SOURCE_DIR}
${pyside2_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtGui_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Gui_LIBRARIES})
set(QtGui_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtHelp/CMakeLists.txt b/sources/pyside2/PySide2/QtHelp/CMakeLists.txt
index 102eef91..66086b60 100644
--- a/sources/pyside2/PySide2/QtHelp/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtHelp/CMakeLists.txt
@@ -23,15 +23,12 @@ set(QtHelp_include_dirs ${QtHelp_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Help_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtWidgets_GEN_DIR}
${QtGui_GEN_DIR}
${QtCore_GEN_DIR}
)
set(QtHelp_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtLocation/CMakeLists.txt b/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
index b3661325..37cc7e6e 100644
--- a/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
@@ -56,15 +56,11 @@ set(QtLocation_include_dirs ${QtLocation_SOURCE_DIR}
${QtLocation_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Location_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtPositioning_GEN_DIR})
set(QtLocation_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Location_LIBRARIES})
set(QtLocation_deps QtCore QtPositioning)
diff --git a/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt b/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt
index 28159618..efa7944b 100644
--- a/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt
@@ -16,13 +16,10 @@ set(QtMacExtras_include_dirs ${QtMacExtras_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR})
set(QtMacExtras_libraries pyside2
${Qt5MacExtras_LIBRARIES}
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt b/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt
index 71e575da..4e7642d3 100644
--- a/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt
@@ -108,16 +108,12 @@ set(QtMultimedia_include_dirs ${QtMultimedia_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5Multimedia_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtNetwork_GEN_DIR})
set(QtMultimedia_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Multimedia_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt
index 09c3ce99..7448f5f3 100644
--- a/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt
@@ -17,9 +17,7 @@ set(QtMultimediaWidgets_include_dirs ${QtMultimediaWidgets_SOURCE_DIR}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Multimedia_INCLUDE_DIRS}
${Qt5MultimediaWidgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtNetwork_GEN_DIR}
@@ -27,8 +25,6 @@ set(QtMultimediaWidgets_include_dirs ${QtMultimediaWidgets_SOURCE_DIR}
${QtMultimedia_GEN_DIR})
set(QtMultimediaWidgets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Multimedia_LIBRARIES}
${Qt5MultimediaWidgets_LIBRARIES}
${Qt5Core_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
index cd951788..52092c2a 100644
--- a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
@@ -97,14 +97,10 @@ set(QtNetwork_include_dirs ${QtNetwork_SOURCE_DIR}
${QtNetwork_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR})
set(QtNetwork_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Network_LIBRARIES})
set(QtNetwork_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
index e23cd36b..1ca245fe 100644
--- a/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
@@ -21,8 +21,6 @@ set(QtOpenGL_include_dirs ${QtOpenGL_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5OpenGL_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtWidgets_GEN_DIR}
${QtGui_GEN_DIR}
@@ -30,7 +28,6 @@ set(QtOpenGL_include_dirs ${QtOpenGL_SOURCE_DIR}
${QtOpenGL_GEN_DIR}
)
set(QtOpenGL_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt b/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
index ecbcd9f7..4745cb49 100644
--- a/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
@@ -32,14 +32,10 @@ set(QtPositioning_include_dirs ${QtPositioning_SOURCE_DIR}
${QtPositioning_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Positioning_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR})
set(QtPositioning_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Positioning_LIBRARIES})
set(QtPositioning_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt b/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt
index 31b86290..3482c68f 100644
--- a/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt
@@ -19,16 +19,12 @@ set(QtPrintSupport_include_dirs ${QtPrintSupport_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5PrintSupport_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
)
set(QtPrintSupport_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtQml/CMakeLists.txt b/sources/pyside2/PySide2/QtQml/CMakeLists.txt
index cfd1b685..9912016e 100644
--- a/sources/pyside2/PySide2/QtQml/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtQml/CMakeLists.txt
@@ -40,8 +40,6 @@ set(QtQml_include_dirs ${QtQml_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
${QtCore_GEN_DIR}
@@ -49,7 +47,6 @@ set(QtQml_include_dirs ${QtQml_SOURCE_DIR}
${QtQml_GEN_DIR})
set(QtQml_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt b/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
index 788d6d50..6707c210 100644
--- a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
@@ -65,8 +65,6 @@ set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
${Qt5Network_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
${QtCore_GEN_DIR}
@@ -75,7 +73,6 @@ set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
${QtQuick_GEN_DIR})
set(QtQuick_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt
index 76f81870..1f5ae798 100644
--- a/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt
@@ -15,8 +15,6 @@ set(QtQuickWidgets_include_dirs ${QtQuickWidgets_SOURCE_DIR}
${Qt5Quick_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5QuickWidgets_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
${QtCore_GEN_DIR}
@@ -27,7 +25,6 @@ set(QtQuickWidgets_include_dirs ${QtQuickWidgets_SOURCE_DIR}
${QtQuickWidgets_GEN_DIR})
set(QtQuickWidgets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtScript/CMakeLists.txt b/sources/pyside2/PySide2/QtScript/CMakeLists.txt
index dfcb8078..12453729 100644
--- a/sources/pyside2/PySide2/QtScript/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtScript/CMakeLists.txt
@@ -26,14 +26,10 @@ set(QtScript_include_dirs ${QtScript_SOURCE_DIR}
${QtScript_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Script_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtScript_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5Script_LIBRARIES})
set(QtScript_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt b/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt
index 39bb0adc..ddb4bec8 100644
--- a/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt
@@ -13,8 +13,6 @@ set(QtScriptTools_include_dirs ${QtScriptTools_SOURCE_DIR}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Script_INCLUDE_DIRS}
${Qt5ScriptTools_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
@@ -23,7 +21,6 @@ set(QtScriptTools_include_dirs ${QtScriptTools_SOURCE_DIR}
)
set(QtScriptTools_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtScxml/CMakeLists.txt b/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
index 35ca4642..9cf2f0b2 100644
--- a/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
@@ -37,14 +37,10 @@ set(QtScxml_include_dirs ${QtScxml_SOURCE_DIR}
${QtScxml_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Scxml_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR})
set(QtScxml_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Scxml_LIBRARIES})
set(QtScxml_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtSensors/CMakeLists.txt b/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
index 933c266c..2cdd3fe8 100644
--- a/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
@@ -83,14 +83,10 @@ set(QtSensors_include_dirs ${QtSensors_SOURCE_DIR}
${QtSensors_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Sensors_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR})
set(QtSensors_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Sensors_LIBRARIES})
set(QtSensors_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtSql/CMakeLists.txt b/sources/pyside2/PySide2/QtSql/CMakeLists.txt
index a72d0611..4abd4669 100644
--- a/sources/pyside2/PySide2/QtSql/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtSql/CMakeLists.txt
@@ -29,16 +29,12 @@ set(QtSql_include_dirs ${QtSql_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Sql_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
)
set(QtSql_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtSvg/CMakeLists.txt b/sources/pyside2/PySide2/QtSvg/CMakeLists.txt
index 9cc2539b..75b6f2bf 100644
--- a/sources/pyside2/PySide2/QtSvg/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtSvg/CMakeLists.txt
@@ -15,16 +15,12 @@ set(QtSvg_include_dirs ${QtSvg_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Svg_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
)
set(QtSvg_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtTest/CMakeLists.txt b/sources/pyside2/PySide2/QtTest/CMakeLists.txt
index ac325ed9..6614bbca 100644
--- a/sources/pyside2/PySide2/QtTest/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtTest/CMakeLists.txt
@@ -19,16 +19,12 @@ set(QtTest_include_dirs ${QtTest_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Test_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
)
set(QtTest_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Test_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5Gui_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt b/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt
index d9e827c0..c3080c03 100644
--- a/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt
@@ -12,14 +12,10 @@ set(QtTextToSpeech_include_dirs ${QtTextToSpeech_SOURCE_DIR}
${QtTextToSpeech_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5TextToSpeech_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR})
set(QtTextToSpeech_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Multimedia_LIBRARIES}
${Qt5TextToSpeech_LIBRARIES}
${Qt5Core_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt b/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt
index fc034ec1..1ae44d4f 100644
--- a/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt
@@ -18,8 +18,6 @@ set(QtUiTools_include_dirs ${QtUiTools_SOURCE_DIR}
${Qt5Xml_INCLUDE_DIRS}
${Qt5Designer_INCLUDE_DIRS}
${Qt5UiTools_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${plugins_SOURCE_DIR}
${QtCore_GEN_DIR}
@@ -29,7 +27,6 @@ set(QtUiTools_include_dirs ${QtUiTools_SOURCE_DIR}
)
set(QtUiTools_libraries pyside2
uiplugin
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5UiTools_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt b/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt
index c06c690a..58957b21 100644
--- a/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt
@@ -11,14 +11,10 @@ set(QtWebChannel_include_dirs ${QtWebChannel_SOURCE_DIR}
${QtWebChannel_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5WebChannel_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtWebChannel_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebChannel_LIBRARIES}
${Qt5Core_LIBRARIES}
)
diff --git a/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt
index dc673ad0..25e11d5d 100644
--- a/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt
@@ -10,14 +10,10 @@ set(QtWebEngine_include_dirs
${QtWebEngine_SOURCE_DIR}
${QtWebEngine_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtWebEngine_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebEngine_LIBRARIES}
${Qt5Core_LIBRARIES}
)
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
index 93ff6f5c..74c11273 100644
--- a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
@@ -20,14 +20,10 @@ set(QtWebEngineCore_include_dirs
${QtWebEngineCore_SOURCE_DIR}
${QtWebEngineCore_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtWebEngineCore_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebEngineCore_LIBRARIES}
${Qt5Core_LIBRARIES}
)
diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
index 68b0a632..555be9c4 100644
--- a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
@@ -26,9 +26,7 @@ set(QtWebEngineWidgets_include_dirs
${Qt5Network_INCLUDE_DIRS}
${Qt5WebChannel_INCLUDE_DIRS}
${Qt5WebEngineWidgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
@@ -38,8 +36,6 @@ set(QtWebEngineWidgets_include_dirs
${QtWebEngineCore_GEN_DIR}
)
set(QtWebEngineWidgets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebEngineWidgets_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5WebChannel_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt b/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt
index 76f64745..cc03b14b 100644
--- a/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt
@@ -12,17 +12,13 @@ set(QtWebKit_include_dirs ${QtWebKit_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5WebKit_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
${QtNetwork_GEN_DIR}
)
set(QtWebKit_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebKit_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5Gui_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt
index 7422a05d..4ace240c 100644
--- a/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt
@@ -39,9 +39,7 @@ set(QtWebKitWidgets_include_dirs
${Qt5PrintSupport_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5WebKitWidgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
@@ -50,8 +48,6 @@ set(QtWebKitWidgets_include_dirs
${QtNetwork_GEN_DIR}
)
set(QtWebKitWidgets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebKit_LIBRARIES}
${Qt5WebKitWidgets_LIBRARIES}
${Qt5Network_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt
index 98f85f9a..a28c633a 100644
--- a/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt
@@ -15,16 +15,12 @@ set(QtWebSockets_include_dirs ${QtWebSockets_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5WebSockets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtWebSockets_GEN_DIR}
${QtNetwork_GEN_DIR}
)
set(QtWebSockets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5WebSockets_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5Core_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
index 4267c116..102c0ee1 100644
--- a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
@@ -216,15 +216,11 @@ set(QtWidgets_include_dirs ${QtWidgets_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
)
set(QtWidgets_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt b/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
index 9729d319..cf308c31 100644
--- a/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
@@ -24,13 +24,10 @@ set(QtWinExtras_include_dirs ${QtWinExtras_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR})
set(QtWinExtras_libraries pyside2
${Qt5WinExtras_LIBRARIES}
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt b/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt
index fc0b21f1..8bc1a7ff 100644
--- a/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt
@@ -16,13 +16,10 @@ set(QtX11Extras_include_dirs ${QtX11Extras_SOURCE_DIR}
${Qt5Gui_INCLUDE_DIRS}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR})
set(QtX11Extras_libraries pyside2
${Qt5X11Extras_LIBRARIES}
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES})
diff --git a/sources/pyside2/PySide2/QtXml/CMakeLists.txt b/sources/pyside2/PySide2/QtXml/CMakeLists.txt
index 7a6a707b..f17a7724 100644
--- a/sources/pyside2/PySide2/QtXml/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtXml/CMakeLists.txt
@@ -38,17 +38,12 @@ ${QtXml_GEN_DIR}/qtxml_module_wrapper.cpp
set(QtXml_include_dirs ${QtXml_SOURCE_DIR}
${QtXml_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Xml_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
${QtCore_GEN_DIR}
)
set(QtXml_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt5Xml_LIBRARIES})
set(QtXml_deps QtCore)
diff --git a/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt b/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt
index d9e93651..696c09c1 100644
--- a/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt
@@ -24,13 +24,10 @@ set(QtXmlPatterns_include_dirs ${QtXmlPatterns_SOURCE_DIR}
${QtXmlPatterns_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5XmlPatterns_INCLUDE_DIRS}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
)
set(QtXmlPatterns_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5XmlPatterns_LIBRARIES})
set(QtXmlPatterns_deps QtCore)
diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
index f1913d03..a92ee76f 100644
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ b/sources/pyside2/PySide2/support/generate_pyi.py
@@ -279,13 +279,6 @@ def generate_all_pyi(outpath, options):
sys.path[0:0] = sys_path
pypath = ps.join(sys_path)
os.environ["PYTHONPATH"] = pypath
- if options.lib_path:
- # the path changes are automatically propagated to subprocesses
- ospath_var = "PATH" if sys.platform == "win32" else "LD_LIBRARY_PATH"
- old_val = os.environ.get(ospath_var, "")
- lib_path = [os.path.normpath(_) for _ in options.lib_path]
- ospath = ps.join(lib_path + old_val.split(ps))
- os.environ[ospath_var] = ospath
# now we can import
global PySide2, inspect, HintingEnumerator
@@ -336,8 +329,6 @@ if __name__ == "__main__":
help="the output directory (default = binary location)")
parser_run.add_argument("--sys-path", nargs="+",
help="a list of strings prepended to sys.path")
- parser_run.add_argument("--lib-path", nargs="+",
- help="a list of strings prepended to LD_LIBRARY_PATH (unix) or PATH (windows)")
options = parser.parse_args()
if options.command == "run":
if options.quiet:
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index 2cbda397..919980e3 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -121,7 +121,7 @@ macro(create_pyside_module)
add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
BYPRODUCTS ${${module_SOURCES}}
- COMMAND "${SHIBOKEN_BINARY}" ${GENERATOR_EXTRA_FLAGS}
+ COMMAND Shiboken2::shiboken2 ${GENERATOR_EXTRA_FLAGS}
"${pyside2_BINARY_DIR}/${module_NAME}_global.h"
--include-paths=${shiboken_include_dirs}
${shiboken_framework_include_dirs_option}
@@ -142,7 +142,7 @@ macro(create_pyside_module)
${${module_STATIC_SOURCES}})
set_target_properties(${module_NAME} PROPERTIES
PREFIX ""
- OUTPUT_NAME "${module_NAME}${PYTHON_EXTENSION_SUFFIX}"
+ OUTPUT_NAME "${module_NAME}${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}"
LIBRARY_OUTPUT_DIRECTORY ${pyside2_BINARY_DIR})
if(WIN32)
set_target_properties(${module_NAME} PROPERTIES SUFFIX ".pyd")
@@ -151,21 +151,33 @@ macro(create_pyside_module)
endif()
target_link_libraries(${module_NAME} ${${module_LIBRARIES}})
+ target_link_libraries(${module_NAME} Shiboken2::libshiboken)
if(${module_DEPS})
add_dependencies(${module_NAME} ${${module_DEPS}})
endif()
create_generator_target(${module_NAME})
# build type hinting stubs
- set(generate_pyi_options run --skip --sys-path "${CMAKE_BINARY_DIR}"
- "${CMAKE_BINARY_DIR}/../shiboken2/shibokenmodule"
- --lib-path "${CMAKE_BINARY_DIR}/libpyside"
- "${CMAKE_BINARY_DIR}/../shiboken2/libshiboken")
+
+ # Need to set the LD_ env vars before invoking the script, because it might use build-time
+ # libraries instead of install time libraries.
+ if (WIN32)
+ set(ld_prefix "PATH=")
+ elseif(APPLE)
+ set(ld_prefix "DYLD_LIBRARY_PATH=")
+ else()
+ set(ld_prefix "LD_LIBRARY_PATH=")
+ endif()
+ set(ld_prefix "${ld_prefix}${pysidebindings_BINARY_DIR}/libpyside${PATH_SEP}${SHIBOKEN_SHARED_LIBRARY_DIR}")
+ set(generate_pyi_options run --skip --sys-path
+ "${pysidebindings_BINARY_DIR}"
+ "${SHIBOKEN_PYTHON_MODULE_DIR}")
if (QUIET_BUILD)
list(APPEND generate_pyi_options "--quiet")
endif()
add_custom_command( TARGET ${module_NAME} POST_BUILD
- COMMAND "${SHIBOKEN_PYTHON_INTERPRETER}"
+ COMMAND ${CMAKE_COMMAND} -E env ${ld_prefix}
+ "${SHIBOKEN_PYTHON_INTERPRETER}"
"${CMAKE_CURRENT_SOURCE_DIR}/../support/generate_pyi.py" ${generate_pyi_options})
# install
install(TARGETS ${module_NAME} LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}/PySide2")
diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt
index 428b8335..eb5200e8 100644
--- a/sources/pyside2/doc/CMakeLists.txt
+++ b/sources/pyside2/doc/CMakeLists.txt
@@ -103,7 +103,7 @@ add_custom_target(apidoc
configure_file("conf.py.in" "rst/conf.py" @ONLY)
add_custom_target("docrsts"
- COMMAND ${SHIBOKEN_BINARY} --generator-set=qtdoc ${docHeader}
+ COMMAND Shiboken2::shiboken2 --generator-set=qtdoc ${docHeader}
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${TS_ROOT}"
--api-version=${SUPPORTED_QT_VERSION}
--typesystem-paths="${QDOC_TYPESYSTEM_PATH}"
diff --git a/sources/pyside2/libpyside/CMakeLists.txt b/sources/pyside2/libpyside/CMakeLists.txt
index ec6713b6..7b8adfc8 100644
--- a/sources/pyside2/libpyside/CMakeLists.txt
+++ b/sources/pyside2/libpyside/CMakeLists.txt
@@ -78,18 +78,24 @@ file(GLOB setup_folder_py_files "../../../*.py")
set(other_files ${pyside_folder_py_files} ${setup_folder_py_files})
add_other_files(${other_files})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}
- ${SHIBOKEN_INCLUDE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${QML_INCLUDES}
- ${Qt5Core_INCLUDE_DIRS}
- ${Qt5Core_PRIVATE_INCLUDE_DIRS})
add_library(pyside2 SHARED ${libpyside_SRC} ${other_files})
+add_library(PySide2::pyside2 ALIAS pyside2)
+
+target_include_directories(pyside2 PRIVATE
+ ${QML_INCLUDES}
+ ${Qt5Core_PRIVATE_INCLUDE_DIRS}
+ ${Qt5Core_INCLUDE_DIRS}
+)
+
+target_include_directories(pyside2 PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include/PySide2>
+)
+
target_link_libraries(pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
- ${QML_LIBRARIES}
- ${Qt5Core_LIBRARIES})
+ PRIVATE Shiboken2::libshiboken
+ PRIVATE ${QML_LIBRARIES}
+ PRIVATE ${Qt5Core_LIBRARIES})
set_target_properties(pyside2 PROPERTIES
VERSION ${BINDING_API_VERSION}
@@ -142,25 +148,58 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_T
# create pkg-config file
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pyside2.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/pyside2${pyside2_SUFFIX}.pc" @ONLY)
-# create cmake-config files
+
+# for creating cmake-config files
+include(CMakePackageConfigHelpers)
+
+# Build-tree / super project package config file.
+set(PYSIDE_PYTHONPATH "${pysidebindings_BINARY_DIR}/PySide2")
+set(PYSIDE_TYPESYSTEMS "${pysidebindings_SOURCE_DIR}/PySide2/templates/")
+set(PYSIDE_GLUE "${pysidebindings_SOURCE_DIR}/PySide2/glue")
+
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
+ PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
+ INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+set(PYSIDE_PYTHONPATH "${PYTHON_SITE_PACKAGES}/PySide2")
+set(PYSIDE_TYPESYSTEMS "${CMAKE_INSTALL_PREFIX}/share/PySide2${pyside2_SUFFIX}/typesystems")
+set(PYSIDE_GLUE "${CMAKE_INSTALL_PREFIX}/share/PySide2${pyside2_SUFFIX}/glue")
+
+# Install-tree / relocatable package config file.
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/install/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}"
+ PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
+)
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake" @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config-spec.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2ConfigVersion.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PySide2ConfigVersion.cmake" @ONLY)
install(FILES ${libpyside_HEADERS}
DESTINATION include/${BINDING_NAME}${pyside2_SUFFIX})
-install(TARGETS pyside2 EXPORT pyside2
+
+install(TARGETS pyside2 EXPORT PySide2Targets
LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
RUNTIME DESTINATION bin)
+install(EXPORT PySide2Targets NAMESPACE PySide2::
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside2${pyside2_SUFFIX}.pc"
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2ConfigVersion.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
diff --git a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
index afb81f5a..9f0ae236 100644
--- a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
+++ b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
@@ -1,19 +1,16 @@
-# PYSIDE_INCLUDE_DIR - Directories to include to use PySide2
-# PYSIDE_LIBRARY - Files to link against to use PySide2
# PYSIDE_PYTHONPATH - Path to where the PySide2 Python module files could be found
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide2
+# PYSIDE_GLUE - Path to module glue files.
-SET(PYSIDE_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PySide2@pyside2_SUFFIX@")
-# Platform specific library names
-if(MSVC)
- SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@.lib")
-elseif(CYGWIN)
- SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
-elseif(WIN32)
- SET(PYSIDE_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
-else()
- SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+@PACKAGE_INIT@
+
+# Import targets only when using an installed PySide2 config file (so not during a regular
+# PySide2 build, or during a super project build).
+if (NOT TARGET PySide2::pyside2)
+ include("${CMAKE_CURRENT_LIST_DIR}/PySide2Targets.cmake")
endif()
-SET(PYSIDE_PYTHONPATH "@PYTHON_SITE_PACKAGES@")
-SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems")
-SET(PYSIDE_GLUE "@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/glue")
+
+# Set relocatable variables.
+set_and_check(PYSIDE_PYTHONPATH "@PACKAGE_PYSIDE_PYTHONPATH@")
+set_and_check(PYSIDE_TYPESYSTEMS "@PACKAGE_PYSIDE_TYPESYSTEMS@")
+set_and_check(PYSIDE_GLUE "@PACKAGE_PYSIDE_GLUE@")
diff --git a/sources/pyside2/libpyside/PySide2Config.cmake.in b/sources/pyside2/libpyside/PySide2Config.cmake.in
index 352a8999..c5c1f44b 100644
--- a/sources/pyside2/libpyside/PySide2Config.cmake.in
+++ b/sources/pyside2/libpyside/PySide2Config.cmake.in
@@ -2,4 +2,4 @@ if (NOT PYTHON_CONFIG_SUFFIX)
message(STATUS "PySide2Config: Using default python: @SHIBOKEN_PYTHON_CONFIG_SUFFIX@")
SET(PYTHON_CONFIG_SUFFIX @SHIBOKEN_PYTHON_CONFIG_SUFFIX@)
endif()
-include(@LIB_INSTALL_DIR@/cmake/PySide2-@BINDING_API_VERSION@/PySide2Config${PYTHON_CONFIG_SUFFIX}.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/PySide2Config${PYTHON_CONFIG_SUFFIX}.cmake)
diff --git a/sources/pyside2/plugins/CMakeLists.txt b/sources/pyside2/plugins/CMakeLists.txt
index 0933cebb..f3957554 100644
--- a/sources/pyside2/plugins/CMakeLists.txt
+++ b/sources/pyside2/plugins/CMakeLists.txt
@@ -9,10 +9,7 @@ set(ui_plugin_moc
customwidget.h
customwidgets.h
)
-
-include_directories(${Qt5Designer_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR})
+include_directories(${Qt5Designer_INCLUDE_DIRS})
qt5_wrap_cpp(MOC_FILES ${ui_plugin_moc})
add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
@@ -27,8 +24,7 @@ endif()
target_link_libraries(uiplugin
${Qt5UiTools_LIBRARY}
- ${SHIBOKEN_LIBRARY}
- ${SHIBOKEN_PYTHON_LIBRARY})
+ Shiboken2::libshiboken)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
else()
diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside2/tests/CMakeLists.txt
index 4289012a..08585252 100644
--- a/sources/pyside2/tests/CMakeLists.txt
+++ b/sources/pyside2/tests/CMakeLists.txt
@@ -8,8 +8,8 @@ else()
# tests/QtWidgets/qstandarditemmodel_test.py needs shiboken2
# tests/QtWidgets/qlabel_test.py needs shiboken2
if(WIN32)
- set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${CMAKE_BINARY_DIR}/tests/pysidetest;${CMAKE_BINARY_DIR}/../shiboken2/shibokenmodule;$ENV{PYTHONPATH}")
- set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};${SHIBOKEN_INCLUDE_DIR}/../../bin;$ENV{PATH}")
+ set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${CMAKE_BINARY_DIR}/tests/pysidetest;${SHIBOKEN_PYTHON_MODULE_DIR};$ENV{PYTHONPATH}")
+ set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};${SHIBOKEN_SHARED_LIBRARY_DIR};$ENV{PATH}")
set(LIBRARY_PATH_VAR "PATH")
string(REPLACE "\\" "/" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
string(REPLACE "\\" "/" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index 119553fa..1b1baf39 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -68,8 +68,8 @@ make_path(testbinding_typesystem_path ${pyside2_SOURCE_DIR}
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
-BYPRODUCTS ${testbinding_SRC}
-COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS}
+ BYPRODUCTS ${testbinding_SRC}
+ COMMAND Shiboken2::shiboken2 ${GENERATOR_EXTRA_FLAGS}
${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h
--include-paths=${testbinding_include_dirs}
${shiboken_framework_include_dirs_option}
@@ -86,16 +86,15 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
${pyside2_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
- ${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR})
+ ${libpyside_SOURCE_DIR})
add_library(pysidetest SHARED ${pysidetest_SRC} ${pysidetest_MOC_SRC})
target_link_libraries(pysidetest
+ Shiboken2::libshiboken
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
@@ -103,7 +102,7 @@ target_link_libraries(pysidetest
add_library(testbinding MODULE ${testbinding_SRC})
set_property(TARGET testbinding PROPERTY PREFIX "")
-set_property(TARGET testbinding PROPERTY OUTPUT_NAME "testbinding${PYTHON_EXTENSION_SUFFIX}")
+set_property(TARGET testbinding PROPERTY OUTPUT_NAME "testbinding${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}")
if(WIN32)
set_property(TARGET testbinding PROPERTY SUFFIX ".pyd")
endif()
@@ -111,11 +110,10 @@ target_link_libraries(testbinding
pysidetest
pyside2
${PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
+ Shiboken2::libshiboken
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
- ${Qt5Widgets_LIBRARIES}
- ${SBK_PYTHON_LIBRARIES})
+ ${Qt5Widgets_LIBRARIES})
add_dependencies(testbinding pyside2 QtCore QtGui QtWidgets pysidetest)
create_generator_target(testbinding)
diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py
index ca2b2cb6..a324c36a 100644
--- a/sources/pyside2/tests/registry/init_platform.py
+++ b/sources/pyside2/tests/registry/init_platform.py
@@ -73,7 +73,13 @@ elif os.path.exists(history_dir):
fpath = os.path.join(history_dir, last_build, "build_dir.txt")
if os.path.exists(fpath):
with open(fpath) as f:
- all_build_dir = f.read().strip()
+ f_contents = f.read().strip()
+ f_contents_split = f_contents.splitlines()
+ try:
+ all_build_dir = f_contents_split[0]
+ except IndexError:
+ print("Error: can't find the build dir in the given file '{}'".format(fpath))
+ sys.exit(1)
else:
print(dedent("""
Can't find the build dir in the history.
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index b4fd1cb9..add5221c 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -17,10 +17,6 @@ if (NOT DISABLE_DOCSTRINGS)
endif()
endif()
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Release)
-endif()
-
if(BUILD_TESTS)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests)
endif ()
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 01efddaa..1e52c429 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -5,14 +5,14 @@ include(CheckIncludeFileCXX)
cmake_minimum_required(VERSION 3.1)
cmake_policy(VERSION 3.1)
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake_helpers/
- ${CMAKE_MODULE_PATH})
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_helpers/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data/")
+
include(helpers)
+include(shiboken_helpers)
find_package(Qt5 5.12 REQUIRED COMPONENTS Core Xml XmlPatterns)
-add_definitions(${Qt5Core_DEFINITIONS})
-
option(BUILD_TESTS "Build tests." TRUE)
option(USE_PYTHON_VERSION "Use specific python version to build shiboken2." "")
@@ -36,11 +36,9 @@ if (QUIET_BUILD)
endif()
if (USE_PYTHON_VERSION)
- find_package(PythonInterp ${USE_PYTHON_VERSION} REQUIRED)
- find_package(PythonLibs ${USE_PYTHON_VERSION} REQUIRED)
+ shiboken_find_required_python(${USE_PYTHON_VERSION})
else()
- find_package(PythonInterp 2.7)
- find_package(PythonLibs 2.7)
+ shiboken_find_required_python()
endif()
macro(get_python_arch)
@@ -153,7 +151,7 @@ if (NOT CLANG_INCLUDE_FOUND)
package? (e.g. libclang-6.0-dev)")
endif()
-set(SHIBOKEN_VERSION_FILE_PATH "${CMAKE_SOURCE_DIR}/shiboken_version.py")
+set(SHIBOKEN_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/shiboken_version.py")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
${SHIBOKEN_VERSION_FILE_PATH}
)
@@ -219,34 +217,7 @@ endif()
option(FORCE_LIMITED_API "Enable the limited API." "yes")
set(PYTHON_LIMITED_API 0)
-# On Windows, PYTHON_LIBRARIES can be a list. Example:
-# optimized;C:/Python36/libs/python36.lib;debug;C:/Python36/libs/python36_d.lib
-# On other platforms, this result is not used at all.
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "if True:
- for lib in '${PYTHON_LIBRARIES}'.split(';'):
- if '/' in lib:
- prefix, py = lib.rsplit('/', 1)
- if py.startswith('python3'):
- print(prefix + '/python3.lib')
- break
- "
- OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if(FORCE_LIMITED_API STREQUAL "yes")
- if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND ${PYTHON_VERSION_MINOR} GREATER 4)
- # GREATER_EQUAL is available only from cmake 3.7 on. We mean python 3.5 .
- add_definitions("-DPy_LIMITED_API=0x03050000")
- set(PYTHON_LIMITED_API 1)
- endif()
- if(WIN32)
- if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND ${PYTHON_VERSION_MINOR} GREATER 4)
- # PYSIDE-560: XXX maybe add an option to setup.py as override
- set(SBK_PYTHON_LIBRARIES ${PYTHON_LIMITED_LIBRARIES})
- endif()
- endif()
-endif()
+shiboken_check_if_limited_api()
if (PYTHON_LIMITED_API)
if (WIN32 AND NOT EXISTS "${PYTHON_LIMITED_LIBRARIES}")
@@ -270,8 +241,10 @@ if (NOT PYTHON_CONFIG_SUFFIX)
else()
set(PYTHON_EXTENSION_SUFFIX ".abi3")
endif()
+ set(PYTHON_CONFIG_SUFFIX ".abi3")
+ else()
+ set(PYTHON_CONFIG_SUFFIX "${PYTHON_EXTENSION_SUFFIX}")
endif()
- set(PYTHON_CONFIG_SUFFIX "${PYTHON_EXTENSION_SUFFIX}")
endif()
endif()
@@ -285,6 +258,10 @@ if (NOT PYTHON_SHARED_LIBRARY_SUFFIX)
endif()
endif()
+if (NOT PYTHON_CONFIG_SUFFIX)
+ message(FATAL_ERROR
+ "PYTHON_CONFIG_SUFFIX is empty. It should never be empty. Please file a bug report.")
+endif()
message(STATUS "PYTHON_EXTENSION_SUFFIX: ${PYTHON_EXTENSION_SUFFIX}")
message(STATUS "PYTHON_CONFIG_SUFFIX: ${PYTHON_CONFIG_SUFFIX}")
@@ -318,7 +295,6 @@ else()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
if(ENABLE_GCC_OPTIMIZATION)
- set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Os -Wl,-O1")
if(NOT CMAKE_HOST_APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--hash-style=gnu")
@@ -334,7 +310,8 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
-set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+set(BIN_INSTALL_DIR "bin" CACHE PATH "The subdirectory relative to the install prefix where dlls will be installed (default is /bin)" FORCE)
if (WIN32)
set(PATH_SEP "\;")
@@ -408,16 +385,15 @@ execute_process(
OUTPUT_VARIABLE PYTHON_WITH_COUNT_ALLOCS
OUTPUT_STRIP_TRAILING_WHITESPACE)
-set(SHIBOKEN_BUILD_TYPE "Release")
-
-# We do not want to link against the python shared / static library on Linux and macOS.
-# The dynamic linker will pick up the python symbols at runtime automatically.
-# On Windows we do need to link against the python.lib import library.
-if (NOT SBK_PYTHON_LIBRARIES)
- set(SBK_PYTHON_LIBRARIES "")
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
endif()
+set(SHIBOKEN_BUILD_TYPE "Release")
+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(SHIBOKEN_BUILD_TYPE "Debug")
+
if(NOT PYTHON_DEBUG_LIBRARIES)
message(WARNING "Python debug shared library not found; assuming python was built with shared library support disabled.")
endif()
@@ -425,38 +401,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT PYTHON_WITH_DEBUG)
message(WARNING "Compiling shiboken2 with debug enabled, but the python executable was not compiled with debug support.")
else()
- add_definitions("-DPy_DEBUG")
- set(SBK_ADD_PY_DEBUG_DEFINITION "add_definitions(\"-DPy_DEBUG\")")
set(SBK_PKG_CONFIG_PY_DEBUG_DEFINITION " -DPy_DEBUG")
endif()
if (PYTHON_WITH_COUNT_ALLOCS)
- add_definitions("-DCOUNT_ALLOCS")
- set(SBK_ADD_PY_DEBUG_DEFINITION "${SBK_ADD_PY_DEBUG_DEFINITION} \nadd_definitions(\"-DCOUNT_ALLOCS\")")
set(SBK_PKG_CONFIG_PY_DEBUG_DEFINITION "${SBK_PKG_CONFIG_PY_DEBUG_DEFINITION} -DCOUNT_ALLOCS")
endif()
-
- if(WIN32 AND NOT SBK_PYTHON_LIBRARIES)
- set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
- endif()
- set(SHIBOKEN_BUILD_TYPE "Debug")
-endif()
-
-if(CMAKE_BUILD_TYPE STREQUAL "Release")
- add_definitions("-DNDEBUG")
- if(WIN32 AND NOT SBK_PYTHON_LIBRARIES)
- set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
- endif()
-endif()
-
-
-if(APPLE)
- set(SBK_PYTHON_LIBRARIES "-undefined dynamic_lookup")
-endif()
-if(CMAKE_VERSION VERSION_LESS 2.8)
- set(SBK_PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_PATH})
-else()
- set(SBK_PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIRS})
endif()
add_subdirectory(ApiExtractor)
diff --git a/sources/shiboken2/data/CMakeLists.txt b/sources/shiboken2/data/CMakeLists.txt
index d248ceb3..e7ce9545 100644
--- a/sources/shiboken2/data/CMakeLists.txt
+++ b/sources/shiboken2/data/CMakeLists.txt
@@ -8,10 +8,37 @@ add_custom_target(data)
add_dependencies(data shiboken2)
get_target_property(SHIBOKEN_GENERATOR shiboken2 OUTPUT_NAME)
+include(CMakePackageConfigHelpers)
+
+# Build-tree / super project package config file.
+set(SHIBOKEN_PYTHON_MODULE_DIR "${shiboken2_BINARY_DIR}/shibokenmodule")
+set(SHIBOKEN_SHARED_LIBRARY_DIR "${shiboken2_BINARY_DIR}/libshiboken")
+
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/Shiboken2Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
+ PATH_VARS SHIBOKEN_PYTHON_MODULE_DIR SHIBOKEN_SHARED_LIBRARY_DIR
+ INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+# Install-tree / relocatable package config file.
+set(SHIBOKEN_PYTHON_MODULE_DIR "${PYTHON_SITE_PACKAGES}/shiboken2")
+if (WIN32)
+ set(SHIBOKEN_SHARED_LIBRARY_DIR "${BIN_INSTALL_DIR}")
+else()
+ set(SHIBOKEN_SHARED_LIBRARY_DIR "${LIB_INSTALL_DIR}")
+endif()
+
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/Shiboken2Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/install/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}"
+ PATH_VARS SHIBOKEN_PYTHON_MODULE_DIR SHIBOKEN_SHARED_LIBRARY_DIR
+)
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken2Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Shiboken2Config.cmake" @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken2Config-spec.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken2ConfigVersion.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Shiboken2ConfigVersion.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken2.pc.in"
@@ -19,10 +46,16 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken2.pc.in"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken2Config.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}")
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake"
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken2ConfigVersion.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}")
+
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/shiboken_helpers.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/shiboken2${shiboken2_SUFFIX}.pc"
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
diff --git a/sources/shiboken2/data/Shiboken2Config-spec.cmake.in b/sources/shiboken2/data/Shiboken2Config-spec.cmake.in
index 576bed0e..db837380 100644
--- a/sources/shiboken2/data/Shiboken2Config-spec.cmake.in
+++ b/sources/shiboken2/data/Shiboken2Config-spec.cmake.in
@@ -1,32 +1,41 @@
-# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
-# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
-# SHIBOKEN_BINARY - Executable name
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
# SHIBOKEN_PYTHON_INTERPRETER - Python interpreter (regular or debug) to be used with the bindings.
-# SHIBOKEN_PYTHON_LIBRARIES - Python libraries (regular or debug) Shiboken is linked against.
-
-SET(SHIBOKEN_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/shiboken2@shiboken2_SUFFIX@")
-if(MSVC)
- SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@.lib")
-elseif(CYGWIN)
- SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_IMPORT_LIBRARY_PREFIX@shiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
-elseif(WIN32)
- SET(SHIBOKEN_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
-else()
- SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+
+@PACKAGE_INIT@
+
+# This is the version of Python against which Shiboken was built. Not necessarily the version
+# against which a downstream project is built (e.g. PySide2).
+set(SHIBOKEN_PYTHON_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@")
+set(SHIBOKEN_PYTHON_VERSION_MINOR "@PYTHON_VERSION_MINOR@")
+set(SHIBOKEN_PYTHON_VERSION_PATCH "@PYTHON_VERSION_PATCH@")
+set(SHIBOKEN_PYTHON_LIMITED_API "@PYTHON_LIMITED_API@")
+
+# Import targets and call variable set up functions only when using an installed shiboken config
+# file (so not during a regular shiboken build, or during a super project build).
+if (NOT TARGET Shiboken2::shiboken2)
+ include("${CMAKE_CURRENT_LIST_DIR}/Shiboken2Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/shiboken_helpers.cmake")
+
+ # Compute the python include and libraries path if needed (aka not part of super project build).
+ shiboken_find_required_python(@PYTHON_VERSION_MAJOR@)
+ shiboken_check_if_built_and_target_python_are_compatible()
+ shiboken_check_if_limited_api()
+ shiboken_compute_python_includes(IS_CALLED_FROM_EXPORT)
+ shiboken_compute_python_libraries(IS_CALLED_FROM_EXPORT)
endif()
-SET(SHIBOKEN_PYTHON_INCLUDE_DIR "@SBK_PYTHON_INCLUDE_DIR@")
-SET(SHIBOKEN_PYTHON_INCLUDE_DIR "@SBK_PYTHON_INCLUDE_DIR@")
-SET(SHIBOKEN_PYTHON_INTERPRETER "@PYTHON_EXECUTABLE@")
-SET(SHIBOKEN_PYTHON_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@")
-SET(SHIBOKEN_PYTHON_VERSION_MINOR "@PYTHON_VERSION_MINOR@")
-SET(SHIBOKEN_PYTHON_VERSION_PATCH "@PYTHON_VERSION_PATCH@")
-SET(SHIBOKEN_PYTHON_LIBRARIES "@SBK_PYTHON_LIBRARIES@")
-SET(SHIBOKEN_PYTHON_EXTENSION_SUFFIX "@PYTHON_EXTENSION_SUFFIX@")
-SET(SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX "@PYTHON_SHARED_LIBRARY_SUFFIX@")
-SET(SHIBOKEN_PYTHON_CONFIG_SUFFIX "@PYTHON_CONFIG_SUFFIX@")
-SET(SHIBOKEN_SO_VERSION "@shiboken2_library_so_version@")
-message(STATUS "libshiboken built for @SHIBOKEN_BUILD_TYPE@")
-@SBK_ADD_PY_DEBUG_DEFINITION@
-set(SHIBOKEN_BINARY "@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR@")
+# Get the "python interpreter" dynamic global property as a variable instead. It brings it into
+# scope for super project builds.
+get_property(SHIBOKEN_PYTHON_INTERPRETER GLOBAL PROPERTY SHIBOKEN_PYTHON_INTERPRETER)
+
+# Set static variables.
+set(SHIBOKEN_PYTHON_EXTENSION_SUFFIX "@PYTHON_EXTENSION_SUFFIX@")
+set(SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX "@PYTHON_SHARED_LIBRARY_SUFFIX@")
+set(SHIBOKEN_PYTHON_CONFIG_SUFFIX "@PYTHON_CONFIG_SUFFIX@")
+set(SHIBOKEN_SO_VERSION "@shiboken2_library_so_version@")
+set(SHIBOKEN_BUILD_TYPE "@SHIBOKEN_BUILD_TYPE@")
+
+set_and_check(SHIBOKEN_PYTHON_MODULE_DIR "@PACKAGE_SHIBOKEN_PYTHON_MODULE_DIR@")
+set_and_check(SHIBOKEN_SHARED_LIBRARY_DIR "@PACKAGE_SHIBOKEN_SHARED_LIBRARY_DIR@")
+
+message(STATUS "libshiboken built for @SHIBOKEN_BUILD_TYPE@")
diff --git a/sources/shiboken2/data/Shiboken2Config.cmake.in b/sources/shiboken2/data/Shiboken2Config.cmake.in
index 7891c5a2..e13bd2a1 100644
--- a/sources/shiboken2/data/Shiboken2Config.cmake.in
+++ b/sources/shiboken2/data/Shiboken2Config.cmake.in
@@ -2,4 +2,4 @@ if (NOT PYTHON_CONFIG_SUFFIX)
message(STATUS "Shiboken2Config: Using default python: @PYTHON_CONFIG_SUFFIX@")
SET(PYTHON_CONFIG_SUFFIX @PYTHON_CONFIG_SUFFIX@)
endif()
-include("@LIB_INSTALL_DIR@/cmake/Shiboken2-@shiboken2_VERSION@/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake")
diff --git a/sources/shiboken2/data/shiboken2.pc.in b/sources/shiboken2/data/shiboken2.pc.in
index 99a26298..10db59e1 100644
--- a/sources/shiboken2/data/shiboken2.pc.in
+++ b/sources/shiboken2/data/shiboken2.pc.in
@@ -4,10 +4,10 @@ libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include/shiboken2
generator_location=@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR@
python_interpreter=@PYTHON_EXECUTABLE@
-python_include_dir=@SBK_PYTHON_INCLUDE_DIR@
+python_include_dir=@PYTHON_INCLUDE_DIRS@
Name: shiboken2
Description: Support library for Python bindings created with the Shiboken2 generator.
Version: @shiboken2_VERSION@
-Libs: @SBK_PYTHON_LIBRARIES@ -L${libdir} -lshiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
-Cflags: -I@SBK_PYTHON_INCLUDE_DIR@ -I${includedir}/@shiboken2_SUFFIX@@SBK_PKG_CONFIG_PY_DEBUG_DEFINITION@
+Libs: @SHIBOKEN_PYTHON_LIBRARIES@ -L${libdir} -lshiboken2@shiboken2_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
+Cflags: -I@PYTHON_INCLUDE_DIRS@ -I${includedir}/@shiboken2_SUFFIX@@SBK_PKG_CONFIG_PY_DEBUG_DEFINITION@
diff --git a/sources/shiboken2/data/shiboken_helpers.cmake b/sources/shiboken2/data/shiboken_helpers.cmake
new file mode 100644
index 00000000..c55ee89f
--- /dev/null
+++ b/sources/shiboken2/data/shiboken_helpers.cmake
@@ -0,0 +1,201 @@
+include(CMakeParseArguments)
+
+macro(shiboken_parse_all_arguments prefix type flags options multiopts)
+ cmake_parse_arguments(${prefix} "${flags}" "${options}" "${multiopts}" ${ARGN})
+ if(DEFINED ${prefix}_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments were passed to ${type} (${${prefix}_UNPARSED_ARGUMENTS}).")
+ endif()
+endmacro()
+
+macro(shiboken_check_if_limited_api)
+ # On Windows, PYTHON_LIBRARIES can be a list. Example:
+ # optimized;C:/Python36/libs/python36.lib;debug;C:/Python36/libs/python36_d.lib
+ # On other platforms, this result is not used at all.
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "if True:
+ for lib in '${PYTHON_LIBRARIES}'.split(';'):
+ if '/' in lib:
+ prefix, py = lib.rsplit('/', 1)
+ if py.startswith('python3'):
+ print(prefix + '/python3.lib')
+ break
+ "
+ OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if(FORCE_LIMITED_API STREQUAL "yes")
+ if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND ${PYTHON_VERSION_MINOR} GREATER 4)
+ # GREATER_EQUAL is available only from cmake 3.7 on. We mean python 3.5 .
+ set(PYTHON_LIMITED_API 1)
+ endif()
+ if(WIN32)
+ if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND ${PYTHON_VERSION_MINOR} GREATER 4)
+ # PYSIDE-560: XXX maybe add an option to setup.py as override
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIMITED_LIBRARIES})
+ endif()
+ endif()
+ endif()
+endmacro()
+
+
+macro(shiboken_find_required_python)
+ if(${ARGC} GREATER 0)
+ find_package(PythonInterp ${ARGV0} REQUIRED)
+ find_package(PythonLibs ${ARGV0} REQUIRED)
+ else()
+ # If no version is specified, just use any interpreter that can be found (from PATH).
+ # This is useful for super-project builds, so that the default system interpeter
+ # gets picked up (e.g. /usr/bin/python and not /usr/bin/python2.7).
+ find_package(PythonInterp REQUIRED)
+ find_package(PythonLibs REQUIRED)
+ endif()
+ shiboken_validate_python_version()
+
+ set(SHIBOKEN_PYTHON_INTERPRETER "${PYTHON_EXECUTABLE}")
+ set_property(GLOBAL PROPERTY SHIBOKEN_PYTHON_INTERPRETER "${PYTHON_EXECUTABLE}")
+endmacro()
+
+macro(shiboken_validate_python_version)
+ if((PYTHON_VERSION_MAJOR EQUAL "2" AND PYTHON_VERSION_MINOR LESS "7") OR
+ (PYTHON_VERSION_MAJOR EQUAL "3" AND PYTHON_VERSION_MINOR LESS "5"))
+ message(FATAL_ERROR
+ "Shiboken requires Python 2.7+ or Python 3.5+.")
+ endif()
+endmacro()
+
+macro(shiboken_compute_python_includes)
+ shiboken_parse_all_arguments(
+ "SHIBOKEN_COMPUTE_INCLUDES" "shiboken_compute_python_includes"
+ "IS_CALLED_FROM_EXPORT" "" "" ${ARGN})
+
+
+ # If the installed shiboken config file is used,
+ # append the found Python include dirs as an interface property on the libshiboken target.
+ # This needs to be dynamic because the user of the library might have python installed
+ # in a different path than when shiboken was originally built.
+ # Otherwise if shiboken is currently being built itself (either as standalone, or super project
+ # build) append the include dirs as PUBLIC.
+ if (SHIBOKEN_COMPUTE_INCLUDES_IS_CALLED_FROM_EXPORT)
+ #TODO target_include_directories works on imported targets only starting with v3.11.0.
+ set_property(TARGET Shiboken2::libshiboken
+ APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
+ else()
+ target_include_directories(libshiboken
+ PUBLIC $<BUILD_INTERFACE:${PYTHON_INCLUDE_DIRS}>)
+ endif()
+
+
+ set(SHIBOKEN_PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}")
+ message(STATUS
+ "SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '${SHIBOKEN_PYTHON_INCLUDE_DIRS}'")
+endmacro()
+
+# Given a list of the following form:
+# optimized;C:/Python36/libs/python36.lib;debug;C:/Python36/libs/python36_d.lib
+# choose the correpsonding library to use, based on the current configuration type.
+function(shiboken_get_library_for_current_config library_list current_config out_var)
+ list(FIND library_list "optimized" optimized_found)
+ list(FIND library_list "general" general_found)
+ list(FIND library_list "debug" debug_found)
+
+ if (optimized_found OR general_found OR debug_found)
+ # Iterate over library list to find the most appropriate library.
+ foreach(token ${library_list})
+ if(token STREQUAL "optimized" OR token STREQUAL "general")
+ set(is_debug 0)
+ set(token1 1)
+ set(lib "")
+ elseif(token STREQUAL "debug")
+ set(is_debug 1)
+ set(token1 1)
+ set(lib "")
+ elseif(EXISTS ${token})
+ set(lib ${token})
+ set(token2 1)
+ else()
+ set(token1 0)
+ set(token2 0)
+ set(lib "")
+ endif()
+
+ if(token1 AND token2)
+ if((is_debug AND lib AND current_config STREQUAL "Debug")
+ OR (NOT is_debug AND lib AND (NOT current_config STREQUAL "Debug")))
+ set(${out_var} ${lib} PARENT_SCOPE)
+ return()
+ endif()
+ endif()
+ endforeach()
+ else()
+ # No configuration specific libraries found, just set the original value.
+ set(${out_var} "${library_list}" PARENT_SCOPE)
+ endif()
+
+endfunction()
+
+macro(shiboken_compute_python_libraries)
+ shiboken_parse_all_arguments(
+ "SHIBOKEN_COMPUTE_LIBS" "shiboken_compute_python_libraries"
+ "IS_CALLED_FROM_EXPORT" "" "" ${ARGN})
+
+ if (NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES "")
+ endif()
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+ endif()
+ endif()
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
+ endif()
+ endif()
+
+ # If the resulting variable
+ # contains a "debug;X;optimized;Y" list like described in shiboken_check_if_limited_api,
+ # make sure to pick just one, so that the final generator expressions are valid.
+ shiboken_get_library_for_current_config("${SHIBOKEN_PYTHON_LIBRARIES}" ${CMAKE_BUILD_TYPE} "SHIBOKEN_PYTHON_LIBRARIES")
+
+ if(APPLE)
+ set(SHIBOKEN_PYTHON_LIBRARIES "-undefined dynamic_lookup")
+ endif()
+
+ # If the installed shiboken config file is used,
+ # append the computed Python libraries as an interface property on the libshiboken target.
+ # This needs to be dynamic because the user of the library might have python installed
+ # in a different path than when shiboken was originally built.
+ # Otherwise if shiboken is currently being built itself (either as standalone, or super project
+ # build) append the libraries as PUBLIC.
+ if (SHIBOKEN_COMPUTE_LIBS_IS_CALLED_FROM_EXPORT)
+ #TODO target_link_libraries works on imported targets only starting with v3.11.0.
+ set_property(TARGET Shiboken2::libshiboken
+ APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${SHIBOKEN_PYTHON_LIBRARIES})
+ else()
+ target_link_libraries(libshiboken
+ PUBLIC $<BUILD_INTERFACE:${SHIBOKEN_PYTHON_LIBRARIES}>)
+ endif()
+
+ message(STATUS "SHIBOKEN_PYTHON_LIBRARIES computed to value: '${SHIBOKEN_PYTHON_LIBRARIES}'")
+endmacro()
+
+function(shiboken_check_if_built_and_target_python_are_compatible)
+ if(NOT SHIBOKEN_PYTHON_VERSION_MAJOR STREQUAL PYTHON_VERSION_MAJOR)
+ message(FATAL_ERROR "The detected Python major version is not \
+compatible with the Python major version which was used when Shiboken was built.
+Built with: '${SHIBOKEN_PYTHON_VERSION_MAJOR}.${SHIBOKEN_PYTHON_VERSION_MINOR}' \
+Detected: '${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}'")
+ else()
+ if(NOT SHIBOKEN_PYTHON_LIMITED_API
+ AND NOT SHIBOKEN_PYTHON_VERSION_MINOR STREQUAL PYTHON_VERSION_MINOR)
+ message(FATAL_ERROR
+ "The detected Python minor version is not compatible with the Python minor \
+version which was used when Shiboken was built. Consider building shiboken with \
+FORCE_LIMITED_API set to '1', so that only the Python major version matters.
+Built with: '${SHIBOKEN_PYTHON_VERSION_MAJOR}.${SHIBOKEN_PYTHON_VERSION_MINOR}' \
+Detected: '${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}'")
+ endif()
+ endif()
+endfunction()
diff --git a/sources/shiboken2/generator/CMakeLists.txt b/sources/shiboken2/generator/CMakeLists.txt
index fb8058b2..943e8d19 100644
--- a/sources/shiboken2/generator/CMakeLists.txt
+++ b/sources/shiboken2/generator/CMakeLists.txt
@@ -27,6 +27,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/shiboken2
)
add_executable(shiboken2 ${shiboken2_SRC})
+add_executable(Shiboken2::shiboken2 ALIAS shiboken2)
add_dependencies(shiboken2 apiextractor)
set_target_properties(shiboken2 PROPERTIES OUTPUT_NAME shiboken2${shiboken2_SUFFIX})
target_link_libraries(shiboken2
@@ -37,7 +38,9 @@ target_link_libraries(shiboken2
configure_file(shibokenconfig.h.in "${CMAKE_CURRENT_BINARY_DIR}/shibokenconfig.h" @ONLY)
-install(TARGETS shiboken2 DESTINATION bin)
+install(TARGETS shiboken2
+ EXPORT Shiboken2Targets
+ DESTINATION bin)
set(shiboken_generator_package_name "shiboken2_generator")
diff --git a/sources/shiboken2/libshiboken/CMakeLists.txt b/sources/shiboken2/libshiboken/CMakeLists.txt
index dd304bdc..79f83ec7 100644
--- a/sources/shiboken2/libshiboken/CMakeLists.txt
+++ b/sources/shiboken2/libshiboken/CMakeLists.txt
@@ -56,19 +56,49 @@ bufferprocs_py37.cpp
get_numpy_location()
-set(libshiboken_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${SBK_PYTHON_INCLUDE_DIR})
-
if (NOT "${PYTHON_NUMPY_LOCATION}" STREQUAL "")
- set(libshiboken_INCLUDES ${libshiboken_INCLUDES} ${PYTHON_NUMPY_LOCATION}/core/include)
- set(libshiboken_SRC ${libshiboken_SRC} sbknumpyarrayconverter.cpp)
- add_definitions(-DHAVE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
+ list(APPEND libshiboken_SRC sbknumpyarrayconverter.cpp)
endif()
set(APIEXTRACTOR_EXTRA_INCLUDES ${APIEXTRACTOR_EXTRA_INCLUDES} ${LIBXSLT_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
-include_directories(${libshiboken_INCLUDES})
add_library(libshiboken SHARED ${libshiboken_SRC})
-target_link_libraries(libshiboken ${SBK_PYTHON_LIBRARIES})
+add_library(Shiboken2::libshiboken ALIAS libshiboken)
+
+target_include_directories(libshiboken PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:include/shiboken2>
+)
+
+if (NOT "${PYTHON_NUMPY_LOCATION}" STREQUAL "")
+ target_include_directories(libshiboken PRIVATE ${PYTHON_NUMPY_LOCATION}/core/include)
+ target_compile_definitions(libshiboken PRIVATE -DHAVE_NUMPY
+ PRIVATE -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
+
+endif()
+
+shiboken_compute_python_includes()
+# On Windows we need to link against the python.lib import library.
+# On macOS and Linux we don't link against the python shared / static library,
+# the dynamic linker will pick up the python symbols at runtime automatically.
+shiboken_compute_python_libraries()
+
+if(PYTHON_LIMITED_API)
+ target_compile_definitions(libshiboken PUBLIC "-DPy_LIMITED_API=0x03050000")
+endif()
+
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if(PYTHON_WITH_DEBUG)
+ target_compile_definitions(libshiboken PUBLIC "-DPy_DEBUG")
+ endif()
+ if (PYTHON_WITH_COUNT_ALLOCS)
+ target_compile_definitions(libshiboken PUBLIC "-DCOUNT_ALLOCS")
+ endif()
+elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
+ target_compile_definitions(libshiboken PUBLIC "-DNDEBUG")
+endif()
+
set_target_properties(libshiboken PROPERTIES OUTPUT_NAME "shiboken2${shiboken2_SUFFIX}${PYTHON_SHARED_LIBRARY_SUFFIX}"
VERSION ${libshiboken_VERSION}
SOVERSION ${libshiboken_SOVERSION}
@@ -100,7 +130,9 @@ install(FILES
bufferprocs_py37.h
"${CMAKE_CURRENT_BINARY_DIR}/sbkversion.h"
DESTINATION include/shiboken2${shiboken2_SUFFIX})
-install(TARGETS libshiboken EXPORT shiboken2
+install(TARGETS libshiboken EXPORT Shiboken2Targets
LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
RUNTIME DESTINATION bin)
+install(EXPORT Shiboken2Targets NAMESPACE Shiboken2::
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION})
diff --git a/sources/shiboken2/shibokenmodule/CMakeLists.txt b/sources/shiboken2/shibokenmodule/CMakeLists.txt
index 373ce102..b37d0c94 100644
--- a/sources/shiboken2/shibokenmodule/CMakeLists.txt
+++ b/sources/shiboken2/shibokenmodule/CMakeLists.txt
@@ -26,7 +26,6 @@ COMMENT "Running generator for 'shiboken2'..."
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
- ${SBK_PYTHON_INCLUDE_DIR}
${libshiboken_SOURCE_DIR}
${libshiboken_BINARY_DIR})
add_library(shibokenmodule MODULE ${sample_SRC})
@@ -37,7 +36,6 @@ if(WIN32)
set_property(TARGET shibokenmodule PROPERTY SUFFIX ".pyd")
endif()
target_link_libraries(shibokenmodule
- ${SBK_PYTHON_LIBRARIES}
libshiboken)
add_dependencies(shibokenmodule shiboken2)
diff --git a/sources/shiboken2/tests/minimalbinding/CMakeLists.txt b/sources/shiboken2/tests/minimalbinding/CMakeLists.txt
index ec674b56..7301e188 100644
--- a/sources/shiboken2/tests/minimalbinding/CMakeLists.txt
+++ b/sources/shiboken2/tests/minimalbinding/CMakeLists.txt
@@ -26,7 +26,6 @@ COMMENT "Running generator for 'minimal' test binding..."
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
- ${SBK_PYTHON_INCLUDE_DIR}
${libminimal_SOURCE_DIR}
${libshiboken_SOURCE_DIR}
${libshiboken_BINARY_DIR})
@@ -38,6 +37,5 @@ if(WIN32)
endif()
target_link_libraries(minimal
libminimal
- ${SBK_PYTHON_LIBRARIES}
libshiboken)
create_generator_target(minimal)
diff --git a/sources/shiboken2/tests/otherbinding/CMakeLists.txt b/sources/shiboken2/tests/otherbinding/CMakeLists.txt
index 0be66f79..44855e29 100644
--- a/sources/shiboken2/tests/otherbinding/CMakeLists.txt
+++ b/sources/shiboken2/tests/otherbinding/CMakeLists.txt
@@ -28,7 +28,6 @@ COMMENT "Running generator for 'other' test binding..."
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
- ${SBK_PYTHON_INCLUDE_DIR}
${libother_SOURCE_DIR}
${libsample_SOURCE_DIR}
${libsample_SOURCE_DIR}/..
@@ -46,7 +45,6 @@ endif()
target_link_libraries(other
libother
libsample
- ${SBK_PYTHON_LIBRARIES}
libshiboken)
add_dependencies(other sample)
diff --git a/sources/shiboken2/tests/samplebinding/CMakeLists.txt b/sources/shiboken2/tests/samplebinding/CMakeLists.txt
index 7f4bec5f..9ecbd98e 100644
--- a/sources/shiboken2/tests/samplebinding/CMakeLists.txt
+++ b/sources/shiboken2/tests/samplebinding/CMakeLists.txt
@@ -139,7 +139,6 @@ COMMENT "Running generator for 'sample' test binding..."
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
- ${SBK_PYTHON_INCLUDE_DIR}
${libsample_SOURCE_DIR}
${libshiboken_SOURCE_DIR}
${libshiboken_BINARY_DIR})
@@ -152,6 +151,5 @@ if(WIN32)
endif()
target_link_libraries(sample
libsample
- ${SBK_PYTHON_LIBRARIES}
libshiboken)
create_generator_target(sample)
diff --git a/sources/shiboken2/tests/smartbinding/CMakeLists.txt b/sources/shiboken2/tests/smartbinding/CMakeLists.txt
index 43888fae..0fb7de82 100644
--- a/sources/shiboken2/tests/smartbinding/CMakeLists.txt
+++ b/sources/shiboken2/tests/smartbinding/CMakeLists.txt
@@ -27,7 +27,6 @@ COMMENT "Running generator for 'smart' test binding..."
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
- ${SBK_PYTHON_INCLUDE_DIR}
${libsmart_SOURCE_DIR}
${libshiboken_SOURCE_DIR}
${libshiboken_BINARY_DIR})
@@ -40,6 +39,5 @@ if(WIN32)
endif()
target_link_libraries(smart
libsmart
- ${SBK_PYTHON_LIBRARIES}
libshiboken)
create_generator_target(smart)
diff --git a/testing/buildlog.py b/testing/buildlog.py
index 7559e4f9..a0438de0 100644
--- a/testing/buildlog.py
+++ b/testing/buildlog.py
@@ -42,10 +42,11 @@ from __future__ import print_function
import os
import sys
from collections import namedtuple
+from textwrap import dedent
from .helper import script_dir
-LogEntry = namedtuple("LogEntry", ["log_dir", "build_dir"])
+LogEntry = namedtuple("LogEntry", ["log_dir", "build_dir", "build_classifiers"])
class BuildLog(object):
@@ -68,7 +69,22 @@ class BuildLog(object):
print("Warning: %s not found, skipped" % fpath)
continue
with open(fpath) as f:
- build_dir = f.read().strip()
+ f_contents = f.read().strip()
+ f_contents_split = f_contents.splitlines()
+ try:
+ if len(f_contents_split) == 2:
+ build_dir = f_contents_split[0]
+ build_classifiers = f_contents_split[1]
+ else:
+ build_dir = f_contents_split[0]
+ build_classifiers = ""
+ except IndexError:
+ print(dedent("""
+ Error: There was an issue finding the build dir and its
+ characteristics, in the following considered file: '{}'
+ """.format(fpath)))
+ sys.exit(1)
+
if not os.path.exists(build_dir):
rel_dir, low_part = os.path.split(build_dir)
rel_dir, two_part = os.path.split(rel_dir)
@@ -79,7 +95,7 @@ class BuildLog(object):
else:
print("Warning: missing build dir %s" % build_dir)
continue
- entry = LogEntry(log_dir, build_dir)
+ entry = LogEntry(log_dir, build_dir, build_classifiers)
build_history.append(entry)
# we take the latest build for now.
build_history.sort()
@@ -105,10 +121,14 @@ class BuildLog(object):
# Python2 legacy: Correct 'linux2' to 'linux', recommended way.
platform = 'linux' if sys.platform.startswith('linux') else sys.platform
res = [platform]
- # the rest must be guessed from the given filename
- path = self.selected.build_dir
- base = os.path.basename(path)
- res.extend(base.split('-'))
+ if self.selected.build_classifiers:
+ # Use classifier string encoded into build_dir.txt file.
+ res.extend(self.selected.build_classifiers.split('-'))
+ else:
+ # the rest must be guessed from the given filename
+ path = self.selected.build_dir
+ base = os.path.basename(path)
+ res.extend(base.split('-'))
# add all the python and qt subkeys
for entry in res:
parts = entry.split(".")