From 1c03ab271a114f48f856ee602c9303811c327259 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sun, 27 Jul 2014 23:40:59 +0400 Subject: [PATCH] update for qt5 --- sources/src/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/src/CMakeLists.txt b/sources/src/CMakeLists.txt index 6eaa623..c204cf3 100644 --- a/sources/src/CMakeLists.txt +++ b/sources/src/CMakeLists.txt @@ -12,8 +12,10 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/../ if (USE_QT5) find_package (Qt5Core REQUIRED) find_package (Qt5Widgets REQUIRED) + find_package (Qt5Network REQUIRED) add_definitions (${Qt5Core_DEFINITIONS}) add_definitions (${Qt5Widgets_DEFINITIONS}) + add_definitions (${Qt5Network_DEFINITIONS}) qt5_wrap_cpp (MOC_SOURCES ${HEADERS}) qt5_wrap_ui (UI_HEADERS ${FORMS}) @@ -21,9 +23,9 @@ if (USE_QT5) source_group ("Source Files" FILES ${SOURCES}) source_group ("Generated Files" FILES ${MOC_SOURCES}) - include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) + include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}) add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES}) - target_link_libraries (${SUBPROJECT} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES}) + target_link_libraries (${SUBPROJECT} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES}) else () find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) include (${QT_USE_FILE}) @@ -35,7 +37,7 @@ else () source_group ("Generated Files" FILES ${MOC_SOURCES}) add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES}) - target_link_libraries (${SUBPROJECT} ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) + target_link_libraries (${SUBPROJECT} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY}) endif() # install properties