From 1609b1236d46f11c7f8cff104bb4ce7badce4e4e Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 4 May 2015 07:28:14 +0200 Subject: [PATCH] Fixes #2253 --- companion/src/CMakeLists.txt | 12 ++---------- companion/src/companion.cpp | 1 + companion/src/simulator.cpp | 1 + 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index a74f98720..680a6658d 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -274,11 +274,7 @@ ELSE( ) ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion_SRCS} ${companion_QM} ) ENDIF( ) -if(SDL_FOUND) - TARGET_LINK_LIBRARIES( ${PROJECT_NAME} generaledit modeledit simulation common qcustomplot shared ${QT_LIBRARIES} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) -else() - TARGET_LINK_LIBRARIES( ${PROJECT_NAME} generaledit modeledit simulation common qcustomplot shared ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) -endif() +target_link_libraries(companion generaledit modeledit simulation common qcustomplot shared ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) ############# Standalone simu ############### @@ -306,11 +302,7 @@ else() add_executable(simulator WIN32 ${simu_SRCS}) endif() -target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS}) - -if(NOT SDL_FOUND) - target_link_libraries(simulator ${QT_QTMAIN_LIBRARY}) -endif() +target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS}) ############# Packaging #################### diff --git a/companion/src/companion.cpp b/companion/src/companion.cpp index 497723277..6e91a4f19 100644 --- a/companion/src/companion.cpp +++ b/companion/src/companion.cpp @@ -50,6 +50,7 @@ #include #if defined(JOYSTICKS) || defined(SIMU_AUDIO) #include + #undef main #endif #include "mainwindow.h" #include "eeprominterface.h" diff --git a/companion/src/simulator.cpp b/companion/src/simulator.cpp index 511defd3d..2f5f55818 100644 --- a/companion/src/simulator.cpp +++ b/companion/src/simulator.cpp @@ -50,6 +50,7 @@ #include #if defined(JOYSTICKS) || defined(SIMU_AUDIO) #include + #undef main #endif #include "simulatordialog.h" #include "eeprominterface.h"