[Kst] branches/work/kst/portto4/kst/cmake

Peter Kümmel syntheticpp at gmx.net
Tue Jul 17 17:39:10 UTC 2012


SVN commit 1306211 by kuemmel:

add option to define python site-package dir

 M  +1 -0      CMakeLists.txt  
 M  +6 -0      pyKst/CMakeLists.txt  


--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1306210:1306211
@@ -39,6 +39,7 @@
 kst_option(bool   OFF win edit_cont         "Enable \"Edit and Continue\" for Visual Studio")
 kst_option(bool   OFF all python            "Install Python support")
 kst_option(bool   OFF all python_build      "Download and build NumPy/SciPy then install Python support")
+kst_option(string ""  all python_prefix "Path for installing python bindings")
 
 message(STATUS)
 
--- branches/work/kst/portto4/kst/cmake/pyKst/CMakeLists.txt #1306210:1306211
@@ -13,10 +13,16 @@
 find_package(PythonInterp REQUIRED)
 find_package(PythonLibs REQUIRED)
 
+if(kst_python_prefix)
+    set(pydist_dir ${kst_python_prefix})
+    message(STATUS "Installing python support into ${pydist_dir}")
+else()
 # find install path for pykst files
 execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finddistdir.py
                 OUTPUT_VARIABLE pydist_dir
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
+    message(STATUS "Installing python support into ${pydist_dir}. Overwrite using -Dkst_python_prefix=")
+endif()
 
 if(NOT kst_python_build)
     macro(checkversion _name _required)


More information about the Kst mailing list