From ae25f7968efca30a6483ad7802ccfa5419f6330a Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Wed, 16 Feb 2022 22:24:10 +0300 Subject: [PATCH] add ability to build Apple framework using CMAKE_FRAMEWORK --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5ba5216..f2ea8ef5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,6 +252,7 @@ set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.") set_target_properties(fmt PROPERTIES VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR} + PUBLIC_HEADER "${FMT_HEADERS}" DEBUG_POSTFIX "${FMT_DEBUG_POSTFIX}") # Set FMT_LIB_NAME for pkg-config fmt.pc. We cannot use the OUTPUT_NAME target @@ -329,6 +330,7 @@ if (FMT_INSTALL) install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} LIBRARY DESTINATION ${FMT_LIB_DIR} ARCHIVE DESTINATION ${FMT_LIB_DIR} + FRAMEWORK DESTINATION "." RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # Use a namespace because CMake provides better diagnostics for namespaced