Selaa lähdekoodia

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.
nezd5553 4 vuotta sitten
vanhempi
commit
d25b193bfd
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      CMakeLists.txt

+ 4 - 0
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()