diff --git a/cmake/modules/FindDiscount.cmake b/cmake/modules/FindDiscount.cmake --- a/cmake/modules/FindDiscount.cmake +++ b/cmake/modules/FindDiscount.cmake @@ -7,6 +7,7 @@ # discount_INCLUDE_DIR - the include path of the discount library # Copyright (c) 2017, Julian Wolff, +# Copyright (c) 2018, Sune Vuorela, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -34,3 +35,7 @@ mark_as_advanced(discount_INCLUDE_DIR discount_LIBRARIES) +if (discount_FOUND) + add_library(discount::Lib UNKNOWN IMPORTED) + set_target_properties(discount::Lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${discount_INCLUDE_DIR} IMPORTED_LOCATION ${discount_LIBRARIES}) +endif() diff --git a/generators/markdown/CMakeLists.txt b/generators/markdown/CMakeLists.txt --- a/generators/markdown/CMakeLists.txt +++ b/generators/markdown/CMakeLists.txt @@ -16,7 +16,7 @@ okular_add_generator(okularGenerator_md ${okularGenerator_md_PART_SRCS}) -target_link_libraries(okularGenerator_md okularcore KF5::I18n KF5::KIOCore ${discount_LIBRARIES}) +target_link_libraries(okularGenerator_md PRIVATE okularcore KF5::I18n KF5::KIOCore discount::Lib) ########### install files ############### install( FILES okularMd.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )