@@ -20,40 +20,31 @@ find_package(spdlog CONFIG REQUIRED)
2020find_package (Threads REQUIRED)
2121
2222# For some reasons, using target_compile_definitions does not set the definitions properly
23- add_compile_definitions (
24- SPDLOG_FMT_EXTERNAL "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${BUILD_LOG_LEVEL} "
25- )
23+ add_compile_definitions (SPDLOG_FMT_EXTERNAL "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${BUILD_LOG_LEVEL} " )
2624
2725add_library (libmamba-spdlog INTERFACE )
28- # target_sources(libmamba-spdlog
29- # INTERFACE
30- # include/mamba/spdlog/logging_spdlog.hpp
31- # include/mamba/spdlog/logging_spdlog_impl.hpp
32- # )
26+ # target_sources(libmamba-spdlog INTERFACE include/mamba/spdlog/logging_spdlog.hpp
27+ # include/mamba/spdlog/logging_spdlog_impl.hpp )
3328add_library (mamba::libmamba-spdlog ALIAS libmamba-spdlog)
3429
35- target_include_directories (libmamba-spdlog INTERFACE
36- $<BUILD_INTERFACE: ${CMAKE_CURRENT_SOURCE_DIR} / include >
37- $<INSTALL_INTERFACE:include >
30+ target_include_directories (
31+ libmamba-spdlog
32+ INTERFACE $<BUILD_INTERFACE: ${CMAKE_CURRENT_SOURCE_DIR} / include > $<INSTALL_INTERFACE:include >
3833)
3934
40-
41- target_link_libraries ( libmamba-spdlog
35+ target_link_libraries (
36+ libmamba-spdlog
4237 INTERFACE
4338 ${libmamba_target}
44-
45- # Since conda-forge spdlog is built with a bundled version of fmt we use the header
46- # only version to avoid chasing after the correct fmt version matching the one used
47- # in the bundle.
39+ # Since conda-forge spdlog is built with a bundled version of fmt we use the header only
40+ # version to avoid chasing after the correct fmt version matching the one used in the
41+ # bundle.
4842 spdlog::spdlog_header_only
49-
50- # We need the threading facilities available whatever the user use.
51- # This should have been part of depending on spdlog but for some reason it's
52- # not made available automatically.
43+ # We need the threading facilities available whatever the user use. This should have been
44+ # part of depending on spdlog but for some reason it's not made available automatically.
5345 Threads::Threads
5446)
5547
56-
5748mamba_target_add_compile_warnings(libmamba-spdlog WARNING_AS_ERROR ${MAMBA_WARNING_AS_ERROR} )
5849
5950target_compile_features (libmamba-spdlog INTERFACE cxx_std_20)
@@ -71,7 +62,8 @@ write_basic_package_version_file(
7162 VERSION 1.0
7263 COMPATIBILITY AnyNewerVersion
7364)
74- install (TARGETS libmamba-spdlog
65+ install (
66+ TARGETS libmamba-spdlog
7567 EXPORT ${PROJECT_NAME} Targets
7668 LIBRARY DESTINATION lib COMPONENT Runtime
7769 ARCHIVE DESTINATION lib COMPONENT Development
@@ -85,17 +77,20 @@ configure_package_config_file(
8577 INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
8678)
8779
88- install (EXPORT ${PROJECT_NAME} Targets
80+ install (
81+ EXPORT ${PROJECT_NAME} Targets
8982 NAMESPACE mamba::
90- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME} )
83+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
84+ )
9185
92- install (FILES "${PROJECT_BINARY_DIR} /${PROJECT_NAME} Version.cmake"
93- "${PROJECT_BINARY_DIR} /${PROJECT_NAME} Config.cmake"
94- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME} )
86+ install (
87+ FILES "${PROJECT_BINARY_DIR} /${PROJECT_NAME} Version.cmake"
88+ "${PROJECT_BINARY_DIR} /${PROJECT_NAME} Config.cmake"
89+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
90+ )
9591
9692install (DIRECTORY ${PROJECT_SOURCE_DIR} /include / DESTINATION include )
9793
9894if (BUILD_LIBMAMBA_SPDLOG_TESTS)
9995 add_subdirectory (tests/)
10096endif ()
101-
0 commit comments