Blob Blame History Raw
diff -rupN gmsh-2.9.1-source/CMakeLists.txt gmsh-2.9.1-source-new/CMakeLists.txt
--- gmsh-2.9.1-source/CMakeLists.txt	2015-03-14 18:33:50.000000000 +0100
+++ gmsh-2.9.1-source-new/CMakeLists.txt	2015-03-18 16:48:45.144035963 +0100
@@ -1551,8 +1551,9 @@ elseif(APPLE AND ENABLE_OS_SPECIFIC_INST
   set(GMSH_DOC ../../..)
   set(GMSH_MAN ../../..)
 else(WIN32 OR CYGWIN)
-  set(GMSH_BIN bin)
-  set(GMSH_LIB lib)
+  set(GMSH_BIN bin CACHE INTERNAL "Bin path")
+  set(GMSH_LIB lib${LIB_SUFFIX} CACHE INTERNAL "Lib path")
+  set(GMSH_INCLUDE include CACHE INTERNAL "Include path")
   set(GMSH_DOC share/doc/gmsh)
   set(GMSH_MAN share/man/man1)
 endif(WIN32 OR CYGWIN)
@@ -1602,10 +1603,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D
 endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
 
 if(ENABLE_ONELAB)
-  install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN})
+  execute_process ( COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+  install(FILES ${ONELAB_PY} DESTINATION ${PYTHON_SITE_PACKAGES})
 endif(ENABLE_ONELAB)
 if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
-  install(FILES ${GMSH_API} DESTINATION include/gmsh)
+  install(FILES ${GMSH_API} DESTINATION ${GMSH_INCLUDE}/gmsh)
 endif(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
 install(FILES ${WELCOME_FILE} DESTINATION ${GMSH_DOC} RENAME README.txt)
 install(FILES ${LICENSE_FILE} DESTINATION ${GMSH_DOC})
diff -rupN gmsh-2.9.1-source/Common/GmshMessage.cpp gmsh-2.9.1-source-new/Common/GmshMessage.cpp
--- gmsh-2.9.1-source/Common/GmshMessage.cpp	2015-03-18 15:10:04.000000000 +0100
+++ gmsh-2.9.1-source-new/Common/GmshMessage.cpp	2015-03-18 16:50:22.146108815 +0100
@@ -157,12 +157,6 @@ void Msg::Init(int argc, char **argv)
   if(CTX::instance()->exeFileName.empty() && argc && argv)
     CTX::instance()->exeFileName = argv[0];
 
-  // add the directory where the binary is installed to the path where Python
-  // looks for modules, and to the path for executables (this allows us to find
-  // the onelab.py module or subclients automatically)
-  addGmshPathToEnvironmentVar("PYTHONPATH");
-  addGmshPathToEnvironmentVar("PATH");
-
   InitializeOnelab("Gmsh");
 }