Permalink
Browse files

Merge branch 'tweak-lib-location-for-win32'

* tweak-lib-location-for-win32:
  On windows, ensure python module are located in "Lib" folder.
  • Loading branch information...
2 parents 7a2fdd2 + e94feac commit 8e32c5c64b74e6638feeff0d21364e0533cc7edf @jcfr jcfr committed Mar 28, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 CMakeLists.txt
View
@@ -105,12 +105,18 @@ if(NOT BUILD_SHARED AND NOT BUILD_STATIC)
endif(NOT BUILD_SHARED AND NOT BUILD_STATIC)
# Set PYTHONHOME
-set(LIBDIR "lib")
+set(LIBDIR "Lib") # See Lib/distutils/sysconfig.py - function 'get_python_lib'
+if(UNIX)
+ set(LIBDIR "lib")
+endif()
if(USE_LIB64)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
set(LIBDIR "lib64")
endif()
-set(PYTHONHOME "${LIBDIR}/${LIBPYTHON}")
+set(PYTHONHOME "${LIBDIR}")
+if(UNIX)
+ set(PYTHONHOME "${PYTHONHOME}/${LIBPYTHON}")
+endif()
# Install tree directory
set(BIN_INSTALL_DIR bin) # Contains the python executable

0 comments on commit 8e32c5c

Please sign in to comment.