CMake: /etc/*.prc -> /etc/panda3d/*.prc

This commit is contained in:
Sam Edwards 2020-01-07 13:35:23 -07:00
parent 0aa599feeb
commit ce6caa8d3e
3 changed files with 19 additions and 9 deletions

View File

@ -121,7 +121,12 @@ endif()
# tree starting at the location of libpandaexpress.dll for any # tree starting at the location of libpandaexpress.dll for any
# directories called 'etc'. # directories called 'etc'.
set(DEFAULT_PRC_DIR "<auto>etc" CACHE STRING if(UNIX)
set(_default_prc "<auto>etc/panda3d")
else()
set(_default_prc "<auto>etc")
endif()
set(DEFAULT_PRC_DIR "${_default_prc}" CACHE STRING
"The compiled-in default directory to look for the Config.prc file, "The compiled-in default directory to look for the Config.prc file,
in the absence of the PRC_DIR environment variable set, and in in the absence of the PRC_DIR environment variable set, and in
the absence of anything specified via the configpath directive.") the absence of anything specified via the configpath directive.")

View File

@ -32,17 +32,22 @@ else()
"$XDG_CACHE_HOME/panda3d") "$XDG_CACHE_HOME/panda3d")
endif() endif()
if(IS_MULTICONFIG) if(UNIX)
set(_out_path "${PROJECT_BINARY_DIR}/$<CONFIG>/etc") # On Unices, ask the GNUInstallDirs module where /etc is -- and then install
# ourselves into /etc/panda3d
set(_confdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}/panda3d")
set(_out_path "etc/panda3d")
set(ETC_PARENT_PATH "../..")
else() else()
set(_out_path "${PROJECT_BINARY_DIR}/etc") set(_confdir "etc")
set(_out_path "etc")
set(ETC_PARENT_PATH "..")
endif() endif()
if(WIN32) if(IS_MULTICONFIG)
set(_confdir "etc") set(_out_path "${PROJECT_BINARY_DIR}/$<CONFIG>/${_out_path}")
else() else()
# On Unices, ask the GNUInstallDirs module where /etc is set(_out_path "${PROJECT_BINARY_DIR}/${_out_path}")
set(_confdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}")
endif() endif()
# Path from the directory containing *.prc to the *parent of* models/ # Path from the directory containing *.prc to the *parent of* models/

View File

@ -2,7 +2,7 @@
################################# DO NOT EDIT ########################### ################################# DO NOT EDIT ###########################
# Some paths first... # Some paths first...
plugin-path $THIS_PRC_DIR/../lib plugin-path $THIS_PRC_DIR/${ETC_PARENT_PATH}/lib
model-path $MAIN_DIR model-path $MAIN_DIR
model-path $THIS_PRC_DIR/${MODELS_PARENT_PATH} model-path $THIS_PRC_DIR/${MODELS_PARENT_PATH}
model-path $THIS_PRC_DIR/${MODELS_PARENT_PATH}/models model-path $THIS_PRC_DIR/${MODELS_PARENT_PATH}/models