summaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-16 22:29:49 +0200
committerGravatar Jonathan Beck2009-10-16 22:29:49 +0200
commit7ba9a5437e49868ca7a7cc2f4d006509308b1ab4 (patch)
treea4223162b635be801eac1f26b5f9de38cabd3c51 /swig
parent32be8ec384bfd78e189d3de6609e50cf4dd072a2 (diff)
downloadlibplist-7ba9a5437e49868ca7a7cc2f4d006509308b1ab4.tar.gz
libplist-7ba9a5437e49868ca7a7cc2f4d006509308b1ab4.tar.bz2
Fix python binding install path.
Diffstat (limited to 'swig')
-rw-r--r--swig/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index a139859..f79b3dc 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -7,12 +7,17 @@ INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
SWIG_ADD_MODULE( PList python plist.i )
SWIG_LINK_LIBRARIES( PList plist ${PYTHON_LIBRARIES} )
+EXEC_PROGRAM("${PYTHON_EXECUTABLE}"
+ ARGS "-c 'try:\n import distutils.sysconfig; print distutils.sysconfig.get_python_lib()\nexcept: pass\n'"
+ OUTPUT_VARIABLE DISTUTILS_PYTHON_ILIBRARY_PATH
+ )
+
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/_PList${CMAKE_SHARED_MODULE_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/site-packages/libplist/ )
+ DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/libplist/ )
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/PList.py
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/site-packages/libplist/ )
+ DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/libplist/ )
INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/site-packages/libplist/ )
+ DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/libplist/ )
INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/plist.i
DESTINATION include/plist/swig COMPONENT dev)