diff options
author | fuzzard <fuzzard@kodi.tv> | 2023-10-21 17:38:06 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2023-10-26 14:04:37 +1000 |
commit | 45fa725a60248de237e0c808d480d8afb6a0ff42 (patch) | |
tree | 2b29bc93c455b3c7eb4f4b900973def94f007c58 /cmake | |
parent | 3b94c54408ea1f6ba3be08a3fa3d9009be8e51ac (diff) |
[cmake] FindFMT further simplification
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindFmt.cmake | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake index cf78e6d24e..6a3f36eab8 100644 --- a/cmake/modules/FindFmt.cmake +++ b/cmake/modules/FindFmt.cmake @@ -36,8 +36,6 @@ if(NOT TARGET fmt::fmt) endmacro() set(MODULE_LC fmt) - # Default state - set(FORCE_BUILD OFF) SETUP_BUILD_VARS() @@ -46,12 +44,9 @@ if(NOT TARGET fmt::fmt) HINTS ${DEPENDS_PATH}/lib/cmake ${${CORE_PLATFORM_NAME_LC}_SEARCH_CONFIG}) - if((FMT_VERSION VERSION_LESS ${${MODULE}_VER} AND ENABLE_INTERNAL_FMT) OR ((CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) AND ENABLE_INTERNAL_FMT)) - - # Set FORCE_BUILD to enable fmt::fmt property that build will occur - set(FORCE_BUILD ON) + # build internal module buildFmt() else() if(NOT TARGET fmt::fmt) @@ -131,10 +126,9 @@ if(NOT TARGET fmt::fmt) if(TARGET fmt) add_dependencies(fmt::fmt fmt) - # If a force build is done, let any calling packages know they may want to rebuild - if(FORCE_BUILD) - set_target_properties(fmt::fmt PROPERTIES LIB_BUILD ON) - endif() + # We are building as a requirement, so set LIB_BUILD property to allow calling + # modules to know we will be building, and they will want to rebuild as well. + set_target_properties(fmt::fmt PROPERTIES LIB_BUILD ON) endif() # Add internal build target when a Multi Config Generator is used |