Skip to content
Snippets Groups Projects
Commit 1d060c48 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Manually compile fmt

parent 13114f81
Branches
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ add_subdirectory("examples" EXCLUDE_FROM_ALL)
add_subdirectory("libs")
add_subdirectory("test")
target_link_libraries(amdis PUBLIC fmt::fmt)
target_link_libraries(amdis PUBLIC fmt)
if (MTL_FOUND)
target_link_libraries(amdis PUBLIC MTL::MTL)
......
......@@ -9,9 +9,13 @@ FetchContent_Declare(fmt # name of the content
FetchContent_GetProperties(fmt)
if(NOT fmt_POPULATED)
FetchContent_Populate(fmt)
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
endif()
install(TARGETS fmt EXPORT amdis-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/fmt")
dune_add_library(fmt SOURCES ${fmt_SOURCE_DIR}/src/format.cc)
target_compile_features(fmt PRIVATE cxx_std_17)
target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${fmt_SOURCE_DIR}/include>)
file(GLOB FMT_HEADERS ${fmt_SOURCE_DIR}/include/fmt/*.h)
install(FILES ${FMT_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fmt)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment