From a05a88cc89fcbc10a8b1e24eb7359ce0f5e55b31 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Thu, 20 Feb 2014 21:07:31 +0100 Subject: [PATCH] Link error when no SDL on VC++ --- companion/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index c35ec5de5..3066e0c51 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -331,7 +331,11 @@ endif() add_executable(simulator WIN32 ${simu_SRCS}) -target_link_libraries(simulator simulation ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) +if(SDL_FOUND) + target_link_libraries(simulator simulation ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) +else() + target_link_libraries(simulator simulation ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) +endif() ############# Packaging ####################