on 5afde4e help sign in
unity8/plugins/DashViews/CMakeLists.txt
46 lines 1.2 kB history raw
1# export_qmlplugin macro
2include(Plugins)
4# There's no cmake var for v8 include path :-/
5# so create one
6LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
7if(${Qt5Core_VERSION_STRING} VERSION_LESS "5.1.0")
8 SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/../QtV8/${Qt5Core_VERSION_STRING}/QtV8)
9else()
10 SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/QtV8/${Qt5Core_VERSION_STRING}/QtV8)
11endif()
13include_directories(
14 ${CMAKE_CURRENT_SOURCE_DIR}
15 ${CMAKE_CURRENT_BINARY_DIR}
16 ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
17 ${Qt5Quick_INCLUDE_DIRS}
18 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
19 ${Qt5V8_PRIVATE_INCLUDE_DIR}
22remove_definitions(-DQT_NO_KEYWORDS)
24set(QMLPLUGIN_SRC
25 plugin.cpp
26 listviewwithpageheader.cpp
27 abstractdashview.cpp
28 verticaljournal.cpp
29 horizontaljournal.cpp
30 organicgrid.cpp
31 )
33add_library(DashViews-qml MODULE
34 ${QMLPLUGIN_SRC}
35 )
37target_link_libraries(DashViews-qml
38 ${Qt5Gui_LIBRARIES}
39 ${Qt5Quick_LIBRARIES}
40 )
42qt5_use_modules(DashViews-qml Qml Quick)
44# export the qmldir qmltypes and plugin files
45export_qmlfiles(DashViews DashViews)
46export_qmlplugin(DashViews 0.1 DashViews TARGETS DashViews-qml)