From d25b193bfda58f85c2bc124b0aa59aa7ded01f15 Mon Sep 17 00:00:00 2001 From: nezd5553 <87045625+nezd5553@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:09:54 -0700 Subject: 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. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMakeLists.txt') 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() -- cgit v1.2.3 From f85118604e74fbe4ea0a61884ffee7ea9923ad9f Mon Sep 17 00:00:00 2001 From: nezd5553 <87045625+nezd5553@users.noreply.github.com> Date: Mon, 4 Jul 2022 00:41:31 +0900 Subject: cmake: Move source directory compatibility list... ... and copy it before the download check This makes it more consistent with the directory structure of the project. --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index def26c19f..3a5e839f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,16 +70,17 @@ endif() configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc COPYONLY) +if (EXISTS ${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json) + configure_file("${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json" + "${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" + COPYONLY) +endif() if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) message(STATUS "Downloading compatibility list for yuzu...") file(DOWNLOAD 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() -- cgit v1.2.3