Skip to content
Snippets Groups Projects
Commit df785acc authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Proper way of handling fmt dependency

parent 868812fc
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!77Support for recurrent networks
Pipeline #39481 passed
......@@ -40,6 +40,7 @@ FetchContent_Declare(
set(FMT_SYSTEM_HEADERS ON)
FetchContent_MakeAvailable(fmt)
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
##############################################
# Create target and set properties
......@@ -72,7 +73,7 @@ if (PYBIND)
)
endif()
target_link_libraries(${module_name} PUBLIC fmt::fmt-header-only)
target_link_libraries(${module_name} PUBLIC fmt::fmt)
target_compile_features(${module_name} PRIVATE cxx_std_14)
if (DOSANITIZE STREQUAL "ON")
......
@PACKAGE_INIT@
Include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.2.1 # or a later release
)
FetchContent_MakeAvailable(fmt)
include(CMakeFindDependencyMacro)
find_dependency(fmt)
include(${CMAKE_CURRENT_LIST_DIR}/aidge_core-config-version.cmake)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment