Commit 4723d4c3 authored by Christophe Giboudeaux's avatar Christophe Giboudeaux

Fix build with Ninja on FreeBSD.

parent bc31e88a
......@@ -60,7 +60,7 @@ include(KDEFrameworkCompilerSettings)
include(ECMAddAppIcon)
include(GenerateExportHeader)
include(thirdparty/CMakeLists.txt)
add_subdirectory(thirdparty)
if(NOT WIN32)
set_package_properties(LibSpectre PROPERTIES DESCRIPTION "A PostScript rendering library"
......
......@@ -101,9 +101,9 @@ target_link_libraries(cantorpart KF5::Parts KF5::NewStuff
KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets
Qt5::PrintSupport cantorlibs cantor_config )
if(Discount_FOUND)
# if(Discount_FOUND)
target_link_libraries(cantorpart Discount::Lib)
endif(Discount_FOUND)
# endif(Discount_FOUND)
if(BUILD_TESTING)
add_subdirectory(test)
......
......@@ -7,19 +7,20 @@ set (DISCOUNT_ONLY_LIBRARY ON)
set (DISCOUNT_MAKE_INSTALL OFF)
ExternalProject_Add(
discount_project
URL ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/discount-2.2.6-patched
URL ${CMAKE_CURRENT_SOURCE_DIR}/discount-2.2.6-patched
SOURCE_SUBDIR cmake
CMAKE_ARGS DISCOUNT_ONLY_LIBRARY DISCOUNT_MAKE_INSTALL
CMAKE_CACHE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true"
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/thirdparty
STEP_TARGETS configure build
EXCLUDE_FROM_ALL 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)
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}
......@@ -29,4 +30,4 @@ add_dependencies(Discount::Lib discount_project-build)
set(Discount_FOUND TRUE)
# preview.sty
install(FILES thirdparty/standalone.cls DESTINATION ${KDE_INSTALL_DATADIR}/cantor/latex )
install(FILES standalone.cls DESTINATION ${KDE_INSTALL_DATADIR}/cantor/latex)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment