-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
143 lines (132 loc) · 4.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
cmake_minimum_required(VERSION 3.16)
project(qcadjsapi VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Concurrent Gui Network OpenGL Sql Svg Xml PrintSupport Qml UiTools QuickWidgets Core5Compat)
qt_standard_project_setup()
qt_add_resources(SOURCES qcadjsapi.qrc)
if(MSVC)
add_compile_options(/bigobj)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcad/release)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcad/plugins)
else()
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcad/debug)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcad/plugins)
endif()
qt_add_library(qcadjsapi SHARED
generator/RJSHelper_qcad.h
generator/RJSHelper_qcad_manual.cpp
generator/RJSHelper_qcad_primitive.cpp
generator/RJSHelper_qcad_shared_ptr.cpp
generator/RJSHelper_qcad_shared_ptr_no_copy.cpp
generator/RJSHelper_qcad_wrapped.cpp
generator/RJSHelper_qcad_wrapped_ptr.cpp
generator/RJSHelper_qcad_wrapped_qobject_ptr.cpp
generator/RJSHelper_qcad_wrapped_qobject_ptr.cpp
generator/RJSHelper_qcad_qlist.cpp
generator/RJSHelper_qcad_qlist_ptr.cpp
generator/RJSHelper_qcad_qlist_shared_ptr.cpp
generator/RJSHelper_qcad_qset.cpp
generator/RJSHelper_qcad_qmap.cpp
generator/RJSHelper_qcad_qhash.cpp
generator/RJSHelper_qcad_qpair.cpp
generator/RJSHelper_qcad_dummy.cpp
generator/RJSHelper_qcad_dummy_ptr.cpp
generator/RJSType_qcad.h
generator/RJSType_qcad.cpp
generator/adapters/RNewDocumentListenerAdapter.h
generator/adapters/RPreferencesListenerAdapter.h
generator/adapters/RPaletteListenerAdapter.h
generator/adapters/RTransactionListenerAdapter.h
generator/adapters/RSpatialIndexVisitorAdapter.h
generator/adapters/RScriptAdapters.cpp
generator/adapters/REntityExportListenerAdapter.h
generator/adapters/RCoordinateListenerAdapter.h
generator/adapters/RExportListenerAdapter.h
generator/adapters/RFocusListenerAdapter.h
generator/adapters/RImportListenerAdapter.h
generator/adapters/RViewFocusListenerAdapter.h
generator/adapters/RSelectionListenerAdapter.h
generator/adapters/RFontDatabase.h
generator/adapters/RFileImporterFactoryAdapter.h
generator/adapters/RFileExporterFactoryAdapter.h
generator/adapters/RFileExporterAdapter.h
generator/adapters/RFileImporterAdapter.h
generator/adapters/RInterTransactionListenerAdapter.h
generator/adapters/RPropertyListenerAdapter.h
generator/adapters/RKeyListenerAdapter.h
generator/adapters/RPenListenerAdapter.h
generator/adapters/RBlockListenerAdapter.h
generator/adapters/RLayerListenerAdapter.h
generator/adapters/RViewListenerAdapter.h
RAutoLoadJs.cpp RAutoLoadJs.h
RJSApiPlugin.cpp RJSApiPlugin.h
RScriptHandlerJs.cpp RScriptHandlerJs.h
${SOURCES}
)
include(generator/CMakeInclude.txt)
target_include_directories(qcadjsapi PRIVATE
../qtjsapi
../qtjsapi/generator
../qtjsapi/generator/cpp
../qcad/src/3rdparty
../qcad/src/3rdparty/opennurbs
../qcad/src/3rdparty/spatialindexnavel
../qcad/src/3rdparty/stemmer/include
../qcad/src/3rdparty/dxflib/src
../qcad/src/core
../qcad/src/core/math
../qcad/src/customwidgets
../qcad/src/entity
../qcad/src/grid
../qcad/src/gui
../qcad/src/io
../qcad/src/io/dxf
../qcad/src/operations
../qcad/src/run
../qcad/src/scripting
../qcad/src/scripting/jsapi
../qcad/src/scripts
../qcad/src/snap
../qcad/src/spatialindex
../qcad/src/stemmer
generator
generator/cpp
generator/adapters
.
)
set_target_properties(qcadjsapi PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../qcad/plugins)
set_target_properties(qcadjsapi PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../qcad/plugins)
set_target_properties(qcadjsapi PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ../qcad/plugins)
target_compile_definitions(qcadjsapi PRIVATE
QCADJSAPI_LIBRARY
QCAD_DLL
)
target_link_libraries(qcadjsapi PRIVATE
Qt::Concurrent
Qt::Core
Qt::Gui
Qt::Network
Qt::OpenGL
Qt::Qml
Qt::Sql
Qt::Svg
Qt::Widgets
Qt::Xml
Qt::UiTools
Qt::PrintSupport
Qt::Core5Compat
Qt::QuickWidgets
qcadcore
qcadentity
qcadgui
qcadsnap
qcadgrid
qcadoperations
qcadspatialindex
qcadstemmer
qtjsapi
opennurbs
)