mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
CMake: Set generated prc's model-cache-dir
properly for Windows/macOS
This commit is contained in:
parent
4556059c90
commit
a37eabe089
@ -21,6 +21,17 @@ else()
|
|||||||
set(AUDIO_LIBRARY_NAME none)
|
set(AUDIO_LIBRARY_NAME none)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(BAM_CACHE_DIR
|
||||||
|
"$USER_APPDATA/Panda3D-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
elseif(APPLE)
|
||||||
|
set(BAM_CACHE_DIR
|
||||||
|
"$HOME/Library/Caches/Panda3D-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
else()
|
||||||
|
set(BAM_CACHE_DIR
|
||||||
|
"$XDG_CACHE_HOME/panda3d")
|
||||||
|
endif()
|
||||||
|
|
||||||
configure_file(panda.prc.in "${CMAKE_BINARY_DIR}/etc/20_panda.prc")
|
configure_file(panda.prc.in "${CMAKE_BINARY_DIR}/etc/20_panda.prc")
|
||||||
if(IS_MULTICONFIG)
|
if(IS_MULTICONFIG)
|
||||||
file(GENERATE OUTPUT "${PROJECT_BINARY_DIR}/$<CONFIG>/etc/20_panda.prc"
|
file(GENERATE OUTPUT "${PROJECT_BINARY_DIR}/$<CONFIG>/etc/20_panda.prc"
|
||||||
|
@ -35,7 +35,7 @@ load-file-type egg pandaegg
|
|||||||
default-model-extension .egg
|
default-model-extension .egg
|
||||||
|
|
||||||
# Enable the model-cache, but only for models, not textures.
|
# Enable the model-cache, but only for models, not textures.
|
||||||
model-cache-dir $XDG_CACHE_HOME/panda3d
|
model-cache-dir ${BAM_CACHE_DIR}
|
||||||
model-cache-textures #f
|
model-cache-textures #f
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user