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

Last change on this file since 18 was 11, checked in by morasjul, 11 years ago

[cmake] Added: solution folders (pacpus_folder) for MSVC and compatible dev. env.

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