]> Devoid-pointer.net GitWeb - FFBChecker.git/commitdiff
Build the application with SUBSYSTEM:WINDOWS on Win32
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 2 Aug 2015 23:27:53 +0000 (01:27 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 2 Aug 2015 23:27:53 +0000 (01:27 +0200)
CMakeLists.txt
sdl2deviceprober.cpp

index 8e0d5490482b14f733360e011eeb47ccc2af9423..f9fc64da523baf5402ebb2e70b4eb6e2e7cedfcd 100644 (file)
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.13)
 
 project(FFBChecker)
 
-find_package(Qt5Widgets)
+find_package(Qt5Widgets REQUIRED)
 
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
     # Linux-specific definitions
@@ -30,7 +30,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(QT_LIBS_PATH "C://Qt-Static//bin_noicu")
     set(SDL2_INCLUDE_DIRS "C://Users//Sacrilegium//Hacking//SDL2-2.0.3//include")
     set(SDL2_LIBRARIES ${SDL2_LIBRARIES} "C://Users//Sacrilegium//Hacking//SDL2-2.0.3//lib//x86//SDL2.lib")
-    # set(SDL2_LIBRARIES ${SDL2_LIBRARIES} "C://Users//Sacrilegium//Hacking//SDL2-2.0.3//lib//x86//SDL2main.lib")
 endif()
 
 set(CMAKE_AUTOMOC ON)
@@ -95,22 +94,21 @@ if (PLATFORM_WIN32)
     include_directories("${QT_LIBS_PATH}//include")
 endif()
 
-add_executable(FFBChecker ${FFBChecker_SRCS})
 
 if (PLATFORM_LINUX)
+    add_executable(FFBChecker ${FFBChecker_SRCS})
     target_link_libraries(FFBChecker Qt5::Widgets)
 elseif (PLATFORM_WIN32)
+    add_executable(FFBChecker WIN32 ${FFBChecker_SRCS})
     target_link_libraries(FFBChecker "Ws2_32.lib")
-    target_link_libraries(FFBChecker "imm32.lib")
     target_link_libraries(FFBChecker "winmm.lib")
-    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//plugins//platforms//qwindows.lib")
+    target_link_libraries(FFBChecker "imm32.lib")
     target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//qtpcre.lib")
-    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//qtharfbuzzng.lib")
     target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//qtfreetype.lib")
-    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//Qt5Core.lib")
+    target_link_libraries(FFBChecker Qt5::WinMain Qt5::Widgets)
+    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//qtharfbuzzng.lib")
     target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//Qt5PlatformSupport.lib")
-    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//Qt5Gui.lib")
-    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//lib//Qt5Widgets.lib")
+    target_link_libraries(FFBChecker "${QT_LIBS_PATH}//plugins//platforms//qwindows.lib")
 endif()
 
 if (SDL2_FOUND)
index 3d40bd590f05a5781977f98c7333f201ddd486d9..92b75b428d25a4338adb9ea20916c830ff27cb65 100644 (file)
@@ -1,5 +1,4 @@
 #include "sdl2deviceprober.h"
-#include <QtCore/QDebug>
 #include <QtWidgets/QMessageBox>
 
 bool SDL2DeviceProber::s_SDLInited = false;