Skip to content

Commit

Permalink
sts support compile on MACOS
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenRi authored and JacksonTian committed Sep 14, 2023
1 parent be6c273 commit 8d13c48
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions sts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8d13c48

Please sign in to comment.