From 123a60581ff5bbae3b20fc749c7a97b92cbf1b8f Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 27 Jun 2013 21:45:32 +0200 Subject: [PATCH] Only link to SDL2main on windows --- apps/openmw/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 501e5c5ae..fdd0b900a 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -112,7 +112,6 @@ target_link_libraries(openmw ${BULLET_LIBRARIES} ${MYGUI_LIBRARIES} ${SDL2_LIBRARY} - ${SDL2MAIN_LIBRARY} ${MYGUI_PLATFORM_LIBRARIES} ${SHINY_LIBRARIES} "oics" @@ -120,6 +119,10 @@ target_link_libraries(openmw components ) +if (NOT UNIX) +target_link_libraries(openmw ${SDL2MAIN_LIBRARY}) +endif() + # Fix for not visible pthreads functions for linker with glibc 2.15 if (UNIX AND NOT APPLE) target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})