Trying to build on OSX

This commit is contained in:
William Edwards
2013-12-04 22:38:06 +01:00
parent a869dd0fee
commit e71e7104dc
4 changed files with 23 additions and 6 deletions

11
.gitignore vendored
View File

@@ -20,6 +20,17 @@ Icon
.Spotlight-V100 .Spotlight-V100
.Trashes .Trashes
# CMake when building e.g. on OSX
/CMakeCache.txt
CMakeFiles/
cmake_install.cmake
CMakeScripts/
Debug/
MegaGlest.build/
/MegaGlest.xcodeproj/
*.plist
*.cmake
## Windows ## Windows
# Windows image file caches # Windows image file caches
Thumbs.db Thumbs.db

View File

@@ -85,6 +85,11 @@ else()
endif() endif()
## Compiler flags ## Compiler flags
IF(APPLE)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
ENDIF(APPLE)
IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
MESSAGE(STATUS "Detected CLANG Compiler...") MESSAGE(STATUS "Detected CLANG Compiler...")
@@ -219,7 +224,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(GIT_VERSION_CMD "-DGITVERSION='\\\"${GIT_COMMIT_COUNT}.${GIT_SHA1}\\\"'") SET(GIT_VERSION_CMD "-DGITVERSION='\\\\'${GIT_COMMIT_COUNT}.${GIT_SHA1}\\\\''")
IF(CMAKE_INSTALL_PREFIX STREQUAL "") IF(CMAKE_INSTALL_PREFIX STREQUAL "")
@@ -242,7 +247,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDIF() ENDIF()
IF(NOT CUSTOM_DATA_INSTALL_PATH) IF(NOT CUSTOM_DATA_INSTALL_PATH)
SET(CUSTOM_DATA_INSTALL_PATH "'\\\"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\"'" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)") SET(CUSTOM_DATA_INSTALL_PATH "'\\\\'${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\\''" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)")
ENDIF() ENDIF()
SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}") SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")

View File

@@ -74,6 +74,7 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <mach-o/dyld.h> #include <mach-o/dyld.h>
#include <sys/param.h>
#endif #endif
#include "leak_dumper.h" #include "leak_dumper.h"