forked from wxFormBuilder/wxAdditions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
92 lines (87 loc) · 2.91 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
cmake_minimum_required(VERSION 3.15)
project(wx_code VERSION 0.1.0)
find_package(wxWidgets 3.0.3 REQUIRED gl core base)
if(${wxWidgets_FOUND})
include(${wxWidgets_USE_FILE})
# Probably to discard, too old code
set(wxTHINGS_SOURCES
include/wxcode/things/genergdi.h
include/wxcode/things/range.h
src/things/genergdi.cpp
src/things/range.cpp
)
set(wxPLOTCTRL_SOURCES
include/wxcode/plotctrl/plotctrl.h
src/plotctrl/fourier.c
src/plotctrl/fparser.cpp
src/plotctrl/fpoptimizer.cpp
src/plotctrl/lm_lsqr.cpp
src/plotctrl/plotctrl.cpp
src/plotctrl/plotcurv.cpp
src/plotctrl/plotdata.cpp
src/plotctrl/plotdraw.cpp
src/plotctrl/plotfunc.cpp
src/plotctrl/plotmark.cpp
src/plotctrl/plotprnt.cpp
)
# wxCode components library
set(COMPONENTS_FILES
include/wxcode/awx/led.h
include/wxcode/ledbargraph/ledbargraph.h
src/awx/led.cpp
src/ledbargraph/ledbargraph.cpp
)
add_library(${CMAKE_PROJECT_NAME} SHARED ${COMPONENTS_FILES})
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
target_link_libraries(${CMAKE_PROJECT_NAME} ${wxWidgets_LIBRARIES})
# wxWeaver plugin
add_subdirectory(sdk)
add_library(wxcode MODULE
plugin/wxcode.cpp
)
target_include_directories(wxcode PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
target_include_directories(wxcode PRIVATE
"sdk/plugin_interface"
)
target_link_libraries(wxcode
${wxWidgets_LIBRARIES}
wx_code
sdk::ticpp
sdk::plugin_interface
)
# Installation
if (UNIX AND NOT APPLE)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
LIBRARY
# DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
install(TARGETS wxcode
DESTINATION "${CMAKE_INSTALL_LIBDIR}/wxweaver"
)
install(DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/plugin/wxcode"
DESTINATION "${CMAKE_INSTALL_DATADIR}/wxweaver/plugins"
)
endif()
message(STATUS "
CMake Generator: ${CMAKE_GENERATOR}
Project name: ${PROJECT_NAME}
Project version: ${PROJECT_VERSION}
Build type: ${CMAKE_BUILD_TYPE}
Install prefix: ${CMAKE_INSTALL_PREFIX}
Output directory: ${CMAKE_BINARY_DIR}
wxWidgets version: ${wxWidgets_VERSION_STRING}
wxWidgets static: ${wxWidgets_DEFAULT_STATIC}
wxWidgets debug: ${wxWidgets_DEFAULT_DEBUG}
wxWidgets unicode: ${wxWidgets_DEFAULT_UNICODE}
wxWidgets CXX flags: ${wxWidgets_CXX_FLAGS_LIST}
Compiler CXX debug flags: ${CMAKE_CXX_FLAGS_DEBUG}
Compiler CXX release flags: ${CMAKE_CXX_FLAGS_RELEASE}
Compiler CXX min size flags: ${CMAKE_CXX_FLAGS_MINSIZEREL}
")
endif()