diff --git a/CMakeLists.txt b/CMakeLists.txt index 07eb007..4de3201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,24 +173,24 @@ endif() # plugin install directories (CS_USER_PLUGIN on MacOs/Windows) if(WASM) - set(PLUGIN_INSTALL_DIR "lib") + set(PLUGIN_INSTALL_DIR "lib" CACHE PATH "Plugin install path") elseif(USE_DOUBLE) message(STATUS "Building with 64-bit floats") if(APPLE) - set(PLUGIN_INSTALL_DIR "$ENV{HOME}/Library/csound/${APIVERSION}/plugins64") + set(PLUGIN_INSTALL_DIR "$ENV{HOME}/Library/csound/${APIVERSION}/plugins64" CACHE PATH "Plugin install path") elseif(LINUX) - set(PLUGIN_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/csound/plugins64-${APIVERSION}") + set(PLUGIN_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/csound/plugins64-${APIVERSION}" CACHE PATH "Plugin install path") elseif(MSVC) - set(PLUGIN_INSTALL_DIR "$ENV{LOCALAPPDATA}/csound/${APIVERSION}/plugins64") + set(PLUGIN_INSTALL_DIR "$ENV{LOCALAPPDATA}/csound/${APIVERSION}/plugins64" CACHE PATH "Plugin install path") endif() else() message(STATUS "Building with 32-bit floats") if(APPLE) - set(PLUGIN_INSTALL_DIR "$ENV{HOME}/Library/csound/${APIVERSION}/plugins") + set(PLUGIN_INSTALL_DIR "$ENV{HOME}/Library/csound/${APIVERSION}/plugins" CACHE PATH "Plugin install path") elseif(LINUX) - set(PLUGIN_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/csound/plugins-${APIVERSION}") + set(PLUGIN_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/csound/plugins-${APIVERSION}" CACHE PATH "Plugin install path") elseif(MSVC) - set(PLUGIN_INSTALL_DIR "$ENV{LOCALAPPDATA}/csound/${APIVERSION}/plugins") + set(PLUGIN_INSTALL_DIR "$ENV{LOCALAPPDATA}/csound/${APIVERSION}/plugins" CACHE PATH "Plugin install path") endif() endif() diff --git a/README.md b/README.md index 56559b5..77b62be 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,9 @@ library instalation directory (customisable) on LINUX. These are: * For doubles: `%LOCALAPPDATA%\csound\${APIVERSION}\plugins64` * For floats: `%LOCALAPPDATA%\csound\${APIVERSION}\plugins` +On all platforms, the install directory can be overridden by setting the +`PLUGIN_INSTALL_DIR` CMake cache variable (e.g. `-DPLUGIN_INSTALL_DIR=/custom/path`). + Build Instructions for Linux and MacOS ---