| 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 Lomiri/FileManager/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(folderlistmodel MODULE |
| 103 |
${folderlistmodel_SRCS} |
| 104 |
) |
| 105 |
|
| 106 |
target_link_libraries(folderlistmodel Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Widgets) |
| 107 |
|
| 108 |
target_include_directories(folderlistmodel PUBLIC ${SAMBA_INCLUDE_DIRS}) |
| 109 |
target_link_libraries(folderlistmodel ${SAMBA_LIBRARIES}) |
| 110 |
|
| 111 |
# Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator |
| 112 |
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") |
| 113 |
add_custom_command(TARGET folderlistmodel POST_BUILD |
| 114 |
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR} |
| 115 |
COMMENT "Creating plugin directory layout in the build directory" |
| 116 |
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR} |
| 117 |
COMMENT "Copying the qmldir file to the build directory" |
| 118 |
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:folderlistmodel> ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR} |
| 119 |
COMMENT "Copying the plugin binary to the build directory" |
| 120 |
) |
| 121 |
endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") |
| 122 |
|
| 123 |
# Install plugin file |
| 124 |
install(TARGETS folderlistmodel DESTINATION ${QT_IMPORTS_DIR}/Lomiri/FileManager/folderlistmodel/) |
| 125 |
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/Lomiri/FileManager/folderlistmodel/) |
| 126 |
|