From 525fecc4cec7b18b08e740a9740dc27b9f876b7a Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Thu, 11 Sep 2014 17:36:49 -0700 Subject: [PATCH] even more cmake fixes --- CMakeLists.txt | 5 +++++ cocos/base/CCUserDefault-apple.mm | 4 ++-- cocos/platform/mac/CCApplication-mac.mm | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2550a3d7b5..9656ef3768 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ endif(DEBUG_MODE) set(CMAKE_C_FLAGS_DEBUG "-DCOCOS2D_DEBUG=1") set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) +# Compiler options if(MSVC) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710 @@ -52,8 +53,12 @@ else() set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -std=c99") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -std=c++11 -Wno-deprecated-declarations -Wno-reorder") + if(CLANG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() endif(MSVC) +# Some macro definitions if(WINDOWS) ADD_DEFINITIONS (-D_USRDLL -DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32) set(PLATFORM_FOLDER win32) diff --git a/cocos/base/CCUserDefault-apple.mm b/cocos/base/CCUserDefault-apple.mm index 0f004e200c..d5a1bec96d 100644 --- a/cocos/base/CCUserDefault-apple.mm +++ b/cocos/base/CCUserDefault-apple.mm @@ -32,8 +32,8 @@ #import "CCUserDefault.h" #import "tinyxml2.h" -#import "CCPlatformConfig.h" -#import "CCPlatformMacros.h" +#import "platform/CCPlatformConfig.h" +#import "platform/CCPlatformMacros.h" #import "base64.h" #import "platform/CCFileUtils.h" diff --git a/cocos/platform/mac/CCApplication-mac.mm b/cocos/platform/mac/CCApplication-mac.mm index 3f7f1d4f1c..ca72c23883 100644 --- a/cocos/platform/mac/CCApplication-mac.mm +++ b/cocos/platform/mac/CCApplication-mac.mm @@ -26,11 +26,10 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC -#import "CCApplication.h" - #import #include +#import "platform/CCApplication.h" #include "platform/CCFileUtils.h" #include "math/CCGeometry.h" #include "base/CCDirector.h"