diff --git a/CMakeLists.txt b/CMakeLists.txt index 57f9e892f..0579aefed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ endif() OPTION( BUILD_SHARED_LIBS "Build package with shared libraries." - OFF + ON ) OPTION( BUILD_FRAMEWORK @@ -433,11 +433,11 @@ IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) # Why here? Maybe user do not want Qt viewer and have no Qt. # Why assimp_qt_viewer/CMakeLists.txt still contain similar check? # Because viewer can be build independently of Assimp. - FIND_PACKAGE(OpenGL QUIET) IF (NOT IOS) FIND_PACKAGE(Qt5Widgets QUIET) ENDIF (NOT IOS) FIND_PACKAGE(DevIL QUIET) + FIND_PACKAGE(OpenGL QUIET) IF ( Qt5Widgets_FOUND AND IL_FOUND AND OPENGL_FOUND) ADD_SUBDIRECTORY( tools/assimp_qt_viewer/ ) ELSE() diff --git a/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake index 4abcac764..89da24f09 100644 --- a/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake index 5aa7f90f1..686b2faab 100644 --- a/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake index d35bfce03..f34aad1fe 100644 --- a/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake index d563bb078..46a0afbea 100644 --- a/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake index 6d077567e..919817851 100644 --- a/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake index 354487ce0..a9514ddaa 100644 --- a/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake +++ b/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake @@ -9,6 +9,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +SET (CC "${DEVROOT}/usr/bin/clang") +SET (CXX "${DEVROOT}/usr/bin/clang++") + +CMAKE_FORCE_C_COMPILER (${CC} LLVM) +CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM) + set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/port/iOS/build.sh b/port/iOS/build.sh index 7e454fae2..9d4338889 100755 --- a/port/iOS/build.sh +++ b/port/iOS/build.sh @@ -24,9 +24,10 @@ IOS_SDK_TARGET=$MIN_IOS_VERSION XCODE_ROOT_DIR=$(xcode-select --print-path) TOOLCHAIN=$XCODE_ROOT_DIR/Toolchains/XcodeDefault.xctoolchain -BUILD_ARCHS_DEVICE="armv7 arm64" -BUILD_ARCHS_SIMULATOR="x86_64 i386" -BUILD_ARCHS_ALL=(armv7 arm64 x86_64 i386) +BUILD_ARCHS_DEVICE="arm64" +BUILD_ARCHS_SIMULATOR="x86_64" +BUILD_ARCHS_ALL=(arm64 x86_64) +#BUILD_ARCHS_ALL=(armv7 arm64 x86_64 i386) CPP_DEV_TARGET_LIST=(miphoneos-version-min mios-simulator-version-min) CPP_DEV_TARGET=