diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/modules/FindSpdlog.cmake | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e4dff92e6..825718355a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,7 +304,7 @@ elseif(CORE_SYSTEM_NAME STREQUAL android) ${CORE_BUILD_DIR}/DllPaths_generated_android.h @ONLY) endif() -set(GLOBAL_TARGET_DEPS ffmpeg dvdnav crossguid fmt Spdlog::Spdlog fstrcmp flatbuffers ${PLATFORM_GLOBAL_TARGET_DEPS}) +set(GLOBAL_TARGET_DEPS ffmpeg dvdnav crossguid fmt spdlog fstrcmp flatbuffers ${PLATFORM_GLOBAL_TARGET_DEPS}) # main library (used for main binary and tests) add_library(lib${APP_NAME_LC} STATIC $<TARGET_OBJECTS:compileinfo>) diff --git a/cmake/modules/FindSpdlog.cmake b/cmake/modules/FindSpdlog.cmake index 270e486a13..46663602a5 100644 --- a/cmake/modules/FindSpdlog.cmake +++ b/cmake/modules/FindSpdlog.cmake @@ -39,7 +39,6 @@ if(ENABLE_INTERNAL_SPDLOG) externalproject_add(spdlog URL ${SPDLOG_URL} DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PATCH_COMMAND patch -p1 -i ${CMAKE_SOURCE_DIR}/tools/depends/target/libspdlog/0001-fix_fmt_version.patch PREFIX ${CORE_BUILD_DIR}/spdlog CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} @@ -95,12 +94,12 @@ if(SPDLOG_FOUND) -DSPDLOG_WCHAR_TO_UTF8_SUPPORT) endif() - if(NOT TARGET Spdlog::Spdlog) - add_library(Spdlog::Spdlog UNKNOWN IMPORTED) - set_target_properties(Spdlog::Spdlog PROPERTIES - IMPORTED_LOCATION "${SPDLOG_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${SPDLOG_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS "${SPDLOG_DEFINITIONS}") + if(NOT TARGET spdlog) + add_library(spdlog UNKNOWN IMPORTED) + set_target_properties(spdlog PROPERTIES + IMPORTED_LOCATION "${SPDLOG_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${SPDLOG_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "${SPDLOG_DEFINITIONS}") endif() endif() |