aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Schupp <w.schupp@a1.net>2021-12-15 07:02:13 +0100
committerGitHub <noreply@github.com>2021-12-15 07:02:13 +0100
commit5dad2af01008c1ea9c7e601b869fe977bd538247 (patch)
treeb11c8bfb73c922a1fd3d1d0a30c986047b270fe4
parent2fa799fc5d6a89282c9e5a0924465b6f2f7c13ca (diff)
parenta23e84934a5dff03c93c74f5a64d67fdece6cdd5 (diff)
Merge pull request #20674 from wsnipex/spdlog
[cmake] fix building with internal spdlog after #20637
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/modules/FindSpdlog.cmake13
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()