Use a target in FindDiscount (modern cmake) rather than variables

Test Plan: Things still builds

Reviewers: kde-buildsystem, apol

Reviewed By: apol

Subscribers: apol, aacid, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12672
remotes/origin/Applications/18.04
Sune Vuorela 8 years ago
parent ee57925c57
commit 3e48663fb7
  1. 5
      cmake/modules/FindDiscount.cmake
  2. 2
      generators/markdown/CMakeLists.txt

@ -7,6 +7,7 @@
# discount_INCLUDE_DIR - the include path of the discount library # discount_INCLUDE_DIR - the include path of the discount library
# Copyright (c) 2017, Julian Wolff, <wolff@julianwolff.de> # Copyright (c) 2017, Julian Wolff, <wolff@julianwolff.de>
# Copyright (c) 2018, Sune Vuorela, <sune@kde.org>
# #
# Redistribution and use is allowed according to the terms of the BSD license. # Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@ -34,3 +35,7 @@ endif (discount_INCLUDE_DIR AND discount_LIBRARIES)
mark_as_advanced(discount_INCLUDE_DIR discount_LIBRARIES) 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()

@ -16,7 +16,7 @@ set(okularGenerator_md_PART_SRCS
okular_add_generator(okularGenerator_md ${okularGenerator_md_PART_SRCS}) 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 ###############
install( FILES okularMd.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) install( FILES okularMd.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )

Loading…
Cancel
Save