Skip to content

Commit

Permalink
suffix library output name with _static when building both static and…
Browse files Browse the repository at this point in the history
… shared on windows
  • Loading branch information
adriendelsalle committed Apr 12, 2024
1 parent 2abd63b commit 744aee5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cmake/macros/SundialsAddLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,17 @@ macro(sundials_add_library target)

# set the correct output name
if(sundials_add_library_OUTPUT_NAME)
set_target_properties(${_actual_target_name} PROPERTIES
OUTPUT_NAME ${sundials_add_library_OUTPUT_NAME}
CLEAN_DIRECT_OUTPUT 1
)
if(WIN32 AND ${_libtype} MATCHES "STATIC")
set_target_properties(${_actual_target_name} PROPERTIES
OUTPUT_NAME "${sundials_add_library_OUTPUT_NAME}_static"
CLEAN_DIRECT_OUTPUT 1
)
else()
set_target_properties(${_actual_target_name} PROPERTIES
OUTPUT_NAME ${sundials_add_library_OUTPUT_NAME}
CLEAN_DIRECT_OUTPUT 1
)
endif()
else()
set_target_properties(${_actual_target_name} PROPERTIES
OUTPUT_NAME ${target}
Expand Down

0 comments on commit 744aee5

Please sign in to comment.