Revert "Fix OSX cmake build"

This reverts commit 3406f01ff9.
This commit is contained in:
heinrich5991 2017-06-09 19:34:01 +02:00
parent 9fe362e099
commit 743c58e4ae
3 changed files with 5 additions and 17 deletions

View file

@ -118,9 +118,6 @@ endif()
if(TARGET_OS STREQUAL "windows")
set(PLATFORM_CLIENT_LIBS opengl32 glu32 winmm)
set(PLATFORM_LIBS ws2_32) # Windows sockets
elseif(TARGET_OS STREQUAL "mac")
set(PLATFORM_CLIENT_LIBS "-framework OpenGL" "-framework Cocoa" "-framework AGL" "-framework Carbon" "-framework NotificationCenter")
set(PLATFORM_SERVER_LIBS "-framework Carbon")
else()
set(PLATFORM_CLIENT_LIBS GL GLU X11)
if(TARGET_OS STREQUAL "linux")
@ -255,15 +252,6 @@ else()
set(DEP_WEBSOCKETS)
endif()
if(TARGET_OS STREQUAL "mac")
file(GLOB DEP_OSX_SRC "src/osx/*.mm")
add_library(osx EXCLUDE_FROM_ALL OBJECT ${DEP_OSX_SRC})
set(DEP_OSX $<TARGET_OBJECTS:osx>)
list(APPEND TARGETS_DEP osx)
else()
set(DEP_OSX)
endif()
set(DEPS ${DEP_MD5} ${DEP_WEBSOCKETS} ${DEP_ZLIB})
# Libraries
@ -287,7 +275,7 @@ if(CLIENT)
set(GAME_GENERATED_CLIENT "src/game/generated/client_data.cpp" "src/game/generated/client_data.h")
set(CLIENT_SRC ${ENGINE_CLIENT} ${GAME_CLIENT} ${GAME_EDITOR} ${GAME_GENERATED_CLIENT})
set(DEPS_CLIENT ${DEPS} ${DEP_JSON} ${DEP_PNG} ${DEP_WAV} ${DEP_OSX})
set(DEPS_CLIENT ${DEPS} ${DEP_JSON} ${DEP_PNG} ${DEP_WAV})
# Libraries
set(LIBS_CLIENT
@ -349,7 +337,7 @@ else()
endif()
# Libraries
set(LIBS_SERVER ${LIBS} ${MYSQL_LIBRARIES} ${PLATFORM_SERVER_LIBS})
set(LIBS_SERVER ${LIBS} ${MYSQL_LIBRARIES})
# Target
set(TARGET_SERVER ${SERVER_EXECUTABLE})

View file

@ -3482,14 +3482,14 @@ static CClient *CreateClient()
Upstream latency
*/
/*#if defined(CONF_PLATFORM_MACOSX) || defined(__ANDROID__)
#if defined(CONF_PLATFORM_MACOSX) || defined(__ANDROID__)
extern "C" int SDL_main(int argc, char **argv_) // ignore_convention
{
const char **argv = const_cast<const char **>(argv_);
#else*/
#else
int main(int argc, const char **argv) // ignore_convention
{
//#endif
#endif
#if defined(CONF_FAMILY_WINDOWS)
for(int i = 1; i < argc; i++) // ignore_convention
{