From a02bb61e902064d0a50264cb15cb8906cc5a414a Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 24 Oct 2018 22:40:39 +0200 Subject: [PATCH] Fix build errors after modifying CMake setup.h.in Always set a value to ICONV_CONST so it will be defined in setup.h. Add a check for strtoull to prevent a macro redefined warning. Link with WebKit framework to fix macOS build with wxUSE_WEBKIT. --- build/cmake/lib/core/CMakeLists.txt | 5 +++++ build/cmake/setup.cmake | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/cmake/lib/core/CMakeLists.txt b/build/cmake/lib/core/CMakeLists.txt index e7ed60ef67..e0a0a2a52e 100644 --- a/build/cmake/lib/core/CMakeLists.txt +++ b/build/cmake/lib/core/CMakeLists.txt @@ -70,6 +70,11 @@ if(WXOSX_COCOA) wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox" ) + if(wxUSE_WEBKIT) + wx_lib_link_libraries(core PUBLIC + "-framework WebKit" + ) + endif() endif() if(WXGTK AND wxUSE_PRIVATE_FONTS) wx_lib_include_directories(core PUBLIC diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 46092b0797..5656b9dc30 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -221,6 +221,7 @@ if(NOT WIN32) if(wxUSE_LIBICONV AND NOT APPLE) find_package(Iconv REQUIRED) set(HAVE_ICONV ON) + set(ICONV_CONST " ") if(ICONV_SECOND_ARGUMENT_IS_CONST) set(ICONV_CONST "const") endif() @@ -554,7 +555,7 @@ endforeach() # Check various functions foreach(func fsync - snprintf vsnprintf strnlen + snprintf vsnprintf strnlen strtoull setpriority ) string(TOUPPER ${func} func_upper)