summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authornezd5553 <87045625+nezd5553@users.noreply.github.com>2022-06-19 18:09:54 -0700
committerGitHub <noreply@github.com>2022-06-19 18:09:54 -0700
commitd25b193bfda58f85c2bc124b0aa59aa7ded01f15 (patch)
tree1b127e8427e70a197952c51d989819722c7b0bce /CMakeLists.txt
parent5b2b15091f38eb169648ddad4ae32f03354d19cd (diff)
cmake: Use compatibility list in source directory
For Flatpak builds, the compatibility list is located in the source directory. In this case, CMake will copy it to the build directory.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be70c04ae..def26c19f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,10 @@ if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist
https://api.yuzu-emu.org/gamedb/
"${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" SHOW_PROGRESS)
endif()
+if (EXISTS ${PROJECT_SOURCE_DIR}/compatibility_list.json)
+ file(COPY "${PROJECT_SOURCE_DIR}/compatibility_list.json"
+ DESTINATION "${PROJECT_BINARY_DIR}/dist/compatibility_list/")
+endif()
if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
endif()