找不到cmake和osx框架
cmake and osx frameworks not found
我正在做一些实验,处理C++、Android JNI和OSX平台提供的JavaScriptCore框架。
我在使用cmake加载JavascriptCore框架时遇到了一些问题。它似乎找不到它…
我的cmakelist中有以下代码:
find_library(JSCORE JavaScriptCore)
if (NOT JSCORE)
MESSAGE(ERROR ": Framework JSCore not found")
endif()
我总是路过。
我不知道为什么,我怀疑是路径问题。
有人知道或有一些建议,让我可以在我的C++库中加载JSCore框架吗?
感谢您的帮助
配置以下项目可以成功找到库。你能分享一个完整的例子吗?
cmake_minimum_required(VERSION 3.10)
project(Test)
find_library(JSCORE_LIBRARY JavaScriptCore)
if(NOT JSCORE_LIBRARY)
MESSAGE(FATAL_ERROR "Framework JSCore not found")
endif()
message(STATUS "JSCORE_LIBRARY: ${JSCORE_LIBRARY}")
输出:
$ /Volumes/Dashboards/Support/CMake-3.12.0.app/Contents/bin/cmake ../
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- [...]
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JSCORE_LIBRARY: /System/Library/Frameworks/JavaScriptCore.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/test/bld
相关文章:
- 在没有Xcode的情况下在Mac捆绑包中嵌入框架
- OSX MetalKit CVMetalTextureCacheCreateTextureFromImage失败,状态:
- catch框架有没有办法比较流或文件
- 如何将不同的可执行文件合并到一个窗口框架中进行编码?像浏览器一样
- 使用Qt框架在c ++类中创建API调用
- 如何在ECS框架中更新组件数据和通知系统
- OSX蓝牙打开RFCOMMChannelAsync声称已连接,但未建立连接,并且从未调用过委托
- VSCode IntelliSense无法识别SDL框架的SDL_image扩展库
- 用于C++的静态二进制检测或二进制重写工具和框架
- 在OSX上使用CMake将Adobe的XMP工具包构建为共享库的最简单方法是什么?
- GoogleMock是否仍然打算与任何测试框架一起使用?
- 带有框架的 QGraphicsTextItem 的 QPropertyAnimation 会使文本抖动
- 在C++中使用 Catch 测试框架编译错误"error: expected ';' at end of declaration list"
- C ++是否有C ++ 17 OSX 10.13.6的标志
- 各种版本的 Mac OSX 向后兼容性如何?(Xcode C++
- 修改生成文件以简化框架 #include 路径
- 找不到cmake和osx框架
- 是否可以将VTK转换为OSX框架包?
- 我可以在Xcode上为非基于osx的框架等编写C++代码吗
- 在OSX上链接OpenGL框架