1 | #########################quick start############################################
|
---|
2 | #cmake ../ -G "CodeBlocks - Unix Makefiles"
|
---|
3 | #make
|
---|
4 | #make install
|
---|
5 | #make clean
|
---|
6 | ################################################################################
|
---|
7 | project(TelnetClient)
|
---|
8 | set(${PROJECT_NAME}_VERSION_MAJOR 0)
|
---|
9 | set(${PROJECT_NAME}_VERSION_MINOR 1)
|
---|
10 | add_definitions( -DTelnetClient_EXPORTS )
|
---|
11 | ################################################################################
|
---|
12 | create_export(EXPORT_HDR ${PROJECT_NAME})
|
---|
13 | pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
|
---|
14 | add_definitions (${QT_DEFINITIONS})
|
---|
15 |
|
---|
16 | find_package(Qt5Network REQUIRED)
|
---|
17 | ################################################################################
|
---|
18 | # DIRECTORIES
|
---|
19 | include_directories(
|
---|
20 | ${PROJECT_BINARY_DIR}
|
---|
21 | ${QT_INCLUDE_DIR}
|
---|
22 | ${PACPUS_INCLUDE_DIR}
|
---|
23 | ${PACPUS_INCLUDE_DIR}/Pacpus/
|
---|
24 | )
|
---|
25 |
|
---|
26 | # ========================================
|
---|
27 | # Link directories
|
---|
28 | # ========================================
|
---|
29 | link_directories(
|
---|
30 | ${PACPUS_LIB_DIR}
|
---|
31 | )
|
---|
32 |
|
---|
33 |
|
---|
34 | ################################################################################
|
---|
35 | # FILES
|
---|
36 | set(PROJECT_HDRS
|
---|
37 | ${EXPORT_HDR}
|
---|
38 | TelnetClient.h
|
---|
39 | #xml/${PROJECT_NAME}.xml
|
---|
40 | #xml/${PROJECT_NAME}_d.xml
|
---|
41 | )
|
---|
42 | set(PROJECT_SRCS
|
---|
43 | ${PLUGIN_CPP}
|
---|
44 | TelnetClient.cpp
|
---|
45 | )
|
---|
46 |
|
---|
47 | set(FILES_TO_MOC
|
---|
48 | ${PLUGIN_HDR}
|
---|
49 | TelnetClient.h
|
---|
50 | )
|
---|
51 |
|
---|
52 | set(UI_FILES
|
---|
53 | )
|
---|
54 |
|
---|
55 | ################################################################################
|
---|
56 | # Qt: call moc, uic
|
---|
57 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
58 | ${FILES_TO_MOC}
|
---|
59 | )
|
---|
60 |
|
---|
61 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
62 | ${UI_FILES}
|
---|
63 | )
|
---|
64 |
|
---|
65 | ################################################################################
|
---|
66 | # BUILD and LINK
|
---|
67 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
68 | ${PROJECT_HDRS}
|
---|
69 | ${PROJECT_SRCS}
|
---|
70 | ${PROJECT_MOC_SRCS}
|
---|
71 | ${PROJECT_UI_SRCS}
|
---|
72 | )
|
---|
73 |
|
---|
74 |
|
---|
75 | # ========================================
|
---|
76 | # Libraries
|
---|
77 | # ========================================
|
---|
78 | set(LIBS
|
---|
79 | optimized FileLib debug FileLib_d
|
---|
80 | optimized PacpusLib debug PacpusLib_d
|
---|
81 | optimized PacpusTools debug PacpusTools_d
|
---|
82 | )
|
---|
83 | if (WIN32)
|
---|
84 | list(APPEND LIBS
|
---|
85 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
86 | )
|
---|
87 | endif()
|
---|
88 | # LINK
|
---|
89 | target_link_libraries(${PROJECT_NAME}
|
---|
90 | ${PACPUS_LIBRARIES}
|
---|
91 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
92 | ${LIBS}
|
---|
93 | ${QT_LIBRARIES}
|
---|
94 | )
|
---|
95 | qt5_use_modules(${PROJECT_NAME} Network)
|
---|
96 | ################################################################################
|
---|
97 | # FOLDERS
|
---|
98 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
99 | ################################################################################
|
---|
100 | # INSTALL
|
---|
101 | pacpus_install(${PROJECT_NAME})
|
---|