forked from LibrePCB/parseagle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
119 lines (113 loc) · 3.49 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# CMake version configuration
cmake_minimum_required(VERSION 3.5...3.19)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
# Define project
project(parseagle
VERSION 0.2.0
LANGUAGES CXX)
# Use C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Find required Qt packages
find_package(Qt 5.2.0 NAMES Qt6 Qt5 COMPONENTS Core Xml REQUIRED)
find_package(Qt${Qt_VERSION_MAJOR} COMPONENTS Core Xml REQUIRED)
# Export library
add_library(parseagle STATIC
# Sources
parseagle/board/board.cpp
parseagle/board/contactref.cpp
parseagle/board/designrules.cpp
parseagle/board/element.cpp
parseagle/board/param.cpp
parseagle/board/signal.cpp
parseagle/board/via.cpp
parseagle/common/attribute.cpp
parseagle/common/circle.cpp
parseagle/common/dimension.cpp
parseagle/common/domelement.cpp
parseagle/common/frame.cpp
parseagle/common/grid.cpp
parseagle/common/polygon.cpp
parseagle/common/rectangle.cpp
parseagle/common/rotation.cpp
parseagle/common/text.cpp
parseagle/common/vertex.cpp
parseagle/common/wire.cpp
parseagle/deviceset/connection.cpp
parseagle/deviceset/device.cpp
parseagle/deviceset/deviceset.cpp
parseagle/deviceset/gate.cpp
parseagle/deviceset/technology.cpp
parseagle/library.cpp
parseagle/package/hole.cpp
parseagle/package/package.cpp
parseagle/package/smtpad.cpp
parseagle/package/thtpad.cpp
parseagle/schematic/bus.cpp
parseagle/schematic/instance.cpp
parseagle/schematic/label.cpp
parseagle/schematic/module.cpp
parseagle/schematic/net.cpp
parseagle/schematic/part.cpp
parseagle/schematic/pinref.cpp
parseagle/schematic/schematic.cpp
parseagle/schematic/segment.cpp
parseagle/schematic/sheet.cpp
parseagle/symbol/pin.cpp
parseagle/symbol/symbol.cpp
# Headers
parseagle/board/board.h
parseagle/board/contactref.h
parseagle/board/designrules.h
parseagle/board/element.h
parseagle/board/param.h
parseagle/board/signal.h
parseagle/board/via.h
parseagle/common/attribute.h
parseagle/common/circle.h
parseagle/common/dimension.h
parseagle/common/domelement.h
parseagle/common/enums.h
parseagle/common/frame.h
parseagle/common/grid.h
parseagle/common/point.h
parseagle/common/polygon.h
parseagle/common/rectangle.h
parseagle/common/rotation.h
parseagle/common/text.h
parseagle/common/vertex.h
parseagle/common/wire.h
parseagle/deviceset/connection.h
parseagle/deviceset/device.h
parseagle/deviceset/deviceset.h
parseagle/deviceset/gate.h
parseagle/deviceset/technology.h
parseagle/library.h
parseagle/package/hole.h
parseagle/package/package.h
parseagle/package/smtpad.h
parseagle/package/thtpad.h
parseagle/schematic/bus.h
parseagle/schematic/instance.h
parseagle/schematic/label.h
parseagle/schematic/module.h
parseagle/schematic/net.h
parseagle/schematic/part.h
parseagle/schematic/pinref.h
parseagle/schematic/schematic.h
parseagle/schematic/segment.h
parseagle/schematic/sheet.h
parseagle/symbol/pin.h
parseagle/symbol/symbol.h
)
target_link_libraries(parseagle
# Qt
Qt${Qt_VERSION_MAJOR}::Core
Qt${Qt_VERSION_MAJOR}::Xml
)
target_include_directories(parseagle INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
# Alias to namespaced variant
add_library(ParsEagle::ParsEagle ALIAS parseagle)