source: pacpusframework/trunk/src/PacpusLib/CMakeLists.txt@ 310

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

Added: possibility to use color log output (needs more testing).

  • Property svn:executable set to *
File size: 3.3 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################################################################################
14add_definitions(
15 -DQT_NO_KEYWORDS
16 ${QT_DEFINITIONS}
17)
18
19################################################################################
20# INCLUDES
21include_directories(
22 ${QT_INCLUDE_DIR}
23)
24
25################################################################################
26# LINK
27link_directories(
28 ${PROJECT_BINARY_DIR}/../RoadTime
29 ${PROJECT_BINARY_DIR}/../FileLib
30)
31
32################################################################################
33# FILES
34set(PROJECT_HDRS
35 ${EXPORT_HDR}
36
37 ColorSeverityFormatter.hpp
38
39 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
40 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
41 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
42 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
43 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
44 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
45 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
46 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusApplication.h
47 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusException.h
48 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
49 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
50 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
51
52 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ConnectionBase.h
53 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputBase.h
54 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputInterface.h
55 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusEvent.h
56 # ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpusStruct.h
57)
58
59set(PROJECT_SRCS
60 ComponentBase.cpp
61 ComponentFactoryBase.cpp
62 ComponentManager.cpp
63 ConnectionBase.cpp
64 InputOutputBase.cpp
65 Log.cpp
66 PacpusApplication.cpp
67 PacpusException.cpp
68 # PacpusStruct.cpp
69 XmlComponentConfig.cpp
70 XmlConfigFile.cpp
71)
72
73set(FILES_TO_MOC
74 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/InputOutputBase.h
75 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusEvent.h
76)
77
78qt_wrap_cpp(PROJECT_MOC_SRCS
79 ${FILES_TO_MOC}
80)
81
82################################################################################
83# BUILD AND LINK
84pacpus_add_library(${PROJECT_NAME} SHARED
85 ${PROJECT_HDRS}
86 ${PROJECT_SRCS}
87 ${PROJECT_MOC_SRCS}
88)
89
90if(UNIX)
91 set(OPT_LIBRARIES optimized FileLib debug FileLib_d)
92else()
93 set(OPT_LIBRARIES optimized ROAD_TIME debug ROAD_TIME_d)
94endif()
95
96################################################################################
97# LIBS
98target_link_libraries(
99 ${PROJECT_NAME}
100 ${QT_LIBRARIES}
101 ${PACPUS_DEPENDENCIES_LIB}
102 ${OPT_LIBRARIES}
103)
104
105################################################################################
106# INSTALL
107pacpus_install(${PROJECT_NAME})
108
109################################################################################
110# FOLDER
111pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.