diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/modules/FindFmt.cmake | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8561f5090c..e51e0aeaa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,7 +284,7 @@ endif() # main library (used for main binary and tests) add_library(lib${APP_NAME_LC} STATIC $<TARGET_OBJECTS:compileinfo>) -add_dependencies(lib${APP_NAME_LC} libcpluff ffmpeg dvdnav crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) +add_dependencies(lib${APP_NAME_LC} libcpluff ffmpeg dvdnav crossguid fmt ${PLATFORM_GLOBAL_TARGET_DEPS}) set_target_properties(lib${APP_NAME_LC} PROPERTIES PREFIX "") # Other files (IDE) diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake index ec0a12cb9e..df18d854ed 100644 --- a/cmake/modules/FindFmt.cmake +++ b/cmake/modules/FindFmt.cmake @@ -90,14 +90,13 @@ if(FMT_FOUND) set(FMT_LIBRARIES ${FMT_LIBRARY}) set(FMT_INCLUDE_DIRS ${FMT_INCLUDE_DIR}) - if(NOT TARGET Fmt::Fmt) - add_library(Fmt::Fmt UNKNOWN IMPORTED) - set_target_properties(Fmt::Fmt PROPERTIES - IMPORTED_LOCATION "${FMT_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${FMT_INCLUDE_DIR}") + if(NOT TARGET fmt) + add_library(fmt UNKNOWN IMPORTED) + set_target_properties(fmt PROPERTIES + IMPORTED_LOCATION "${FMT_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${FMT_INCLUDE_DIR}") endif() endif() -mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY) - endif() +mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY) |