-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
45 lines (38 loc) · 1.38 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
cmake_minimum_required (VERSION 3.7)
project (pdfslicer CXX C)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-modules)
set (SLICER_DEBUG_FLAGS -Wall -Wextra -Wpedantic -Wshadow -Wduplicated-cond -Wduplicated-branches -Wlogical-op)
set (APPLICATION_ID "com.github.junrrein.PDFSlicer")
set (APPLICATION_NAME "PDF Slicer")
set (APPLICATION_WEBSITE "https://junrrein.github.io/pdfslicer/")
set (GETTEXT_PACKAGE ${APPLICATION_ID})
set (LINUX_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale/")
set (VERSION 1.8.9)
set (SOURCE_DATA_DIR ${CMAKE_SOURCE_DIR}/data)
find_package (Threads REQUIRED)
find_package (Intl REQUIRED)
find_package (Gettext REQUIRED)
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTKMM gtkmm-3.0 IMPORTED_TARGET REQUIRED)
pkg_check_modules (POPPLER poppler-cpp IMPORTED_TARGET REQUIRED)
if (MINGW)
include (WindowsQpdf)
else ()
# See https://unix.stackexchange.com/q/362289/
set (ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} 1)
pkg_check_modules (QPDF libqpdf IMPORTED_TARGET REQUIRED)
add_library (qpdf_lib ALIAS PkgConfig::QPDF)
set (ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} 0)
endif ()
include (Utils)
add_subdirectory (third-party)
add_subdirectory (src)
add_subdirectory (tests)
add_subdirectory (data)
add_subdirectory (po)
if (MINGW)
include (WindowsInstaller)
endif ()