summaryrefslogtreecommitdiff
path: root/src/unite/CMakeLists.txt
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2015-07-13 14:02:00 +0800
committerIru Cai <mytbk920423@gmail.com>2015-08-28 08:55:59 +0000
commitc89a790d60eacce5a39ddbbe30161677f10b5bab (patch)
tree7bb47fc8534acf44ccc35784b5121d12b6d49a62 /src/unite/CMakeLists.txt
parentb806d39091b432389e906146b10f16aa707cae17 (diff)
downloadfqterm-c89a790d60eacce5a39ddbbe30161677f10b5bab.tar.xz
Qt 4 and 5 in one CMakeLists: subdirectories
Diffstat (limited to 'src/unite/CMakeLists.txt')
-rw-r--r--src/unite/CMakeLists.txt31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/unite/CMakeLists.txt b/src/unite/CMakeLists.txt
index b093576..a8d9d96 100644
--- a/src/unite/CMakeLists.txt
+++ b/src/unite/CMakeLists.txt
@@ -19,17 +19,7 @@ set(fqunite_internal_SRCS
internal/statebuilder.cpp
)
-qt4_automoc(
- ${fqunite_SRCS}
- ${fqunite_internal_SRCS}
-)
-
include_directories(
- ${QT_INCLUDE_DIR}
- ${QT_QTCORE_INCLUDE_DIR}
- ${QT_QTNETWORK_INCLUDE_DIR}
- ${QT_QTXML_INCLUDE_DIR}
- ${QT_QTGUI_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/internal
${CMAKE_CURRENT_SOURCE_DIR}/../common
@@ -41,6 +31,27 @@ add_library(fqterm_unite
${fqunite_internal_SRCS}
)
+if(USE_QT5)
+ set(CMAKE_AUTOMOC ON)
+ find_package(Qt5Core REQUIRED)
+ find_package(Qt5Widgets REQUIRED)
+ find_package(Qt5Network REQUIRED)
+ find_package(Qt5Xml REQUIRED)
+ target_link_libraries(fqterm_unite
+ Qt5::Core
+ Qt5::Widgets
+ Qt5::Network
+ Qt5::Xml
+ )
+else(USE_QT5)
+ qt4_automoc(
+ ${fqunite_SRCS}
+ ${fqunite_internal_SRCS}
+ )
+endif(USE_QT5)
+
add_dependencies(fqterm_unite
fqterm_common
)
+
+