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

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

Minor: CMakeLists fixes (Qt4/Qt5 compatibility).

File size: 2.3 KB
RevLine 
[1]1project(Alasca)
[11]2
[1]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# ========================================
[2]24link_directories( ${PACPUS_LIB_DIR}
[1]25)
26
[2]27message (STATUS ${PACPUS_LIB_DIR})
28
[1]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# ========================================
[27]61qt_wrap_cpp(
[1]62 PROJECT_MOC_SRCS
63 ${FILES_TO_MOC}
64)
65
[27]66qt_wrap_ui(
[1]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
[2]81message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
82
[9]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
[1]94# ========================================
95# Libraries
96# ========================================
97# All the platform
98target_link_libraries(
99 ${PROJECT_NAME}
100 ${PACPUS_LIBRARIES}
101 ${QT_LIBRARIES}
102 ${PACPUS_DEPENDENCIES_LIB}
[9]103 ${LIBS}
[1]104)
105
[11]106pacpus_folder(${PROJECT_NAME} "components")
107
[1]108# ========================================
109# Install
110# ========================================
111pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.