Compiling for iOS with CMake

前端 未结 4 798
难免孤独
难免孤独 2020-12-24 14:49

I\'ve compiled a C++ static library by using CMake as my building tool and I want to link it to my iOS app.
I created a simple \'Empty\' application in Xcode and linked

4条回答
  •  情歌与酒
    2020-12-24 15:05

    By following cmake-toolchains documentation I did like below:

    cmake -G Xcode -B build \
        -DCMAKE_SYSTEM_NAME=iOS \
        -DCMAKE_Swift_COMPILER_FORCED=true \
        -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
    

    Note: That assignment CMAKE_OSX_DEPLOYMENT_TARGET=11.0 is not a mistake when targeting iOS.

提交回复
热议问题