File: CMakeLists.txt

package info (click to toggle)
cantor 4%3A20.12.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,572 kB
  • sloc: cpp: 41,602; ansic: 5,802; pascal: 1,027; xml: 371; sh: 289; makefile: 207; lisp: 91; python: 24
file content (32 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This cmake file are managing embedded 3party Cantor dependencies

# 3dparty patched Discount
# Embedded for a while
include(ExternalProject)
set (DISCOUNT_ONLY_LIBRARY ON)
set (DISCOUNT_MAKE_INSTALL OFF)
ExternalProject_Add(
    discount_project
    URL ${CMAKE_CURRENT_SOURCE_DIR}/discount-2.2.6-patched
    SOURCE_SUBDIR cmake
    CMAKE_ARGS DISCOUNT_ONLY_LIBRARY DISCOUNT_MAKE_INSTALL -DCMAKE_VERBOSE_MAKEFILE=ON
    CMAKE_CACHE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true"
    PREFIX ${CMAKE_CURRENT_BINARY_DIR}
    INSTALL_COMMAND ""
    BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/discount_project-build
    BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/discount_project-build/libmarkdown${CMAKE_STATIC_LIBRARY_SUFFIX}
)

ExternalProject_Get_Property(discount_project source_dir)
ExternalProject_Get_Property(discount_project binary_dir)

add_library(Discount::Lib STATIC IMPORTED GLOBAL)
set_target_properties(Discount::Lib PROPERTIES
    INTERFACE_INCLUDE_DIRECTORIES ${source_dir}
    IMPORTED_LOCATION ${binary_dir}/libmarkdown${CMAKE_STATIC_LIBRARY_SUFFIX}
    POSITION_INDEPENDENT_CODE ON
)
add_dependencies(Discount::Lib discount_project-build)

# preview.sty
install(FILES preview.sty DESTINATION  ${KDE_INSTALL_DATADIR}/cantor/latex)