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

Last change on this file since 27 was 27, checked in by Marek Kurdej, 11 years ago

Minor: CMakeLists fixes (Qt4/Qt5 compatibility).

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