source: pacpussensors/trunk/PacpusSocket/CMakeLists.txt@ 97

Last change on this file since 97 was 85, checked in by phudelai, 10 years ago

socket corrected

File size: 2.2 KB
RevLine 
[21]1project(PacpusSocket)
2################################################################################
[39]3add_definitions(-DPACPUSSOCKET_EXPORTS)
[21]4
5# ========================================
6# Configure qt4
7# ========================================
8if(QT4_FOUND)
[85]9 set(QT_USE_QTXML true)
10 set(QT_USE_QTNETWORK true)
11 include(${QT_USE_FILE})
[21]12else()
[85]13 message(ERROR "Qt4 needed")
[21]14endif()
15
16# ========================================
17# Compiler definitions
18# ========================================
19add_definitions(
[85]20 ${QT_DEFINITIONS}
[21]21)
22
23# ========================================
24# Include directories
25# ========================================
26include_directories(
[85]27 ${PROJECT_BINARY_DIR}
28 ${QT_INCLUDE_DIR}
[21]29)
30
31# ========================================
32# Link directories
33# ========================================
34link_directories(
35)
36
37pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
38
39# ========================================
40# List of sources
41# ========================================
42set(
43 PROJECT_SRCS
[85]44 PacpusSocketAirplug.cpp
45 PacpusSocketAirplug.h
46 PacpusUDPSocket.cpp
47 PacpusUDPSocket.h
[21]48 ${PLUGIN_CPP}
49)
50
51# ========================================
52# Files to MOC
53# ========================================
54set(
55 FILES_TO_MOC
[85]56 PacpusSocketAirplug.h
57 PacpusUDPSocket.h
[21]58 ${PLUGIN_H}
59)
60
61set(
62 UI_FILES
63
64)
65
66# ========================================
67# Call MOC
68# ========================================
69qt4_wrap_cpp(
70 PROJECT_MOC_SRCS
71 ${FILES_TO_MOC}
72)
73
74qt4_wrap_ui(
75 PROJECT_UI_SRCS
76 ${UI_FILES}
77)
78
79# ========================================
80# Build a library
81# ========================================
82pacpus_add_library(
83 ${PROJECT_NAME} SHARED
84 ${PROJECT_SRCS}
85 ${PROJECT_MOC_SRCS}
86 ${PROJECT_UI_SRCS}
87)
88
89# ========================================
90# Libraries
91# ========================================
92# All the platform
93target_link_libraries(
94 ${PROJECT_NAME}
95 ${PACPUS_LIBRARIES}
96 ${QT_LIBRARIES}
97 ${PACPUS_DEPENDENCIES_LIB}
98)
99
100# ========================================
101# Install
102# ========================================
[85]103pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.