PKGBUILDs/alarm/kodi-rbp-git/fix_fmt_race_condition.patch
2018-07-23 19:08:44 -06:00

53 lines
2.1 KiB
Diff

commit c2d8c14a29018a6dbd39a00454addd5944f67fcb
Author: wsnipex <wsnipex@a1.net>
Date: Sun Jul 22 12:34:38 2018 +0200
fmt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4350a82bd1..9676919ce5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -288,7 +288,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..60a6978a11 100644
--- a/cmake/modules/FindFmt.cmake
+++ b/cmake/modules/FindFmt.cmake
@@ -34,7 +34,7 @@ if(ENABLE_INTERNAL_FMT)
set(FMT_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libfmt.a)
set(FMT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
- externalproject_add(fmt
+ externalproject_add(Fmt
URL ${FMT_URL}
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
PREFIX ${CORE_BUILD_DIR}/fmt
@@ -43,8 +43,10 @@ if(ENABLE_INTERNAL_FMT)
-DFMT_DOC=OFF
-DFMT_TEST=OFF
"${EXTRA_ARGS}"
- BUILD_BYPRODUCTS ${FMT_LIBRARY})
- set_target_properties(fmt PROPERTIES FOLDER "External Projects")
+ BUILD_BYPRODUCTS ${FMT_LIBRARY} ${FMT_INCLUDE_DIR})
+ set_target_properties(Fmt PROPERTIES FOLDER "External Projects"
+ IMPORTED_LOCATION "${FMT_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${FMT_INCLUDE_DIR}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fmt
@@ -98,6 +100,5 @@ if(FMT_FOUND)
endif()
endif()
-mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)
-
endif()
+mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)