From f4a4b17b9e30cf603eb614e153d68226a3b24520 Mon Sep 17 00:00:00 2001 From: kat Date: Wed, 30 Oct 2024 08:39:09 -0400 Subject: [SharedCache] Implement LoadedImage API, Fix serialized image names, more robust system for out-of-date databases --- view/sharedcache/ui/CMakeLists.txt | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'view/sharedcache/ui/CMakeLists.txt') diff --git a/view/sharedcache/ui/CMakeLists.txt b/view/sharedcache/ui/CMakeLists.txt index 1695b8dd..88a68375 100644 --- a/view/sharedcache/ui/CMakeLists.txt +++ b/view/sharedcache/ui/CMakeLists.txt @@ -12,16 +12,35 @@ list(FILTER SOURCES EXCLUDE REGEX qrc_.*) add_library(sharedcacheui SHARED ${SOURCES}) +set(COMPILE_DEFS "") + +if (HARD_FAIL_MODE) + set(COMPILE_DEFS "${COMPILE_DEFS} ABORT_FAILURES;") +endif() + +if (BN_REF_COUNT_DEBUG) + set(COMPILE_DEFS "${COMPILE_DEFS} BN_REF_COUNT_DEBUG;") +endif() + +if (SLIDEINFO_DEBUG_TAGS) + set(COMPILE_DEFS "${COMPILE_DEFS} SLIDEINFO_DEBUG_TAGS;") +endif() + +if (METADATA_VERSION) + set(COMPILE_DEFS "${COMPILE_DEFS} METADATA_VERSION=${METADATA_VERSION};") +else() + message(FATAL_ERROR "No metadata version provided. Fatal.") +endif() + if (VIEW_NAME) - if (BN_REF_COUNT_DEBUG) - target_compile_definitions(sharedcacheui PRIVATE VIEW_NAME="${VIEW_NAME}" BN_REF_COUNT_DEBUG) - else() - target_compile_definitions(sharedcacheui PRIVATE VIEW_NAME="${VIEW_NAME}") - endif() + set(COMPILE_DEFS "${COMPILE_DEFS} VIEW_NAME=\"${VIEW_NAME}\";") else() - error("VIEW_NAME must be defined") + message(FATAL_ERROR "No view name provided. Fatal.") endif() +target_compile_definitions(sharedcacheui PRIVATE ${COMPILE_DEFS}) + + if(BN_INTERNAL_BUILD) set_target_properties(sharedcacheui PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR} -- cgit v1.3.1