source: pacpussensors/trunk/Alasca/CMakeLists.txt@ 2

Last change on this file since 2 was 2, checked in by DHERBOMEZ Gérald, 11 years ago

correction of minor bugs (include and link). Build on Windows OK.

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