w
[grantlee:grantlee.git] / examples / htmlapps / CMakeLists.txt
1
2 cmake_minimum_required(VERSION 2.8.11)
3
4 project(htmlapps)
5
6 find_package(Grantlee REQUIRED)
7
8 set(CMAKE_INCLUDE_CURRENT_DIR ON)
9 set(CMAKE_AUTOMOC ON)
10
11 include(${Grantlee_USE_FILE})
12
13 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
14
15 configure_file(grantlee_paths.h.cmake ${PROJECT_BINARY_DIR}/grantlee_paths.h)
16
17 set(htmlapps_SRCS
18   main.cpp
19   mainwindow.cpp
20   localrequestmanager.cpp
21   templatereply.cpp
22 )
23
24 add_library(customplugin MODULE
25   customplugin.cpp
26   rssfeed.cpp
27 )
28 grantlee_adjust_plugin_name(customplugin)
29
30 find_package(Qt5 REQUIRED WebKitWidgets XmlPatterns)
31
32 target_link_libraries(customplugin
33   ${Grantlee_TEMPLATES_LIBRARIES}
34   Qt5::XmlPatterns
35   Qt5::Network
36 )
37
38 add_executable(htmlapps
39   ${htmlapps_SRCS}
40 )
41
42 target_link_libraries(htmlapps
43   ${Grantlee_TEMPLATES_LIBRARIES}
44   Qt5::WebKitWidgets
45 )