aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros/ConfigureScripts.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/macros/ConfigureScripts.cmake')
-rw-r--r--cmake/macros/ConfigureScripts.cmake18
1 files changed, 12 insertions, 6 deletions
diff --git a/cmake/macros/ConfigureScripts.cmake b/cmake/macros/ConfigureScripts.cmake
index c783cc98ab7..a6a39bd9306 100644
--- a/cmake/macros/ConfigureScripts.cmake
+++ b/cmake/macros/ConfigureScripts.cmake
@@ -8,6 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# Returns the base path to the script directory in the source directory
+function(GetScriptsBasePath variable)
+ set(${variable} "${CMAKE_SOURCE_DIR}/src/server/scripts" PARENT_SCOPE)
+endfunction()
+
+# Stores the absolut path of the given module in the variable
+function(GetPathToScriptModule module variable)
+ GetScriptsBasePath(SCRIPTS_BASE_PATH)
+ set(${variable} "${SCRIPTS_BASE_PATH}/${module}" PARENT_SCOPE)
+endfunction()
+
# Stores the project name of the given module in the variable
function(GetProjectNameOfScriptModule module variable)
string(TOLOWER "scripts_${SCRIPT_MODULE}" GENERATED_NAME)
@@ -17,7 +28,7 @@ endfunction()
# Creates a list of all script modules
# and stores it in the given variable.
function(GetScriptModuleList variable)
- GetPathToScriptModule("" BASE_PATH)
+ GetScriptsBasePath(BASE_PATH)
file(GLOB LOCALE_SCRIPT_MODULE_LIST RELATIVE
${BASE_PATH}
${BASE_PATH}/*)
@@ -59,11 +70,6 @@ function(IsDynamicLinkingRequired variable)
set(${variable} ${IS_REQUIRED} PARENT_SCOPE)
endfunction()
-# Stores the absolut path of the given module in the variable
-function(GetPathToScriptModule module variable)
- set(${variable} "${CMAKE_SOURCE_DIR}/src/server/scripts/${module}" PARENT_SCOPE)
-endfunction()
-
# Stores the native variable name
function(GetNativeSharedLibraryName module variable)
if(WIN32)