Skip to content

Commit 1df2b07

Browse files
committed
force spdlog as static
1 parent 68117cc commit 1df2b07

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

cpp/thirdparty/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,8 @@ if(MEMILIO_USE_BUNDLED_SPDLOG)
3838
if(NOT spdlog_POPULATED)
3939
FetchContent_Populate(spdlog)
4040

41-
# Use spdlogs own shared/static switch (SPDLOG_BUILD_SHARED). Default to
42-
# the project setting unless we explicitly want a static lib (e.g. wheels).
43-
if(MEMILIO_PREFER_STATIC_SPDLOG)
44-
set(SPDLOG_BUILD_SHARED OFF CACHE BOOL "Build spdlog as a shared library" FORCE)
45-
elseif(NOT DEFINED SPDLOG_BUILD_SHARED)
46-
set(SPDLOG_BUILD_SHARED ${BUILD_SHARED_LIBS} CACHE BOOL "Build spdlog as a shared library" FORCE)
47-
endif()
41+
# Force static spdlog (wheels stay self-contained)
42+
set(SPDLOG_BUILD_SHARED OFF CACHE BOOL "Build spdlog as a static library" FORCE)
4843

4944
add_subdirectory(${spdlog_SOURCE_DIR} ${spdlog_BINARY_DIR} EXCLUDE_FROM_ALL)
5045
endif()

pycode/memilio-simulation/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,3 @@ if(TARGET jsoncpp_lib)
173173
DESTINATION lib
174174
)
175175
endif()
176-
177-
if(TARGET spdlog)
178-
get_target_property(_SPDLOG_LIB_TYPE spdlog TYPE)
179-
180-
if(_SPDLOG_LIB_TYPE STREQUAL "SHARED_LIBRARY")
181-
set_target_properties(spdlog PROPERTIES
182-
INSTALL_RPATH "$ORIGIN"
183-
)
184-
install(FILES
185-
$<TARGET_FILE:spdlog>
186-
$<TARGET_SONAME_FILE:spdlog>
187-
$<TARGET_LINKER_FILE:spdlog>
188-
DESTINATION lib
189-
)
190-
endif()
191-
endif()

0 commit comments

Comments
 (0)