From de5c733b9a0322a50ba9b315a687f746b631096b Mon Sep 17 00:00:00 2001 From: Oleh Derevenko Date: Mon, 19 Dec 2022 17:08:32 +0200 Subject: [PATCH] Fixed: A potential linker error fix for the case of cross-compiling into OSX (issue #80) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7136163..f0e910fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,6 +546,12 @@ target_compile_definitions( if(APPLE) target_compile_definitions(ODE PRIVATE -DMAC_OS_X_VERSION=${MAC_OS_X_VERSION}) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_library(CORESERVICES_FW NAMES CoreServices) + if (CORESERVICES_FW) + target_link_libraries(ODE PRIVATE ${CORESERVICES_FW}) + endif() + endif() endif() if(WIN32) -- 2.11.4.GIT