From bdd1d2237a07bc922b9baf470387a23dbd0ef97c Mon Sep 17 00:00:00 2001 From: ENDERZOMBI102 Date: Fri, 2 Aug 2024 01:28:45 +0200 Subject: [PATCH 1/2] fix: Hack cryptopp to make it compile under clang for windows --- ext/_ext.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/_ext.cmake b/ext/_ext.cmake index 280c2766c..cbee8a6df 100644 --- a/ext/_ext.cmake +++ b/ext/_ext.cmake @@ -13,6 +13,9 @@ if (NOT TARGET cryptopp::cryptopp) set(CRYPTOPP_BUILD_TESTING OFF CACHE INTERNAL "") set(CRYPTOPP_INSTALL OFF CACHE INTERNAL "") add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/cryptopp") + if (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC) + target_compile_options(cryptopp PRIVATE -mcrc32 -mssse3) + endif() endif() From ceb9f3c324bc2d4004b91d6432241959534bde07 Mon Sep 17 00:00:00 2001 From: ENDERZOMBI102 Date: Fri, 2 Aug 2024 01:35:11 +0200 Subject: [PATCH 2/2] fix: Compressonator failing on linux while targeting windows --- ext/compressonator/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/compressonator/CMakeLists.txt b/ext/compressonator/CMakeLists.txt index 5c97b72d5..a4757f151 100644 --- a/ext/compressonator/CMakeLists.txt +++ b/ext/compressonator/CMakeLists.txt @@ -1,7 +1,7 @@ set(COMPRESSONATOR_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "") function(target_link_compressonator TARGET) - if(MSVC) + if(WIN32) get_target_property(TARGET_MSVC_RUNTIME_LIBRARY ${TARGET} MSVC_RUNTIME_LIBRARY) if((TARGET_MSVC_RUNTIME_LIBRARY MATCHES "NOTFOUND$") OR (TARGET_MSVC_RUNTIME_LIBRARY MATCHES "DLL$")) target_link_libraries(${TARGET} PRIVATE