source: pacpusframework/branches/0.1.x/src/PacpusLib/CMakeLists.txt@ 256

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

Added: PacpusException.

  • Property svn:executable set to *
File size: 3.6 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusLib)
10
11create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel")
12
13# ========================================
14# Configure qt4
15# ========================================
16#if(QT4_FOUND)
17# set(QT_USE_QTXML true)
18# include(${QT_USE_FILE})
19#else()
20# message(ERROR "Qt4 needed")
21#endif()
22
23
24# ========================================
25# Compiler definitions
26# ========================================
27add_definitions(
28 -DQT_NO_KEYWORDS
29 ${QT_DEFINITIONS}
30)
31
32# ========================================
33# Include directories
34# ========================================
35include_directories(
36 ${QT_INCLUDE_DIR}
37)
38
39# ========================================
40# Link directories
41# ========================================
42link_directories(
43 ${PROJECT_BINARY_DIR}/../RoadTime
44 ${PROJECT_BINARY_DIR}/../FileLib
45)
46
47# ========================================
48# List of sources
49# ========================================
50set(PROJECT_HDRS
51 ${EXPORT_HDR}
52 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
53 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
54 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
55 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
56 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
57 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
58 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
59 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusApplication.h
60 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusException.h
61 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
62 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
63 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
64
65 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ConnectionBase.h
66 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputBase.h
67 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputInterface.h
68 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusEvent.h
69 # ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpusStruct.h
70)
71
72set(PROJECT_SRCS
73 ./ComponentBase.cpp
74 ./ComponentFactoryBase.cpp
75 ./ComponentManager.cpp
76 ./Log.cpp
77 ./PacpusApplication.cpp
78 ./PacpusException.cpp
79 ./XmlComponentConfig.cpp
80 ./XmlConfigFile.cpp
81 ./InputOutputBase.cpp
82 # ./PacpusStruct.cpp
83)
84
85set(FILES_TO_MOC
86 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputBase.h
87 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusEvent.h
88)
89
90qt_wrap_cpp(
91 PROJECT_MOC_SRCS
92 ${FILES_TO_MOC}
93 )
94
95# ========================================
96# Build a library
97# ========================================
98pacpus_add_library(${PROJECT_NAME} SHARED
99 ${PROJECT_HDRS}
100 ${PROJECT_SRCS}
101 ${PROJECT_MOC_SRCS}
102)
103
104if(UNIX)
105 set(OPT_LIBRARIES optimized FileLib debug FileLib_d)
106else()
107 set(OPT_LIBRARIES optimized ROAD_TIME debug ROAD_TIME_d)
108endif()
109
110# ========================================
111# Libraries
112# ========================================
113target_link_libraries(
114 ${PROJECT_NAME}
115 ${QT_LIBRARIES}
116 ${PACPUS_DEPENDENCIES_LIB}
117 ${OPT_LIBRARIES}
118)
119
120# ========================================
121# Install
122# ========================================
123pacpus_install(${PROJECT_NAME})
124
125# ========================================
126# Folder
127# ========================================
128pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.