Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoreFoundation lib not found #30

Closed
rokups opened this issue May 16, 2017 · 1 comment
Closed

CoreFoundation lib not found #30

rokups opened this issue May 16, 2017 · 1 comment

Comments

@rokups
Copy link

rokups commented May 16, 2017

Hello,
I got project with following cmake code:

  find_library(CORE_FOUNDATION CoreFoundation)
  if(NOT CORE_FOUNDATION)
    message(FATAL_ERROR "Apple Core Foundation framework not found!")
  endif()

Attempt to build it with either CROSS_TRIPLE=i386-apple-darwin or CROSS_TRIPLE=x86_64-apple-darwin results in the error about missing lib. I failed to find any extra instructions on the matter. Is there a need to do some extra setup to provide these libs myself or is this a bug?

@rokups
Copy link
Author

rokups commented Jul 6, 2017

I managed to solve this with following CMake toolchain file:

set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_SYSTEM_VERSION 10.9)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})
set(CMAKE_C_COMPILER cc)
set(CMAKE_CXX_COMPILER c++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
set(CMAKE_FIND_FRAMEWORK FIRST)

set(CMAKE_OSX_SYSROOT_PATH /usr/osxcross/SDK/MacOSX10.10.sdk)
set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT_PATH})
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
    ${CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
    ${CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks
    ${CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
)

@rokups rokups closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant