Warning, /education/cantor/thirdparty/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # This cmake file are managing embedded 3party Cantor dependencies
0002 
0003 # 3dparty patched Discount
0004 # Embedded for a while
0005 include(ExternalProject)
0006 set (DISCOUNT_ONLY_LIBRARY ON)
0007 set (DISCOUNT_MAKE_INSTALL OFF)
0008 ExternalProject_Add(
0009     discount_project
0010     URL ${CMAKE_CURRENT_SOURCE_DIR}/discount-2.2.6-patched
0011     SOURCE_SUBDIR cmake
0012     CMAKE_ARGS -DDISCOUNT_ONLY_LIBRARY:BOOL=ON -DDISCOUNT_MAKE_INSTALL:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE}
0013     CMAKE_CACHE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true"
0014     PREFIX ${CMAKE_CURRENT_BINARY_DIR}
0015     INSTALL_COMMAND ""
0016     BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/discount_project-build
0017     BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/discount_project-build/libmarkdown${CMAKE_STATIC_LIBRARY_SUFFIX}
0018 )
0019 
0020 ExternalProject_Get_Property(discount_project source_dir)
0021 ExternalProject_Get_Property(discount_project binary_dir)
0022 
0023 add_library(Discount::Lib STATIC IMPORTED GLOBAL)
0024 set_target_properties(Discount::Lib PROPERTIES
0025     INTERFACE_INCLUDE_DIRECTORIES ${source_dir}
0026     IMPORTED_LOCATION ${binary_dir}/libmarkdown${CMAKE_STATIC_LIBRARY_SUFFIX}
0027     POSITION_INDEPENDENT_CODE ON
0028 )
0029 add_dependencies(Discount::Lib discount_project-build)
0030 
0031 # preview.sty
0032 install(FILES preview.sty DESTINATION  ${KDE_INSTALL_DATADIR}/cantor/latex)