-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
65 lines (44 loc) · 1.69 KB
/
CMakeLists.txt
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required( VERSION 3.1 )
project( md-pdf )
include( ExternalProject )
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
link_directories( ${CMAKE_BINARY_DIR}/lib )
option( BUILD_BENCHMARK "Build benchmark? Default OFF." OFF )
if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE "Release"
CACHE STRING "Choose the type of build."
FORCE)
endif( NOT CMAKE_BUILD_TYPE )
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
if( MDPDF_USE_CONAN )
include( ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake )
conan_basic_setup()
endif()
set( PODOFO_BUILD_LIB_ONLY ON )
set( PODOFO_BUILD_SHARED ON CACHE INTERNAL "" FORCE )
add_subdirectory( 3rdparty/podofo-trunk )
set( BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE )
add_subdirectory( 3rdparty/widgets )
set( BUILD_MD4QT_TESTS OFF CACHE INTERNAL "" FORCE )
add_subdirectory( 3rdparty/md4qt )
find_package( JPEG REQUIRED )
find_package( PNG REQUIRED )
find_package( BZip2 )
find_package( Brotli )
find_package( EXPAT )
find_package( Freetype )
set( JKQtPlotter_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE )
set( JKQtPlotter_BUILD_TOOLS OFF CACHE INTERNAL "" FORCE )
add_subdirectory( 3rdparty/JKQtPlotter )
add_subdirectory( md-pdf )
if( MDPDF_USE_CONAN )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/path.ps1.in ${CMAKE_CURRENT_SOURCE_DIR}/path.ps1 )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/path.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/path.txt )
endif()
enable_testing()
add_subdirectory( tests )