I’m trying generate the Xcode project of ASSIMP using Cmake. I know there is already one in it’s workspace folder. And I just trying to generate myself. I tried to write the cmakelist.txt:
cmake_minimum_required(VERSION 2.8)
project(assimp)
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
set(CMAKE_OSX_SYSROOT iphoneos5.1)
set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
add_subdirectory(assimp)
then i ran this command:
#!/bin/bash
cd "$(dirname "$0")"/assimp
if [ ! -d xcode ]
then
mkdir xcode
fi
cd xcode
cmake -G Xcode ../.. -DINSTALL_LIBS=ON -DCMAKE_INSTALL_PREFIX=../.. -DBUILD_SHARED_LIBS=OFF -DBUILD_ASSIMP_TOOLS:BOOL=OFF -DENABLE_BOOST_WORKAROUND=ON
# Device or simulator
xcodebuild -target install -configuration Release
it generates the Xcode project but in products is libassimp.dylib and got the “target specifies product type ‘com.apple.product-type.library.dynamic’, but there’s no such product type for the ‘iphoneos’ platform” error.
How to change the ‘com.apple.product-type.library.dynamic’ to static? I had set -DBUILD_SHARED_LIBS=OFF but it didn’t work.
I searched the web and can’t find what is causing the problem.
Thank you very much for any help!
in cmakelist.txt at /code/ directory there is a line: ADD_LIBRARY( assimp SHARED just change the SHARED to STATIC
the cmakelist i’m using: