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

Last change on this file since 11 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
File size: 2.5 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusLib)
10
11# ========================================
12# Configure qt4
13# ========================================
14if(QT4_FOUND)
15 set(QT_USE_QTXML true)
16 include(${QT_USE_FILE})
17else()
18 message(ERROR "Qt4 needed")
19endif()
20
21# ========================================
22# Compiler definitions
23# ========================================
24add_definitions(
25 -DPACPUSLIB_EXPORTS
26 -DQT_NO_KEYWORDS
27 ${QT_DEFINITIONS}
28)
29
30# ========================================
31# Include directories
32# ========================================
33include_directories(
34 ${QT_INCLUDE_DIR}
35)
36
37# ========================================
38# List of sources
39# ========================================
40set(
41 PROJECT_SRCS
42 ${PACPUS_INCLUDE_DIR}/kernel/cstdint.h
43 ${PACPUS_INCLUDE_DIR}/kernel/ComponentBase.h
44 ${PACPUS_INCLUDE_DIR}/kernel/ComponentFactory.h
45 ${PACPUS_INCLUDE_DIR}/kernel/ComponentFactoryBase.h
46 ${PACPUS_INCLUDE_DIR}/kernel/ComponentManager.h
47 ${PACPUS_INCLUDE_DIR}/kernel/Log.h
48 ${PACPUS_INCLUDE_DIR}/kernel/pacpus.h
49 ${PACPUS_INCLUDE_DIR}/kernel/road_time.h
50 ${PACPUS_INCLUDE_DIR}/kernel/XmlComponentConfig.h
51 ${PACPUS_INCLUDE_DIR}/kernel/XmlConfigFile.h
52 ./ComponentBase.cpp
53 ./ComponentFactoryBase.cpp
54 ./ComponentManager.cpp
55 ./Log.cpp
56 ./XmlComponentConfig.cpp
57 ./XmlConfigFile.cpp
58)
59
60# ========================================
61# Build a library
62# ========================================
63add_library(
64 ${PROJECT_NAME} SHARED
65 ${PROJECT_SRCS}
66)
67
68# ========================================
69# Libraries
70# ========================================
71target_link_libraries(
72 ${PROJECT_NAME}
73 ${QT_LIBRARIES}
74 ${PACPUS_DEPENDENCIES_LIB}
75)
76
77# ========================================
78# Properties
79# ========================================
80set_target_properties(
81 ${PROJECT_NAME}
82 PROPERTIES DEBUG_POSTFIX "_d"
83)
84
85# ========================================
86# Install directories
87# ========================================
88install(
89 TARGETS ${PROJECT_NAME}
90 RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
91 LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
92 ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
93)
Note: See TracBrowser for help on using the repository browser.