Skip to content

Commit 01fe023

Browse files
committedSep 21, 2022
Add default paths for presets and textures and make them configurable via CMake.
1 parent 31e5fce commit 01fe023

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
2222
set(PROJECTM_LINKAGE "shared" CACHE STRING "Set to either shared or static to specify how libprojectM should be linked. Defaults to shared.")
2323
set(SDL2_LINKAGE "shared" CACHE STRING "Set to either shared or static to specify how libSDL2 should be linked. Defaults to shared.")
2424

25+
set(DEFAULT_PRESETS_PATH "\${application.dir}/presets" CACHE STRING "Default presets path in the configuration file.")
26+
set(DEFAULT_TEXTURES_PATH "\${application.dir}/textures" CACHE STRING "Default textures path in the configuration file.")
27+
2528
if(NOT PROJECTM_LINKAGE STREQUAL "shared" AND NOT PROJECTM_LINKAGE STREQUAL "static")
2629
message(FATAL_ERROR "Invalid libprojectM linkage provided in PROJECTM_LINKAGE: \"${PROJECTM_LINKAGE}\".\n"
2730
"Please specify either \"shared\" or \"static\"."

‎src/resources/projectMSDL.properties.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ window.waitForVerticalSync = true
3232
### projectM settings
3333

3434
# Path where projectMSDL will search for presets and textures. The directory will be searched recursively.
35-
projectM.presetPath = @DEFAULT_PRESET_PATH@
35+
projectM.presetPath = @DEFAULT_PRESETS_PATH@
3636

3737
# Optional path where projectMSDL will search for additional textures. The directory will be searched recursively.
3838
# Note that textures found under "presetPath" will override textures in the texturePath dir.
39-
#projectM.texturePath =
39+
projectM.texturePath = @DEFAULT_TEXTURES_PATH@
4040

4141
# If true, displays the built-in projectM logo preset on startup.
4242
projectM.enableSplash = false

0 commit comments

Comments
 (0)