source: pacpusframework/branches/2.0-beta1/src/PacpusLib/CMakeLists.txt@ 140

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

Update: using qt_wrap_ui, qt_wrap_cpp everywhere.

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