diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f9551bd..e6889c88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,9 @@ include(src/framework/CMakeLists.txt) include(src/client/CMakeLists.txt) # functions map for reading backtraces -set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=${PROJECT_NAME}.map") +if(NOT APPLE) + set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=${PROJECT_NAME}.map") +endif() option(USE_PCH "Use precompiled header (speed up compile)" OFF) diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index e5c18712..4c5b05c9 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -134,7 +134,11 @@ set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/luafunctions.cpp # some build options option(CRASH_HANDLER "Generate crash reports" ON) option(LUAJIT "Use lua jit" OFF) -option(USE_STATIC_LIBS "Don't use shared libraries (dlls)" ON) +if(NOT APPLE) + option(USE_STATIC_LIBS "Don't use shared libraries (dlls)" ON) +else() + set(USE_STATIC_LIBS OFF) +endif() set(BUILD_COMMIT "devel" CACHE "Git commit string (intended for releases)" STRING) set(BUILD_REVISION "0" CACHE "Git revision string (intended for releases)" STRING) @@ -244,7 +248,7 @@ if(WIN32) set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--large-address-aware") # strip all debug information set(SYSTEM_LIBRARIES "") elseif(APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-deprecated-declarations") set(framework_DEFINITIONS ${framework_DEFINITIONS} -D_REENTRANT) # enable thread safe code set(SYSTEM_LIBRARIES "") else() diff --git a/src/framework/platform/unixcrashhandler.cpp b/src/framework/platform/unixcrashhandler.cpp index a331d76e..c5b395ef 100644 --- a/src/framework/platform/unixcrashhandler.cpp +++ b/src/framework/platform/unixcrashhandler.cpp @@ -20,7 +20,7 @@ * THE SOFTWARE. */ -#ifdef __linux +#ifndef WIN32 #include "crashhandler.h" #include diff --git a/src/framework/platform/unixplatform.cpp b/src/framework/platform/unixplatform.cpp index b422fb6b..144837ef 100644 --- a/src/framework/platform/unixplatform.cpp +++ b/src/framework/platform/unixplatform.cpp @@ -20,7 +20,7 @@ * THE SOFTWARE. */ -#ifdef __linux +#ifndef WIN32 #include "platform.h" #include diff --git a/src/framework/platform/x11window.cpp b/src/framework/platform/x11window.cpp index de2770f9..7d32563e 100644 --- a/src/framework/platform/x11window.cpp +++ b/src/framework/platform/x11window.cpp @@ -20,7 +20,7 @@ * THE SOFTWARE. */ -#ifdef __linux +#ifndef WIN32 #include "x11window.h" #include