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

Last change on this file since 49 was 37, checked in by cfougera, 11 years ago

First commit of Sick lidars interfaces.

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