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 <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-11-10 09:50:50 +00:00
parent 0e68a2340c
commit 215e9b1ac2
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
2 changed files with 5 additions and 4 deletions

View File

@ -60,7 +60,7 @@ function(vcpkg_seconds)
)
else()
execute_process(
COMMAND date +'%H:%M:%S'
COMMAND date +%H:%M:%S
OUTPUT_VARIABLE time
)
endif()

View File

@ -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)