mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-05-09 21:14:24 -05:00
CMake: Unify sys directories
This commit is contained in:
parent
6240457cb8
commit
30031a0412
|
|
@ -841,7 +841,7 @@ add_subdirectory(Source)
|
|||
# Install shared data files
|
||||
#
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN)
|
||||
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/Sys PATTERN)
|
||||
endif()
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin")
|
||||
install(FILES COPYING DESTINATION ${datadir})
|
||||
|
|
|
|||
|
|
@ -759,27 +759,27 @@ std::string GetExeDirectory()
|
|||
|
||||
static std::string CreateSysDirectoryPath()
|
||||
{
|
||||
#if defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
||||
#define SYSDATA_DIR "Sys"
|
||||
#elif defined __APPLE__
|
||||
#define SYSDATA_DIR "Contents/Resources/Sys"
|
||||
#define SYS_FOLDER_NAME "Sys"
|
||||
#if defined __APPLE__
|
||||
#define SYSDATA_DIR "Contents/Resources/" SYS_FOLDER_NAME
|
||||
#else
|
||||
#ifdef DATA_DIR
|
||||
#define SYSDATA_DIR DATA_DIR "sys"
|
||||
#else
|
||||
#define SYSDATA_DIR "sys"
|
||||
#endif
|
||||
#define SYSDATA_DIR DATA_DIR SYS_FOLDER_NAME
|
||||
#endif
|
||||
|
||||
std::string sys_directory;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
const std::string sys_directory = GetBundleDirectory() + DIR_SEP SYSDATA_DIR DIR_SEP;
|
||||
#elif defined(_WIN32) || defined(LINUX_LOCAL_DEV)
|
||||
const std::string sys_directory = GetExeDirectory() + DIR_SEP SYSDATA_DIR DIR_SEP;
|
||||
sys_directory = GetBundleDirectory() + DIR_SEP SYSDATA_DIR DIR_SEP;
|
||||
#elif defined ANDROID
|
||||
const std::string sys_directory = s_android_sys_directory + DIR_SEP;
|
||||
sys_directory = s_android_sys_directory + DIR_SEP;
|
||||
ASSERT_MSG(COMMON, !s_android_sys_directory.empty(), "Sys directory has not been set");
|
||||
#else
|
||||
const std::string sys_directory = SYSDATA_DIR DIR_SEP;
|
||||
const std::string local_sys_directory = GetExeDirectory() + DIR_SEP SYS_FOLDER_NAME DIR_SEP;
|
||||
if (IsDirectory(local_sys_directory))
|
||||
sys_directory = local_sys_directory;
|
||||
else
|
||||
sys_directory = SYSDATA_DIR DIR_SEP;
|
||||
|
||||
#endif
|
||||
|
||||
INFO_LOG_FMT(COMMON, "CreateSysDirectoryPath: Setting to {}", sys_directory);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user