diff options
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 10 | ||||
-rw-r--r-- | cmake/base-config-ix.cmake | 9 |
2 files changed, 17 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 6ed4f1616..1a2e48992 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -195,8 +195,14 @@ function(add_compiler_rt_runtime name type) set_target_properties(${libname} PROPERTIES OUTPUT_NAME ${output_name_${libname}}) set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime") - if(LIB_LINK_LIBS AND ${type} STREQUAL "SHARED") - target_link_libraries(${libname} ${LIB_LINK_LIBS}) + if(${type} STREQUAL "SHARED") + if(LIB_LINK_LIBS) + target_link_libraries(${libname} ${LIB_LINK_LIBS}) + endif() + if(WIN32 AND NOT CYGWIN AND NOT MINGW) + set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") + set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") + endif() endif() install(TARGETS ${libname} ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake index 830e443ea..4ea9eb8ce 100644 --- a/cmake/base-config-ix.cmake +++ b/cmake/base-config-ix.cmake @@ -86,6 +86,15 @@ if(APPLE) option(COMPILER_RT_ENABLE_TVOS "Enable building for tvOS - Experimental" Off) endif() +if(WIN32 AND NOT MINGW AND NOT CYGWIN) + set(CMAKE_SHARED_LIBRARY_PREFIX_C "") + set(CMAKE_SHARED_LIBRARY_PREFIX_CXX "") + set(CMAKE_STATIC_LIBRARY_PREFIX_C "") + set(CMAKE_STATIC_LIBRARY_PREFIX_CXX "") + set(CMAKE_STATIC_LIBRARY_SUFFIX_C ".lib") + set(CMAKE_STATIC_LIBRARY_SUFFIX_CXX ".lib") +endif() + macro(test_targets) # Find and run MSVC (not clang-cl) and get its version. This will tell clang-cl # what version of MSVC to pretend to be so that the STL works. |