Skip to content

Commit 11877f0

Browse files
Copilotjwinarske
andcommitted
Change spdlog to INTERFACE library with custom configuration
Co-authored-by: jwinarske <12262875+jwinarske@users.noreply.github.com>
1 parent a3934db commit 11877f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

third_party/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ install(TARGETS toolchain EXPORT sdbus-c++-targets)
1515
#
1616
# spdlog
1717
#
18-
add_subdirectory(spdlog)
19-
set(SPDLOG_INSTALL OFF CACHE BOOL "Do not install spdlog" FORCE)
20-
if (ENABLE_LTO AND IPO_SUPPORT_RESULT)
21-
set_property(TARGET spdlog PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
22-
endif ()
23-
target_link_libraries(spdlog PUBLIC toolchain::toolchain)
18+
set(SPDLOG_NO_EXCEPTIONS ON)
19+
set(SPDLOG_NO_THREAD_ID ON)
20+
set(SPDLOG_BUILD_PIC ON)
21+
set(SPDLOG_SANITIZE_ADDRESS ${SANITIZE_ADDRESS})
22+
add_library(spdlog INTERFACE)
23+
target_compile_options(spdlog INTERFACE -isystem${CMAKE_CURRENT_SOURCE_DIR}/spdlog/include)
2424

2525
#
2626
# glaze

0 commit comments

Comments
 (0)