aboutsummaryrefslogtreecommitdiff
path: root/find-modules/FindPythonModuleGeneration.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2017-01-15 00:30:53 +0000
committerStephen Kelly <steveire@gmail.com>2017-01-15 11:19:31 +0000
commit9348f743b1f3ee0e61cb0c317276e329e8c00c4f (patch)
treeca287625ffd26f0f25becaea95b331f2740b1cac /find-modules/FindPythonModuleGeneration.cmake
parent636d6acc7adf8bf7169d38833340161dc42d3484 (diff)
downloadextra-cmake-modules-9348f743b1f3ee0e61cb0c317276e329e8c00c4f.tar.gz
extra-cmake-modules-9348f743b1f3ee0e61cb0c317276e329e8c00c4f.tar.bz2
Bindings: Output all python bindings in the same build location
The KConfig build creates two libraries and they should both be output in the same place so that they can be tested together.
Diffstat (limited to 'find-modules/FindPythonModuleGeneration.cmake')
-rw-r--r--find-modules/FindPythonModuleGeneration.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/find-modules/FindPythonModuleGeneration.cmake b/find-modules/FindPythonModuleGeneration.cmake
index 905bde49..c0e382ff 100644
--- a/find-modules/FindPythonModuleGeneration.cmake
+++ b/find-modules/FindPythonModuleGeneration.cmake
@@ -424,7 +424,7 @@ headers = sipAPI${modulename_value}
foreach(pyversion ${_pyversions})
execute_process(COMMAND "${CMAKE_COMMAND}"
- "-DPYTHON_UMBRELLA_MODULE_FILE=${CMAKE_CURRENT_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}/__init__.py"
+ "-DPYTHON_UMBRELLA_MODULE_FILE=${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}/__init__.py"
-P "${GPB_MODULE_DIR}/GeneratePythonBindingUmbrellaModule.cmake"
)
@@ -440,11 +440,12 @@ headers = sipAPI${modulename_value}
set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY AUTOMOC OFF)
set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY PREFIX "")
- set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY OUTPUT_NAME py${pyversion}/${pythonnamespace_value}/${modulename_value})
+ set_property(TARGET Py${pyversion}KF5${modulename_value} PROPERTY
+ OUTPUT_NAME "${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}/${modulename_value}")
add_test(NAME Py${pyversion}Test${modulename_value} COMMAND ${GPB_PYTHON${pyversion}_COMMAND} "${CMAKE_SOURCE_DIR}/autotests/pythontest.py" ${CMAKE_BINARY_DIR}/py${pyversion})
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/py${pyversion}/${pythonnamespace_value}
DESTINATION lib/python${pyversion${pyversion}_maj_min}/${GPB_INSTALL_DIR_SUFFIX})
install(FILES ${sip_files} "${CMAKE_CURRENT_BINARY_DIR}/sip/${pythonnamespace_value}/${modulename_value}/${modulename_value}mod.sip"
DESTINATION share/sip/${pythonnamespace_value}/${modulename_value}