summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2016-12-07 00:03:00 -0500
committerHubert Figuière <hub@figuiere.net>2016-12-07 00:04:31 -0500
commit6071af09b5e263b63e57b28ab8a78484bc65e3fe (patch)
tree45f97ac82e5582684d889ede0fdacaf2c6eddf2e /build
parent606a7df73750084a36fe69651e7b672333a76412 (diff)
Update to XMP SDK CC 2016.07
Diffstat (limited to 'build')
-rw-r--r--build/CMakeLists.txt7
-rwxr-xr-xbuild/GenerateXMPToolkitSDK_mac.sh20
-rwxr-xr-xbuild/GenerateXMPToolkitSDK_win.bat14
-rw-r--r--build/ProductConfig.cmake44
-rw-r--r--build/README.txt10
-rw-r--r--build/XMP_BuildInfo.h4
-rw-r--r--build/XMP_Config.cmake11
-rw-r--r--build/XMP_ConfigCommon.cmake15
-rwxr-xr-xbuild/shared/CMakeUtils.bat12
-rw-r--r--build/shared/SharedConfig.cmake2
-rw-r--r--build/shared/SharedConfig_Common.cmake8
-rw-r--r--build/shared/SharedConfig_Ios.cmake6
-rw-r--r--build/shared/SharedConfig_Linux.cmake15
-rw-r--r--build/shared/SharedConfig_Mac.cmake6
-rw-r--r--build/shared/SharedConfig_Win.cmake2
-rw-r--r--build/shared/ToolchainLLVM.cmake4
-rw-r--r--build/shared/Toolchain_ios.cmake13
17 files changed, 120 insertions, 73 deletions
diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
index 2a96ea9..6695c65 100644
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# Enable folder grouping of projects in IDEs
@@ -71,9 +71,8 @@ include(${XMP_ROOT}/build/XMP_Config.cmake)
# Sub projects
# ==============================================================================
add_subdirectory(${XMP_ROOT}/XMPCore/build ${XMP_ROOT}/XMPCore/build/${XMP_CMAKEFOLDER_NAME})
-if (NOT APPLE_IOS)
- add_subdirectory(${XMP_ROOT}/XMPFiles/build ${XMP_ROOT}/XMPFiles/build/${XMP_CMAKEFOLDER_NAME})
-endif()
+add_subdirectory(${XMP_ROOT}/XMPFiles/build ${XMP_ROOT}/XMPFiles/build/${XMP_CMAKEFOLDER_NAME})
+
# ==============================================================================
# configuration feedback
diff --git a/build/GenerateXMPToolkitSDK_mac.sh b/build/GenerateXMPToolkitSDK_mac.sh
index 659767c..e877640 100755
--- a/build/GenerateXMPToolkitSDK_mac.sh
+++ b/build/GenerateXMPToolkitSDK_mac.sh
@@ -93,22 +93,18 @@ Generate
}
echo "1. Clean All"
-echo "2. Generate XMPToolkitSDK Dynamic 32"
-echo "3. Generate XMPToolkitSDK Static 32"
-echo "4. Generate XMPToolkitSDK Dynamic 64"
-echo "5. Generate XMPToolkitSDK Static 64"
-echo "6. Generate XMPToolkitSDK Static iOS"
-echo "7. Generate All"
+echo "2. Generate XMPToolkitSDK Dynamic 64"
+echo "3. Generate XMPToolkitSDK Static 64"
+echo "4. Generate XMPToolkitSDK Static iOS"
+echo "5. Generate All"
read -p "Enter your choice: " choice
case $choice in
1) clean;;
- 2) SDKDynamic32;;
- 3) SDKStatic32;;
- 4) SDKDynamic64;;
- 5) SDKStatic64;;
- 6) SDKStaticIos;;
- 7) SDKDynamic32; SDKStatic32; SDKDynamic64; SDKStatic64; SDKStaticIos;;
+ 2) SDKDynamic64;;
+ 3) SDKStatic64;;
+ 4) SDKStaticIos;;
+ 5) SDKDynamic64; SDKStatic64; SDKStaticIos;;
*) echo "ERROR: Invalid Choice, Exiting"; exit 1;;
esac
diff --git a/build/GenerateXMPToolkitSDK_win.bat b/build/GenerateXMPToolkitSDK_win.bat
index 767d625..0f18ec7 100755
--- a/build/GenerateXMPToolkitSDK_win.bat
+++ b/build/GenerateXMPToolkitSDK_win.bat
@@ -41,7 +41,7 @@ set GENERATE_ALL=On
:32DLL
echo "Generating XMPSDKToolkit Dynamic Win32"
-set VS_VERSION=2011
+set VS_VERSION=2015
set BUILD_TYPE=Dynamic
set BITS=32
IF "%GENERATE_ALL%"=="On" (
@@ -52,7 +52,7 @@ GOTO GenerateNow
:32LIB
echo "Generating XMPSDKToolkit Static Win32"
-set VS_VERSION=2011
+set VS_VERSION=2015
set BUILD_TYPE=Static
set BITS=32
IF "%GENERATE_ALL%"=="On" (
@@ -62,7 +62,7 @@ GOTO GenerateNow
:64DLL
echo "Generating XMPSDKToolkit Dynamic x64"
-set VS_VERSION=2011
+set VS_VERSION=2015
set BUILD_TYPE=Dynamic
set BITS=64
IF "%GENERATE_ALL%"=="On" (
@@ -72,7 +72,7 @@ GOTO GenerateNow
:64LIB
echo "Generating XMPSDKToolkit Static x64"
-set VS_VERSION=2011
+set VS_VERSION=2015
set BUILD_TYPE=Static
set BITS=64
IF "%GENERATE_ALL%"=="On" (
@@ -98,9 +98,9 @@ exit /B 0
:CLEANALL
echo "Cleaning..."
-if exist vc11 rmdir /S /Q vc11
-if exist ..\XMPCore\build\vc11 rmdir /S /Q ..\XMPCore\build\vc11
-if exist ..\XMPFiles\build\vc11 rmdir /S /Q ..\XMPFiles\build\vc11
+if exist vc14 rmdir /S /Q vc14
+if exist ..\XMPCore\build\vc14 rmdir /S /Q ..\XMPCore\build\vc14
+if exist ..\XMPFiles\build\vc14 rmdir /S /Q ..\XMPFiles\build\vc14
if exist ..\public\libraries\windows rmdir /S /Q ..\public\libraries\windows
if exist ..\public\libraries\windows_x64 rmdir /S /Q ..\public\libraries\windows_x64
echo "Done"
diff --git a/build/ProductConfig.cmake b/build/ProductConfig.cmake
index b310ca9..09c743e 100644
--- a/build/ProductConfig.cmake
+++ b/build/ProductConfig.cmake
@@ -18,7 +18,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Product Config for XMP Toolkit
@@ -29,7 +29,11 @@ if (UNIX)
if (APPLE_IOS)
set(XMP_PLATFORM_SHORT "ios")
- set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)")
+ if(XMP_BUILD_STATIC)
+ set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_INCLUDING_64_BIT)")
+ else()
+ set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_64_BIT)")
+ endif()
add_definitions(-DIOS_ENV=1)
# shared flags
@@ -77,14 +81,22 @@ if (UNIX)
#There were getting set from SetupTargetArchitecture.
if(APPLE_IOS)
- set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)")
+ set(XMP_CPU_FOLDERNAME "$(ARCHS)")
else()
if(CMAKE_CL_64)
set(XMP_BITDEPTH "64")
- set(XMP_CPU_FOLDERNAME "intel_64")
+ if(CMAKE_LIBCPP)
+ set(XMP_CPU_FOLDERNAME "intel_64_libcpp")
+ else()
+ set(XMP_CPU_FOLDERNAME "intel_64")
+ endif()
else()
set(XMP_BITDEPTH "32")
- set(XMP_CPU_FOLDERNAME "intel")
+ if(CMAKE_LIBCPP)
+ set(XMP_CPU_FOLDERNAME "intel_libcpp")
+ else()
+ set(XMP_CPU_FOLDERNAME "intel")
+ endif()
endif()
endif()
@@ -108,11 +120,11 @@ if (UNIX)
set(XMP_EXTRA_COMPILE_FLAGS "-m64")
set(XMP_EXTRA_LINK_FLAGS "-m64")
set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.4.4/linux2.6_64/lib64)
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.8.2/linux3.10_64/lib64)
else()
set(XMP_EXTRA_LINK_FLAGS "-m32 -mtune=i686")
set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.8.2/linux3.10_32/lib)
endif()
else()
# running toolchain
@@ -120,17 +132,17 @@ if (UNIX)
set(XMP_EXTRA_COMPILE_FLAGS "-m64")
set(XMP_EXTRA_LINK_FLAGS "-m64")
set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.4.4/linux2.6_64/lib64)
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.8.2/linux3.10_64/lib64)
else()
set(XMP_EXTRA_COMPILE_FLAGS "-m32 -mtune=i686")
set(XMP_EXTRA_LINK_FLAGS "-m32")
set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.8.2/linux3.10_32/lib)
endif()
set(XMP_EXTRA_BUILDMACHINE "Cross compiling")
endif()
- set(XMP_PLATFORM_VERSION "linux2.6") # add XMP_BUILDMODE_DIR to follow what other platforms do
+ set(XMP_PLATFORM_VERSION "linux3.10") # add XMP_BUILDMODE_DIR to follow what other platforms do
add_definitions(-DUNIX_ENV=1)
# Linux -------------------------------------------
@@ -139,8 +151,16 @@ if (UNIX)
#set(CMAKE_C_COMPILER "/user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/bin/gcc")
#set(CMAKE_CXX_COMPILER "/user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/bin/gcc")
#set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
- set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -ldl -luuid -lpthread ${XMP_GCC_LIBPATH}/libssp.a")
- set(XMP_SHARED_COMPILE_FLAGS "-Wno-multichar -Wno-implicit -D_FILE_OFFSET_BITS=64 -funsigned-char ${XMP_EXTRA_COMPILE_FLAGS} ${XMP_TOOLCHAIN_COMPILE_FLAGS}")
+
+if(CMAKE_CL_64)
+ set(XMPCORE_UUIDLIB_PATH "-L${XMPROOT_DIR}/XMPCore/third-party/uuid/lib64")
+else()
+ set(XMPCORE_UUIDLIB_PATH "-L${XMPROOT_DIR}/XMPCore/third-party/uuid/lib")
+endif()
+
+
+ set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined ${XMPCORE_UUIDLIB_PATH} ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -ldl -luuid -lpthread ${XMP_GCC_LIBPATH}/libssp.a")
+ set(XMP_SHARED_COMPILE_FLAGS "-Wno-multichar -D_FILE_OFFSET_BITS=64 -funsigned-char ${XMP_EXTRA_COMPILE_FLAGS} ${XMP_TOOLCHAIN_COMPILE_FLAGS}")
set(XMP_SHARED_COMPILE_DEBUG_FLAGS " ")
set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-fwrapv ")
diff --git a/build/README.txt b/build/README.txt
index 322c4c8..31bca61 100644
--- a/build/README.txt
+++ b/build/README.txt
@@ -2,11 +2,11 @@ This README describes steps to generate project files on different platforms. Th
WINDOWS 7 and above
Options to generate Project files in Windows are of the form "Generate XMPSDKToolkit [Dynamic|static] [Win32|x64]". An option of "Dynamic" indicates that the generated project files will build a dll for the XMP SDK components. On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components. Options for "Win32" or "x64" indicate that the generated project files will build the library for 32 bit or 64 bit applications respectively.
-1. Open the windows command prompt and change the current directory to <xmpsdk>/build. 2. Run the batch file GenerateXMPToolkitSDK_win.bat. There will be four options(2-5) to build projects for different configurations, one option(6) to generate projects for all configurations and one option(1) to clean all the projects. 3. After running the batch file (options 2-6),the vc11 projects(using cmake) will be generated at the location <xmpsdk>/build/vc11/<static|dynamic>/<windows|windows_x64>/<XMPToolkitSDK.sln|XMPToolkitSDK64.sln>. 4. Open the Visual Studio solution file and build XMP Toolkit SDK for debug/release configuration.
-MAC OS X 10.7 and above
-Options to generate Project files in Mac are of the form "Generate XMPSDKToolkit [Dynamic|static] [32|64|iOS]". An option of "Dynamic" indicates that the generated project files will build a framework for the XMP SDK components. On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components. Options for "32" or "64" indicate that the generated project files will build for 32 bit or 64 bit applications respectively. The option of "iOS" will generate the project files that will build XMP Core library for iOS simulators and iOS devices.
-1. Open the Terminal on Mac and change the current directory to <xmpsdk>/build. 2. Run the shell script GenerateXMPToolkitSDK_mac.sh. There will be five options(2-6) to build projects for different configurations, one option(7) to generate projects for all configurations and one option(1) to clean all the projects.
-3. After running the batch file (options 2-7),the xcode projects will be generated(using cmake) at the location <xmpsdk>/build/xcode/<static|dynamic>/<intel|intel_64>/<XMPToolkitSDK.xcodeproj|XMPToolkitSDK64.xcodeproj>.
+1. Open the windows command prompt and change the current directory to <xmpsdk>/build. 2. Run the batch file GenerateXMPToolkitSDK_win.bat. There will be four options(2-5) to build projects for different configurations, one option(6) to generate projects for all configurations and one option(1) to clean all the projects. 3. After running the batch file (options 2-6),the vc14 projects(using cmake) will be generated at the location <xmpsdk>/build/vc14/<static|dynamic>/<windows|windows_x64>/<XMPToolkitSDK.sln|XMPToolkitSDK64.sln>. 4. Open the Visual Studio solution file and build XMP Toolkit SDK for debug/release configuration.
+MAC OS X 10.9 and above
+Options to generate Project files in Mac are of the form "Generate XMPSDKToolkit [Dynamic|static] [64|iOS]". An option of "Dynamic" indicates that the generated project files will build a framework for the XMP SDK components. On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components. Option for "64" indicate that the generated project files will build for 64 bit applications. The option of "iOS" will generate the project files that will build XMP Core and XMP Files library for iOS simulators and iOS devices.
+1. Open the Terminal on Mac and change the current directory to <xmpsdk>/build. 2. Run the shell script GenerateXMPToolkitSDK_mac.sh. There will be three options(2-4) to build projects for different configurations, one option(5) to generate projects for all configurations and one option(1) to clean all the projects.
+3. After running the batch file (options 2-5),the xcode projects will be generated(using cmake) at the location <xmpsdk>/build/xcode/<static|dynamic>/<intel_64|ios>/<XMPToolkitSDK.xcodeproj|XMPToolkitSDK64.xcodeproj>.
4. Open the xcodeproj file and build XMP Toolkit SDK for debug/release configuration.
Note: When multiple Xcode versions are installed on a system, the developer has to use xcode-select command to specify the Xcode version that he/she wishes to use. This is done in two steps by fetching the current Xcode folder and changing it if required.
1) Fetch the current Xcode folder $ xcode-select -print-path
diff --git a/build/XMP_BuildInfo.h b/build/XMP_BuildInfo.h
index 35fe00e..21a6bb6 100644
--- a/build/XMP_BuildInfo.h
+++ b/build/XMP_BuildInfo.h
@@ -11,7 +11,7 @@
// =================================================================================================
*/
-#define kXMP_Copyright Copyright (c) 2013
-#define kXMP_CopyrightStr "Copyright (c) 2013"
+#define kXMP_Copyright Copyright (c) 2016
+#define kXMP_CopyrightStr "Copyright (c) 2016"
#endif /* __XMP_BuildInfo_h__ */
diff --git a/build/XMP_Config.cmake b/build/XMP_Config.cmake
index e0377de..dbfdf03 100644
--- a/build/XMP_Config.cmake
+++ b/build/XMP_Config.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# XMP config for XMPTOOLKIT and TestRunner
@@ -20,5 +20,14 @@ endif()
if(NOT DEFINED COMMON_BUILD_SHARED_DIR)
set(COMMON_BUILD_SHARED_DIR ${XMP_ROOT}/build/shared)
endif()
+
+set(INCLUDE_CPP_DOM_SOURCE TRUE)
+
+if (INCLUDE_CPP_DOM_SOURCE)
+ add_definitions(-DENABLE_CPP_DOM_MODEL=1)
+else (INCLUDE_CPP_DOM_SOURCE)
+ add_definitions(-DENABLE_CPP_DOM_MODEL=0)
+endif(INCLUDE_CPP_DOM_SOURCE)
+
include(${XMP_ROOT}/build/XMP_ConfigCommon.cmake)
diff --git a/build/XMP_ConfigCommon.cmake b/build/XMP_ConfigCommon.cmake
index 0dbb31b..1c17dc2 100644
--- a/build/XMP_ConfigCommon.cmake
+++ b/build/XMP_ConfigCommon.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
#add definition specific to XMP and shared by all projects
add_definitions(-DXML_STATIC=1 -DHAVE_EXPAT_CONFIG_H=1 )
@@ -18,7 +18,7 @@ if(XMP_BUILD_STATIC)
else()
add_definitions(-DXMP_DynamicBuild=1)
endif()
-add_definitions(-DBUILDING_XMPCOMMON_LIB=1)
+#add_definitions(-DBUILDING_XMPCOMMON_LIB=1)
set (XMPROOT_DIR ${XMP_ROOT})
set (COMPONENT XMP)
@@ -93,6 +93,7 @@ endfunction(CopyResource)
function(CreatePlugin productname outputDir copyWhat)
if(UNIX)
if(APPLE)
+ set_target_properties(${productname} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES")
if(APPLE_IOS OR XMP_BUILD_STATIC)
CreateStaticLib(${productname} ${outputDir})
CopyResource(${productname} "${outputDir}/lib${productname}.resources" "${copyWhat}")
@@ -116,6 +117,7 @@ function(CreatePlugin productname outputDir copyWhat)
set(XMP_SHARED_MODULE_SUFFIX ".xpi")
set_target_properties(${productname} PROPERTIES SUFFIX ${XMP_SHARED_MODULE_SUFFIX})
set_target_properties(${productname} PROPERTIES PREFIX "")
+ set_target_properties(${productname} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
set(LIBRARY_OUTPUT_PATH ${outputDir} PARENT_SCOPE)
# copy resources
#CopyResource(${productname} "${outputDir}/${productname}.resources" "${copyWhat}")
@@ -322,6 +324,15 @@ macro(SetPluginOutputPath)
endmacro(SetPluginOutputPath)
# ==============================================================================
+# Macro: Set Plugin Optional Output folder
+# Copy plugin output to optional folder in XMPFilesPlugins folder
+# ==============================================================================
+#
+macro(SetOptionalPluginOutputPath)
+ set(XMPPLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/XMPFilesPlugins/optional/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR})
+endmacro(SetOptionalPluginOutputPath)
+
+# ==============================================================================
# Function: Setup XMP for the application
# Copy XMP library, create a symbolic link to Plug-ins, copy MediaAccess and fixup
# ==============================================================================
diff --git a/build/shared/CMakeUtils.bat b/build/shared/CMakeUtils.bat
index d2719b5..dff0c42 100755
--- a/build/shared/CMakeUtils.bat
+++ b/build/shared/CMakeUtils.bat
@@ -8,7 +8,7 @@
REM Available Arguments:
REM [64|32] Bit Architecture (optional, 64 is default)
-REM [2008|2011|2011] VS Version(optional, 2011 is default)
+REM [2008|2011|2011] VS Version(optional, 2015 is default)
REM [Dynamic | Static] optional, Dynamic by default
REM [WarningAsError] optional
REM [Clean] optional
@@ -22,7 +22,7 @@ set CleanCMake=OFF
set XMPROOT=%buildSharedLoc%/../..
:: Default Generator
-set GeneratorVersion=Visual Studio 11
+set GeneratorVersion=Visual Studio 14 2015
set GeneratorArchitecture=Win64
set CMake_Arch64Bit=ON
set CMake_ARCH=x64
@@ -59,9 +59,9 @@ set CMake_LibTypeFolderName=dynamic
)
:: Visual Studio Version
- if /I "%1"=="2011" (
- echo "Generator VS 2011 specified"
- set GeneratorVersion=Visual Studio 11
+ if /I "%1"=="2015" (
+ echo "Generator VS 2015 specified"
+ set GeneratorVersion=Visual Studio 14 2015
set CMakeGenVersion_FolderSuffix=
)
@@ -94,7 +94,7 @@ set CMake64_Folder_Suffix=
)
:: CMake Folder specified:
-set CMakeFolder="vc11/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%"
+set CMakeFolder="vc14/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%"
echo CMakeFolder: %CMakeFolder%
:: Create generator type from VS version and architecture
diff --git a/build/shared/SharedConfig.cmake b/build/shared/SharedConfig.cmake
index 6032c35..13a6d2c 100644
--- a/build/shared/SharedConfig.cmake
+++ b/build/shared/SharedConfig.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Shared config
diff --git a/build/shared/SharedConfig_Common.cmake b/build/shared/SharedConfig_Common.cmake
index 20ddbf1..6b7780a 100644
--- a/build/shared/SharedConfig_Common.cmake
+++ b/build/shared/SharedConfig_Common.cmake
@@ -9,14 +9,14 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Function: architecture related settings
# ==============================================================================
function(SetupTargetArchitecture)
if(APPLE_IOS)
- set(${COMPONENT}_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
+ set(${COMPONENT}_CPU_FOLDERNAME "$(ARCHS)" PARENT_SCOPE)
else()
if(CMAKE_CL_64)
set(${COMPONENT}_BITDEPTH "64" PARENT_SCOPE)
@@ -82,6 +82,10 @@ function(SetupCompilerFlags)
# only remove inline hidden...
string(REGEX REPLACE "-fvisibility-inlines-hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
+ if(${${COMPONENT}_VERSIONING_GCC_VERSION} EQUAL 482)
+ #include path -I ${GNU_BASE}/include/c++/4.8.2/x86_64-unknown-linux-gnu
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${CMAKE_FIND_ROOT_PATH}/include/c++/4.8.2/x86_64-unknown-linux-gnu")
+ endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${COMPONENT}_PREPROCESSOR_FLAGS}" PARENT_SCOPE)
diff --git a/build/shared/SharedConfig_Ios.cmake b/build/shared/SharedConfig_Ios.cmake
index be32c4b..6e1bb73 100644
--- a/build/shared/SharedConfig_Ios.cmake
+++ b/build/shared/SharedConfig_Ios.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Shared config for iOS
@@ -21,7 +21,7 @@ set(CMAKE_C_FLAGS "${${COMPONENT}_SHARED_COMPILE_FLAGS} ${${COMPONENT}_EXTRA_C_C
set(CMAKE_C_FLAGS_DEBUG "${${COMPONENT}_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${${COMPONENT}_SHARED_COMPILE_RELEASE_FLAGS}")
-set(CMAKE_CXX_FLAGS "${${COMPONENT}_SHARED_COMPILE_FLAGS} ${${COMPONENT}_EXTRA_CXX_COMPILE_FLAGS}")
+set(CMAKE_CXX_FLAGS "-std=c++11 ${${COMPONENT}_SHARED_COMPILE_FLAGS} ${${COMPONENT}_EXTRA_CXX_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${${COMPONENT}_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${${COMPONENT}_SHARED_COMPILE_RELEASE_FLAGS}")
@@ -96,6 +96,8 @@ function(SetPlatformLinkFlags target linkflags)
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_SIGN_COMPARE "YES")
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNKNOWN_PRAGMAS "YES")
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VALUE "NO")
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "YES")
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "7.0")
endfunction(SetPlatformLinkFlags)
# ==============================================================================
diff --git a/build/shared/SharedConfig_Linux.cmake b/build/shared/SharedConfig_Linux.cmake
index 3a92b2a..4ac3717 100644
--- a/build/shared/SharedConfig_Linux.cmake
+++ b/build/shared/SharedConfig_Linux.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Shared config for linux
@@ -21,22 +21,25 @@ add_definitions(-DUNIX_ENV=1)
set(COMMON_PLATFORM_LINK " ${${COMPONENT}_PLATFORM_LINK}")
set(COMMON_SHARED_COMPILE_FLAGS "-fPIC ${${COMPONENT}_SHARED_COMPILE_FLAGS} -fexceptions -Wformat -Wformat-security ")
-set(COMMON_SHARED_COMPILE_DEBUG_FLAGS " ${${COMPONENT}_SHARED_COMPILE_DEBUG_FLAGS} -g -O0 -DDEBUG=1 -D_DEBUG=1")
-set(COMMON_SHARED_COMPILE_RELEASE_FLAGS "-Os ${${COMPONENT}_SHARED_COMPILE_RELEASE_FLAGS} -DNDEBUG=1 -D_NDEBUG=1")
+set(COMMON_SHARED_COMPILE_DEBUG_FLAGS " ${${COMPONENT}_SHARED_COMPILE_DEBUG_FLAGS} -g -DDEBUG=1 -D_DEBUG=1")
+set(COMMON_SHARED_COMPILE_RELEASE_FLAGS "${${COMPONENT}_SHARED_COMPILE_RELEASE_FLAGS} -DNDEBUG=1 -D_NDEBUG=1")
if(NOT ${COMPONENT}_DISABLE_ALL_WARNINGS)
set(COMMON_SHARED_COMPILE_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} -Wall")
endif()
if(${COMPONENT}_ENABLE_SECURE_SETTINGS)
- set(COMMON_SHARED_COMPILE_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} -fstack-protector -D_FORTIFY_SOURCE=2")
+ set(COMMON_SHARED_COMPILE_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} -fstack-protector -O -D_FORTIFY_SOURCE=2")
set(COMMON_PLATFORM_LINK "${COMMON_PLATFORM_LINK} -Wl,-z,relro -Wl,-z,now")
+else()
+ set(COMMON_SHARED_COMPILE_DEBUG_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} -O0")
+ set(COMMON_SHARED_COMPILE_RELEASE_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} -Os")
endif()
-set(CMAKE_C_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${${COMPONENT}_EXTRA_C_COMPILE_FLAGS} ")
+set(CMAKE_C_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${${COMPONENT}_EXTRA_C_COMPILE_FLAGS} -Wno-implicit ")
set(CMAKE_C_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")
-set(CMAKE_CXX_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${COMMON_EXTRA_CXX_COMPILE_FLAGS}")
+set(CMAKE_CXX_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${COMMON_EXTRA_CXX_COMPILE_FLAGS} -Wno-reorder -std=c++0x")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")
set(COMMON_PLATFORM_BEGIN_WHOLE_ARCHIVE "-Wl,--whole-archive")
diff --git a/build/shared/SharedConfig_Mac.cmake b/build/shared/SharedConfig_Mac.cmake
index 1e13d85..43a14ae 100644
--- a/build/shared/SharedConfig_Mac.cmake
+++ b/build/shared/SharedConfig_Mac.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Shared config for mac
@@ -48,7 +48,7 @@ set(CMAKE_C_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${COMMON_EXTRA_C_COMPILE_FLAGS
set(CMAKE_C_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")
-set(COMMON_SHARED_CXX_COMPILE_FLAGS "${${COMPONENT}_SHARED_CXX_COMPILE_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
+set(COMMON_SHARED_CXX_COMPILE_FLAGS "${${COMPONENT}_SHARED_CXX_COMPILE_FLAGS} -std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "-funsigned-char -fshort-enums -fno-common ${COMMON_SHARED_CXX_COMPILE_FLAGS} ${COMMON_EXTRA_CXX_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")
@@ -61,6 +61,8 @@ set(COMMON_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
set(COMMON_PLATFORM_END_WHOLE_ARCHIVE "")
set(COMMON_DYLIBEXTENSION "dylib")
+# Setting libstdc++ as default library for compilation
+set (CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
find_program(GCCTOOL gcc HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin")
if (${GCCTOOL} STREQUAL "GCCTOOL-NOTFOUND")
diff --git a/build/shared/SharedConfig_Win.cmake b/build/shared/SharedConfig_Win.cmake
index f370233..97231e1 100644
--- a/build/shared/SharedConfig_Win.cmake
+++ b/build/shared/SharedConfig_Win.cmake
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# ==============================================================================
# Shared config for windows
diff --git a/build/shared/ToolchainLLVM.cmake b/build/shared/ToolchainLLVM.cmake
index 37bbb71..ebd511d 100644
--- a/build/shared/ToolchainLLVM.cmake
+++ b/build/shared/ToolchainLLVM.cmake
@@ -14,5 +14,5 @@
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
# SDK and deployment
-set(XMP_OSX_SDK 10.8)
-set(XMP_OSX_TARGET 10.7)
+set(XMP_OSX_SDK 10.11)
+set(XMP_OSX_TARGET 10.9)
diff --git a/build/shared/Toolchain_ios.cmake b/build/shared/Toolchain_ios.cmake
index 8c3bab5..eaf06d6 100644
--- a/build/shared/Toolchain_ios.cmake
+++ b/build/shared/Toolchain_ios.cmake
@@ -50,7 +50,8 @@ set (CMAKE_CXX_FLAGS "-headerpad_max_install_names -fvisibility=hidden -fvisibil
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
-
+# Setting Standard C++ complier library as 'libstdc++'
+set (CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
set (CMAKE_PLATFORM_HAS_INSTALLNAME 1)
set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
@@ -122,9 +123,9 @@ message (STATUS "CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT}")
# Set the sysroot default to the most recent SDK
set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")
-# set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv6,armv7 and appears to be XCode's standard.
+# set the architecture for iOS - using ARCHS_STANDARD_INCLUDING_64_BIT sets armv7 and arm64.
# The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only
-set (CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)" CACHE string "Build architecture for iOS")
+set (CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_INCLUDING_64_BIT)" CACHE string "Build architecture for iOS")
# Set the find root to the iOS developer roots and to user defined paths
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root")
@@ -140,6 +141,6 @@ set (CMAKE_SYSTEM_FRAMEWORK_PATH
)
# only search the iOS sdks, not the remainder of the host filesystem
-set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
-set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)