Norod: Default build type is set as Release, no shared libraries

pull/2045/head
Doron Adler 2018-03-20 13:46:03 +02:00
parent e2e09ba2fa
commit c2f22be99a
8 changed files with 58 additions and 4 deletions

View File

@ -39,10 +39,16 @@ CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT( Assimp ) PROJECT( Assimp )
# All supported options ############################################### # All supported options ###############################################
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
OPTION( BUILD_SHARED_LIBS OPTION( BUILD_SHARED_LIBS
"Build package with shared libraries." "Build package with shared libraries."
ON OFF
) )
OPTION( BUILD_FRAMEWORK OPTION( BUILD_FRAMEWORK
"Build package as Mac OS X Framework bundle." "Build package as Mac OS X Framework bundle."
OFF OFF

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "arm64") SET (CMAKE_SYSTEM_PROCESSOR "arm64")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv6") SET (CMAKE_SYSTEM_PROCESSOR "armv6")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv7s") SET (CMAKE_SYSTEM_PROCESSOR "armv7s")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv7") SET (CMAKE_SYSTEM_PROCESSOR "armv7")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "i386") SET (CMAKE_SYSTEM_PROCESSOR "i386")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -5,6 +5,14 @@ SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "x86_64") SET (CMAKE_SYSTEM_PROCESSOR "x86_64")
SET (IOS TRUE) SET (IOS TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

View File

@ -12,8 +12,8 @@ BUILD_DIR="./lib/iOS"
IOS_SDK_VERSION=$(xcodebuild -version -sdk iphoneos | grep SDKVersion | cut -f2 -d ':' | tr -d '[[:space:]]') IOS_SDK_VERSION=$(xcodebuild -version -sdk iphoneos | grep SDKVersion | cut -f2 -d ':' | tr -d '[[:space:]]')
################################### ###################################
BUILD_SHARED_LIBS=ON BUILD_SHARED_LIBS=OFF
BUILD_TYPE=MinSizeRel BUILD_TYPE=Release
################################################ ################################################
# Minimum iOS deployment target version # Minimum iOS deployment target version
@ -62,7 +62,7 @@ build_arch()
rm CMakeCache.txt rm CMakeCache.txt
cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_BOOST_WORKAROUND=ON -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
echo "[!] Building $1 library" echo "[!] Building $1 library"