From 72c5cc13b79ba7de40dc4988298a41d2bd3ac435 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Mon, 3 Aug 2015 01:27:53 +0200 Subject: [PATCH] Build the application with SUBSYSTEM:WINDOWS on Win32 --- CMakeLists.txt | 16 +++++++--------- sdl2deviceprober.cpp | 1 - 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e0d549..f9fc64d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/sdl2deviceprober.cpp b/sdl2deviceprober.cpp index 3d40bd5..92b75b4 100644 --- a/sdl2deviceprober.cpp +++ b/sdl2deviceprober.cpp @@ -1,5 +1,4 @@ #include "sdl2deviceprober.h" -#include #include bool SDL2DeviceProber::s_SDLInited = false; -- 2.43.5