forked from xiangxw/mupdf-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (27 loc) · 1.07 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
cmake_minimum_required (VERSION 2.8.11 FATAL_ERROR)
project (mupdf-qt)
# Settings
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
cmake_policy (SET CMP0020 NEW) # link qtmain by default on win32 platform
# MuPDF library
find_package (MuPDF REQUIRED)
include_directories (${MuPDF_INCLUDE_DIRS})
# mupdf-qt library
set (LIBMUPDF mupdf-qt)
find_package (Qt5Gui)
include_directories (${CMAKE_SOURCE_DIR}/include)
include_directories (${CMAKE_SOURCE_DIR}/src/private)
set (LIBMUPDF_SOURCES src/mupdf-document.cpp
src/mupdf-page.cpp
src/mupdf-link.cpp
src/mupdf-outline.cpp
src/mupdf-textbox.cpp
)
add_library (${LIBMUPDF} STATIC ${LIBMUPDF_SOURCES})
target_link_libraries (${LIBMUPDF} ${MuPDF_LIBRARIES})
qt5_use_modules (${LIBMUPDF} Gui)
# Examples
add_subdirectory (examples)