source: pacpussensors/trunk/Wifibot/CMakeLists.txt@ 99

Last change on this file since 99 was 99, checked in by nguyenhu, 9 years ago

compilation under linux with 0.2.X framework

File size: 2.6 KB
Line 
1#########################quick start############################################
2#cmake ../ -G "CodeBlocks - Unix Makefiles"
3#make
4#make install
5#make clean
6################################################################################
7project(Wifibot)
8set(${PROJECT_NAME}_VERSION_MAJOR 0)
9set(${PROJECT_NAME}_VERSION_MINOR 1)
10add_definitions( -DWIFIBOTXT_EXPORTS )
11################################################################################
12create_export(EXPORT_HDR ${PROJECT_NAME})
13pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
14add_definitions (${QT_DEFINITIONS})
15
16find_package(Qt5Network REQUIRED)
17################################################################################
18# DIRECTORIES
19include_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# ========================================
29link_directories(
30 ${PACPUS_LIB_DIR}
31)
32
33
34################################################################################
35# FILES
36set(PROJECT_HDRS
37 ${EXPORT_HDR}
38 wifibot.h
39 ps3remote.h
40)
41set(PROJECT_SRCS
42 ${PLUGIN_CPP}
43 wifibot.cpp
44 ps3remote.cpp
45)
46
47set(FILES_TO_MOC
48 ${PLUGIN_HDR}
49 wifibot.h
50 ps3remote.h
51)
52
53set(UI_FILES
54)
55
56################################################################################
57# Qt: call moc, uic
58qt_wrap_cpp(PROJECT_MOC_SRCS
59 ${FILES_TO_MOC}
60)
61
62qt_wrap_ui(PROJECT_UI_SRCS
63 ${UI_FILES}
64)
65
66################################################################################
67# BUILD and LINK
68pacpus_add_library(${PROJECT_NAME} SHARED
69 ${PROJECT_HDRS}
70 ${PROJECT_SRCS}
71 ${PROJECT_MOC_SRCS}
72 ${PROJECT_UI_SRCS}
73)
74
75
76# ========================================
77# Libraries
78# ========================================
79set(LIBS
80 optimized FileLib debug FileLib_d
81 optimized PacpusLib debug PacpusLib_d
82 optimized PacpusTools debug PacpusTools_d
83 optimized PacpusSocket debug PacpusSocket_d
84)
85if (WIN32)
86 list(APPEND LIBS
87 optimized ROAD_TIME debug ROAD_TIME_d
88 )
89endif()
90# LINK
91target_link_libraries(${PROJECT_NAME}
92 ${PACPUS_LIBRARIES}
93 ${PACPUS_DEPENDENCIES_LIB}
94 ${LIBS}
95 ${QT_LIBRARIES}
96 )
97qt5_use_modules(${PROJECT_NAME} Network)
98################################################################################
99# FOLDERS
100pacpus_folder(${PROJECT_NAME} "components")
101################################################################################
102# INSTALL
103pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.