-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
30 lines (22 loc) · 985 Bytes
/
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
cmake_minimum_required(VERSION 3.6)
set(QT_TWAIN_VERSION 0.1.0)
set(QT_TWAIN_PROJECT QtTWAINProject)
project(${QT_TWAIN_PROJECT} VERSION ${QT_TWAIN_VERSION} LANGUAGES CXX)
include(GNUInstallDirs)
set(QT_TWAIN_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(QT_TWAIN_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(QT_TWAIN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
if(Qt5_POSITION_INDEPENDENT_CODE)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/ProjectConfig.cmake.in" "${QT_TWAIN_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake")
install(FILES "${QT_TWAIN_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
COMPONENT dev)
export(PACKAGE ${PROJECT_NAME})
add_subdirectory(src)
add_subdirectory(examples)