File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ include(Helpers)
2020# === Coverage ===
2121include (Coverage)
2222
23+ # === Logging ===
24+ include (Logging)
25+
2326# === Library ===
2427add_subdirectory (src)
2528
Original file line number Diff line number Diff line change 1+ include (FetchContent)
2+
3+ FetchContent_Declare(
4+ spdlog
5+ URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.zip
6+ DOWNLOAD_EXTRACT_TIMESTAMP true
7+ )
8+
9+ FetchContent_MakeAvailable(spdlog)
Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ install(TARGETS ${PROJECT_NAME}_library
1515
1616install (DIRECTORY include /${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
1717
18+ # Export spdlog dependency
19+ install (TARGETS spdlog
20+ EXPORT ${PROJECT_NAME} Targets
21+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
22+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
23+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
24+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
25+ )
26+
1827# Export for find_package
1928install (EXPORT ${PROJECT_NAME} Targets
2029 FILE ${PROJECT_NAME} Targets.cmake
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ target_include_directories(${PROJECT_NAME}_library
1212 $<INSTALL_INTERFACE:include >
1313)
1414
15+ target_link_libraries (${PROJECT_NAME} _library PRIVATE spdlog)
16+
1517enable_strict_warnings(${PROJECT_NAME} _library)
1618enable_sanitizers(${PROJECT_NAME} _library)
1719enable_coverage(${PROJECT_NAME} _library)
You can’t perform that action at this time.
0 commit comments