~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk

« back to all changes in this revision

Viewing changes to src/plugin/folderlistmodel/CMakeLists.txt

  • Committer: Bileto Bot
  • Date: 2017-04-04 17:06:41 UTC
  • mfrom: (588.1.19 fix-desktop-file)
  • Revision ID: ci-train-bot@canonical.com-20170404170641-1p15lmx8wodlx2ut
* Rename binary file to ubuntu-filemanager-app
* Join plugin packages into the main package 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include_directories(
 
2
    ${CMAKE_CURRENT_SOURCE_DIR}
 
3
    disk
 
4
    trash   
 
5
    net
 
6
    smb 
 
7
    smb/qsambaclient/src
 
8
)
 
9
 
 
10
set(PLUGIN_DIR org/nemomobile/folderlistmodel)
 
11
 
 
12
set(folderlistmodel_SRCS
 
13
    clipboard.cpp
 
14
    clipboard.h
 
15
    diritemabstractlistmodel.h
 
16
    diriteminfo.cpp
 
17
    diriteminfo.h
 
18
    dirmodel.cpp
 
19
    dirmodel.h
 
20
    dirselection.cpp
 
21
    dirselection.h
 
22
    externalfswatcher.cpp
 
23
    externalfswatcher.h
 
24
    filecompare.cpp
 
25
    filecompare.h
 
26
    filesystemaction.cpp
 
27
    filesystemaction.h
 
28
    fmutil.cpp
 
29
    fmutil.h
 
30
    imageprovider.cpp
 
31
    imageprovider.h
 
32
    iorequest.cpp
 
33
    iorequest.h
 
34
    iorequestworker.cpp
 
35
    iorequestworker.h
 
36
    ioworkerthread.cpp
 
37
    ioworkerthread.h
 
38
    networklistworker.cpp
 
39
    networklistworker.h
 
40
    plugin.cpp
 
41
    plugin.h
 
42
    location.cpp
 
43
    location.h
 
44
    locationsfactory.cpp
 
45
    locationsfactory.h
 
46
    locationurl.cpp
 
47
    locationurl.h
 
48
    networklocation.cpp
 
49
    networklocation.h
 
50
    locationitemdir.cpp
 
51
    locationitemdir.h
 
52
    locationitemdiriterator.cpp
 
53
    locationitemdiriterator.h
 
54
    locationitemfile.cpp
 
55
    locationitemfile.h  
 
56
    cleanurl.cpp
 
57
    cleanurl.h
 
58
    urliteminfo.cpp
 
59
    urliteminfo.h
 
60
    disk/disklocation.cpp
 
61
    disk/disklocation.h
 
62
    disk/disklocationitemdiriterator.cpp
 
63
    disk/disklocationitemdiriterator.h
 
64
    disk/disklocationitemfile.cpp
 
65
    disk/disklocationitemfile.h
 
66
    disk/disklocationitemdir.cpp
 
67
    disk/disklocationitemdir.h
 
68
    trash/qtrashdir.cpp
 
69
    trash/qtrashdir.h   
 
70
    trash/qtrashutilinfo.cpp
 
71
    trash/qtrashutilinfo.h
 
72
    trash/trashiteminfo.cpp
 
73
    trash/trashiteminfo.h
 
74
    trash/trashlocation.cpp
 
75
    trash/trashlocation.h 
 
76
    smb/qsambaclient/src/smbutil.cpp
 
77
    smb/qsambaclient/src/smbutil.h
 
78
    smb/qsambaclient/src/smbiteminfo.cpp
 
79
    smb/qsambaclient/src/smbiteminfo.h
 
80
    smb/qsambaclient/src/smblocationdiriterator.cpp
 
81
    smb/qsambaclient/src/smblocationdiriterator.h
 
82
    smb/qsambaclient/src/smblocationitemfile.cpp
 
83
    smb/qsambaclient/src/smblocationitemfile.h
 
84
    smb/qsambaclient/src/smblocationitemdir.cpp
 
85
    smb/qsambaclient/src/smblocationitemdir.h
 
86
    smb/qsambaclient/src/smbobject.cpp
 
87
    smb/qsambaclient/src/smbobject.h
 
88
    smb/smblocation.h
 
89
    smb/smblocation.cpp
 
90
    smb/smblocationauthentication.cpp
 
91
    smb/smblocationauthentication.h
 
92
    smb/qsambaclient/src/smbplaces.cpp
 
93
    smb/qsambaclient/src/smbplaces.h
 
94
    smb/qsambaclient/src/smbusershare.cpp
 
95
    smb/qsambaclient/src/smbusershare.h
 
96
    net/netauthenticationdata.cpp
 
97
    net/netauthenticationdata.h  
 
98
    net/netutil.cpp
 
99
    net/netutil.h
 
100
)
 
101
 
 
102
add_library(nemofolderlistmodel MODULE
 
103
    ${folderlistmodel_SRCS}
 
104
)
 
105
 
 
106
qt5_use_modules(nemofolderlistmodel Gui Qml Quick Widgets)
 
107
 
 
108
## samba requires libsmbclient
 
109
find_path(SAMBA_INCLUDE_DIR 
 
110
          NAMES libsmbclient.h 
 
111
          HINTS /usr/include/smbclient /usr/include/samba /usr/include/samba-3.0 /usr/include/samba-4.0
 
112
          )
 
113
find_library(SAMBA_LIBRARIES NAMES smbclient )
 
114
message(STATUS "samba include=${SAMBA_INCLUDE_DIR}")
 
115
message(STATUS "samba lib=${SAMBA_LIBRARIES}=${SAMBA_LIBRARIES}")
 
116
 
 
117
if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES)
 
118
   message(STATUS "Found samba: include=${SAMBA_INCLUDE_DIR}  library=${SAMBA_LIBRARIES}")
 
119
   INCLUDE_DIRECTORIES(${SAMBA_INCLUDE_DIR})
 
120
   TARGET_LINK_LIBRARIES(nemofolderlistmodel ${SAMBA_LIBRARIES})
 
121
else(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES)
 
122
   message(FATAL_ERROR "Could not find Samba libsmbclient")
 
123
endif(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES)
 
124
mark_as_advanced(SAMBA_INCLUDE_DIR SAMBA_LIBRARIES)
 
125
## end samba confiuration
 
126
 
 
127
# Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator
 
128
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
 
129
    add_custom_command(TARGET nemofolderlistmodel POST_BUILD
 
130
        COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}
 
131
        COMMENT "Creating plugin directory layout in the build directory"
 
132
        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}
 
133
        COMMENT "Copying the qmldir file to the build directory"
 
134
        COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:nemofolderlistmodel> ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}
 
135
        COMMENT "Copying the plugin binary to the build directory"
 
136
    )
 
137
endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
 
138
 
 
139
# Install plugin file
 
140
install(TARGETS nemofolderlistmodel DESTINATION ${QT_IMPORTS_DIR}/org/nemomobile/folderlistmodel/)
 
141
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/org/nemomobile/folderlistmodel/)
 
142