Skip to content

Commit 5a064c9

Browse files
committed
add back MSVC_TOOLCHAIN
1 parent 80e0a4b commit 5a064c9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ set(ICEBERG_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
4646
set(ICEBERG_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
4747
set(ICEBERG_INSTALL_DOCDIR "share/doc/${PROJECT_NAME}")
4848

49+
if(WIN32 AND NOT MINGW)
50+
set(MSVC_TOOLCHAIN TRUE)
51+
else()
52+
set(MSVC_TOOLCHAIN FALSE)
53+
endif()
54+
4955
include(CMakeParseArguments)
5056
include(BuildUtils)
5157
include(ThirdpartyToolchain)

cmake_modules/BuildUtils.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,13 @@ function(ADD_ICEBERG_LIB LIB_NAME)
183183
target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES})
184184
endif()
185185

186-
set_target_properties(${LIB_NAME}_static PROPERTIES OUTPUT_NAME ${LIB_NAME})
186+
if(MSVC_TOOLCHAIN)
187+
set(LIB_NAME_STATIC ${LIB_NAME}_static)
188+
else()
189+
set(LIB_NAME_STATIC ${LIB_NAME})
190+
endif()
191+
192+
set_target_properties(${LIB_NAME}_static PROPERTIES OUTPUT_NAME ${LIB_NAME_STATIC})
187193

188194
if(ARG_STATIC_INSTALL_INTERFACE_LIBS)
189195
target_link_libraries(${LIB_NAME}_static

0 commit comments

Comments
 (0)