From 215e9b1ac2abfd0419abde6fe4ba9b0dfcc2a19a Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Fri, 10 Nov 2023 09:50:50 +0000 Subject: [PATCH] build: fix vcpkg support for Linux Fix the Linux-specific date command in the cmake code, and skip the ABI check for vcpkg, because it is failing for some reason on Linux+vcpkg. The resulting executable works perfectly. This should also help on mac, I will test this later. Signed-off-by: Rafael Kitover --- cmake/Set-Toolchain-vcpkg.cmake | 2 +- src/wx/CMakeLists.txt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index 711267f0..c0fbaa7b 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -60,7 +60,7 @@ function(vcpkg_seconds) ) else() execute_process( - COMMAND date +'%H:%M:%S' + COMMAND date +%H:%M:%S OUTPUT_VARIABLE time ) endif() diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index e9d39ef2..1a5c1e89 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -110,7 +110,7 @@ endif() # on VS with vcpkg we can't use FindwxWidgets, we have to set everything up # manually because the package is broken -if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES vcpkg) +if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg") # set up wxwidgets stuff set(libtype u) unset(arch_suffix) @@ -314,9 +314,10 @@ else() # need it because everything is built with clang set(ABI_CHECK FALSE) - if((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) + if((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT CMAKE_CROSSCOMPILING - AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD + AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" + AND NOT CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg" AND NOT TRANSLATIONS_ONLY) set(ABI_CHECK TRUE)