forked from simulton/QSchematic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (41 loc) · 1.71 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
cmake_minimum_required(VERSION 3.19)
# Project
project(
qschematic
VERSION 1.3.2
LANGUAGES CXX
HOMEPAGE_URL https://github.com/simulton/qschematic
)
# User options
option(QSCHEMATIC_BUILD_DEMO "Whether to build the demo project" ON)
option(QSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD "Whether to pull the GPDS dependency via FetchContent" ON)
# User settings
set(QSCHEMATIC_DEPENDENCY_GPDS_TARGET "gpds::gpds-static" CACHE STRING "The CMake target of the GPDS library to use")
set(CMAKE_DEBUG_POSTFIX d)
# Include the library
add_subdirectory(qschematic)
# Include the example(s)
if (QSCHEMATIC_BUILD_DEMO)
add_subdirectory(demo)
endif()
# Print options
message(STATUS "")
message(STATUS "-------------------------")
message(STATUS "QSchematic configuration:")
message(STATUS " Build")
message(STATUS " Demo : " ${QSCHEMATIC_BUILD_DEMO})
message(STATUS "")
message(STATUS " Dependencies")
message(STATUS " GPDS")
message(STATUS " Download : " ${QSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD})
message(STATUS " Target : " ${QSCHEMATIC_DEPENDENCY_GPDS_TARGET})
message(STATUS "-------------------------")
message(STATUS "")
################################################################################
# CPack #
################################################################################
set(CPACK_PACKAGE_VENDOR "Simulton GmbH")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A library for diagrams such as flowcharts or even proper engineering schematics within a Qt application.")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/readme.md")
include(CPack)