diff options
author | Zlika <zlika_ese@hotmail.com> | 2019-09-17 17:58:18 +0300 |
---|---|---|
committer | Zlika <zlika_ese@hotmail.com> | 2019-09-17 18:20:51 +0300 |
commit | dbe7804e32195d25b3f8a9e7db8b97488e832554 (patch) | |
tree | 32626715921a95099fe0210f7d542fc6f0902941 /plugins/rdp/CMakeLists.txt | |
parent | 456e376fd3141c80627e00d065a17d008cadf17c (diff) |
Make cups an optional dependency
Diffstat (limited to 'plugins/rdp/CMakeLists.txt')
-rw-r--r-- | plugins/rdp/CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/rdp/CMakeLists.txt b/plugins/rdp/CMakeLists.txt index c7fb91488..90c8966b7 100644 --- a/plugins/rdp/CMakeLists.txt +++ b/plugins/rdp/CMakeLists.txt @@ -37,8 +37,7 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE) find_package(Threads REQUIRED) find_package(X11) -find_required_package(Cups) - +find_suggested_package(Cups) set(REMMINA_PLUGIN_RDP_SRCS rdp_plugin.c @@ -65,9 +64,16 @@ add_library(remmina-plugin-rdp MODULE ${REMMINA_PLUGIN_RDP_SRCS}) set_target_properties(remmina-plugin-rdp PROPERTIES PREFIX "") set_target_properties(remmina-plugin-rdp PROPERTIES NO_SONAME 1) -include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${CUPS_INCLUDE_DIR}) +include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP_INCLUDE_DIRS} ${X11_INCLUDE_DIR}) target_link_libraries(remmina-plugin-rdp - ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES} ${CUPS_LIBRARIES}) + ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES}) + +if(CUPS_FOUND) + add_definitions(-DHAVE_CUPS) + include_directories(${CUPS_INCLUDE_DIR}) + target_link_libraries(remmina-plugin-rdp + ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES} ${CUPS_LIBRARIES}) +endif() install(TARGETS remmina-plugin-rdp DESTINATION ${REMMINA_PLUGINDIR}) |