Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/FindDiscount.cmake
1 | # - Find Discount | 1 | # - Find Discount | ||
---|---|---|---|---|---|
2 | # Find the discount markdown library. | 2 | # Find the discount markdown library. | ||
3 | # | 3 | # | ||
4 | # This module defines | 4 | # This module defines | ||
5 | # discount_FOUND - whether the discount library was found | 5 | # discount_FOUND - whether the discount library was found | ||
6 | # discount_LIBRARIES - the discount library | 6 | # discount_LIBRARIES - the discount library | ||
7 | # discount_INCLUDE_DIR - the include path of the discount library | 7 | # discount_INCLUDE_DIR - the include path of the discount library | ||
8 | 8 | | |||
9 | # Copyright (c) 2017, Julian Wolff, <wolff@julianwolff.de> | 9 | # Copyright (c) 2017, Julian Wolff, <wolff@julianwolff.de> | ||
10 | # Copyright (c) 2018, Sune Vuorela, <sune@kde.org> | ||||
10 | # | 11 | # | ||
11 | # Redistribution and use is allowed according to the terms of the BSD license. | 12 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | 13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
13 | 14 | | |||
14 | 15 | | |||
15 | if (discount_INCLUDE_DIR AND discount_LIBRARIES) | 16 | if (discount_INCLUDE_DIR AND discount_LIBRARIES) | ||
16 | 17 | | |||
17 | # Already in cache | 18 | # Already in cache | ||
Show All 11 Lines | 21 | else (discount_INCLUDE_DIR AND discount_LIBRARIES) | |||
29 | 30 | | |||
30 | include (FindPackageHandleStandardArgs) | 31 | include (FindPackageHandleStandardArgs) | ||
31 | find_package_handle_standard_args (discount DEFAULT_MSG discount_LIBRARIES discount_INCLUDE_DIR) | 32 | find_package_handle_standard_args (discount DEFAULT_MSG discount_LIBRARIES discount_INCLUDE_DIR) | ||
32 | 33 | | |||
33 | endif (discount_INCLUDE_DIR AND discount_LIBRARIES) | 34 | endif (discount_INCLUDE_DIR AND discount_LIBRARIES) | ||
34 | 35 | | |||
35 | mark_as_advanced(discount_INCLUDE_DIR discount_LIBRARIES) | 36 | mark_as_advanced(discount_INCLUDE_DIR discount_LIBRARIES) | ||
36 | 37 | | |||
38 | if (discount_FOUND) | ||||
39 | add_library(discount::Lib UNKNOWN IMPORTED) | ||||
40 | set_target_properties(discount::Lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${discount_INCLUDE_DIR} IMPORTED_LOCATION ${discount_LIBRARIES}) | ||||
41 | endif() |