1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(PacpusLib)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Configure qt4
|
---|
13 | # ========================================
|
---|
14 | if(QT4_FOUND)
|
---|
15 | set(QT_USE_QTXML true)
|
---|
16 | include(${QT_USE_FILE})
|
---|
17 | else()
|
---|
18 | message(ERROR "Qt4 needed")
|
---|
19 | endif()
|
---|
20 |
|
---|
21 | # ========================================
|
---|
22 | # Compiler definitions
|
---|
23 | # ========================================
|
---|
24 | add_definitions(
|
---|
25 | -DPACPUSLIB_EXPORTS
|
---|
26 | -DQT_NO_KEYWORDS
|
---|
27 | ${QT_DEFINITIONS}
|
---|
28 | )
|
---|
29 |
|
---|
30 | # ========================================
|
---|
31 | # Include directories
|
---|
32 | # ========================================
|
---|
33 | include_directories(
|
---|
34 | ${QT_INCLUDE_DIR}
|
---|
35 | )
|
---|
36 |
|
---|
37 | # ========================================
|
---|
38 | # List of sources
|
---|
39 | # ========================================
|
---|
40 | set(
|
---|
41 | PROJECT_SRCS
|
---|
42 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
|
---|
43 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
|
---|
44 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
|
---|
45 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
|
---|
46 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
|
---|
47 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
|
---|
48 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
|
---|
49 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusApplication.h
|
---|
50 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusException.h
|
---|
51 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusLibConfig.h
|
---|
52 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
|
---|
53 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
|
---|
54 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
|
---|
55 | ./ComponentBase.cpp
|
---|
56 | ./ComponentFactoryBase.cpp
|
---|
57 | ./ComponentManager.cpp
|
---|
58 | ./Log.cpp
|
---|
59 | ./PacpusApplication.cpp
|
---|
60 | ./PacpusException.cpp
|
---|
61 | ./XmlComponentConfig.cpp
|
---|
62 | ./XmlConfigFile.cpp
|
---|
63 | )
|
---|
64 |
|
---|
65 | # ========================================
|
---|
66 | # Build a library
|
---|
67 | # ========================================
|
---|
68 | pacpus_add_library(
|
---|
69 | ${PROJECT_NAME} SHARED
|
---|
70 | ${PROJECT_SRCS}
|
---|
71 | )
|
---|
72 |
|
---|
73 | # ========================================
|
---|
74 | # Libraries
|
---|
75 | # ========================================
|
---|
76 | target_link_libraries(
|
---|
77 | ${PROJECT_NAME}
|
---|
78 | ${QT_LIBRARIES}
|
---|
79 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
80 | )
|
---|
81 |
|
---|
82 | # ========================================
|
---|
83 | # Install
|
---|
84 | # ========================================
|
---|
85 | pacpus_install(${PROJECT_NAME})
|
---|
86 |
|
---|
87 | # ========================================
|
---|
88 | # Folder
|
---|
89 | # ========================================
|
---|
90 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|