summaryrefslogtreecommitdiff
blob: 47461e48aaf4be357de73c773c9dbb44807d2f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Respect externally set PYTHON_MODULE_INSTALL_DIR.

--- csound-6.09.1/CMakeLists.txt
+++ csound-6.09.1/CMakeLists.txt
@@ -218,11 +218,13 @@
     set(PLUGIN_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/csound/plugins-${APIVERSION}")
 endif()
 
-execute_process (
-     COMMAND python -c
-     "import site, sys; sys.stdout.write(site.getusersitepackages())"
-     OUTPUT_VARIABLE PYTHON_MODULE_INSTALL_DIR
-   )
+if(NOT DEFINED PYTHON_MODULE_INSTALL_DIR)
+    execute_process (
+        COMMAND python -c
+        "import site, sys; sys.stdout.write(site.getusersitepackages())"
+        OUTPUT_VARIABLE PYTHON_MODULE_INSTALL_DIR
+    )
+endif()
 
 set(JAVA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR})
 set(LUA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR})