From 8d13c48cceed5db32659208d396f73b59de27c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E8=B5=B7?= Date: Thu, 14 Sep 2023 10:46:03 +0800 Subject: [PATCH] sts support compile on MACOS --- core/CMakeLists.txt | 9 +++++++++ sts/CMakeLists.txt | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index b0ab27d3b7..d25d9dcb18 100755 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -183,6 +183,15 @@ if(CMAKE_HOST_WIN32) target_compile_definitions(core PRIVATE CURL_STATICLIB _CRT_SECURE_NO_WARNINGS) +elseif(CMAKE_HOST_APPLE) + MESSAGE(STATUS "core: include & link for MACOS") + target_include_directories(core + PRIVATE /usr/local/include) + target_link_libraries(core + /usr/local/lib/libcrypto.dylib + curl + /usr/local/lib/libjsoncpp.dylib + /usr/local/lib/libuuid.dylib ) else() target_include_directories(core PRIVATE /usr/include/jsoncpp) diff --git a/sts/CMakeLists.txt b/sts/CMakeLists.txt index d2eadf6f97..e32f45c0fd 100644 --- a/sts/CMakeLists.txt +++ b/sts/CMakeLists.txt @@ -80,6 +80,12 @@ if(CMAKE_HOST_WIN32) set_target_properties(sts PROPERTIES COMPILE_OPTIONS "/bigobj") +elseif(CMAKE_HOST_APPLE) + MESSAGE(STATUS "sts: include & link for MACOS") + target_include_directories(sts + PRIVATE /usr/local/include) + target_link_libraries(sts + /usr/local/lib/libjsoncpp.dylib) else() target_include_directories(sts PRIVATE /usr/include/jsoncpp)