1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(DBITEPlayer)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Configure qt4
|
---|
13 | # ========================================
|
---|
14 | if(QT4_FOUND)
|
---|
15 | set(QT_USE_QTXML true)
|
---|
16 | set(QT_USE_QTNETWORK true)
|
---|
17 | include(${QT_USE_FILE})
|
---|
18 | else()
|
---|
19 | message(ERROR "Qt4 needed")
|
---|
20 | endif()
|
---|
21 |
|
---|
22 | # ========================================
|
---|
23 | # Compiler definitions
|
---|
24 | # ========================================
|
---|
25 | add_definitions(
|
---|
26 | ${QT_DEFINITIONS}
|
---|
27 | )
|
---|
28 |
|
---|
29 | # ========================================
|
---|
30 | # Include directories
|
---|
31 | # ========================================
|
---|
32 | include_directories(
|
---|
33 | ${CMAKE_BINARY_DIR}/DBITEPlayer
|
---|
34 | ${QT_INCLUDE_DIR}
|
---|
35 | )
|
---|
36 |
|
---|
37 | # ========================================
|
---|
38 | # List of sources
|
---|
39 | # ========================================
|
---|
40 | set(
|
---|
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 an executable
|
---|
62 | # ========================================
|
---|
63 | add_executable(
|
---|
64 | ${PROJECT_NAME}
|
---|
65 | ./src/main.cpp
|
---|
66 | )
|
---|
67 |
|
---|
68 | # ========================================
|
---|
69 | # Libraries
|
---|
70 | # ========================================
|
---|
71 | # All the platform
|
---|
72 | target_link_libraries(
|
---|
73 | ${PROJECT_NAME}
|
---|
74 | ${QT_LIBRARIES}
|
---|
75 | dbiteplayerlib
|
---|
76 | FileLib
|
---|
77 | PacpusLib
|
---|
78 | PacpusTools
|
---|
79 | )
|
---|
80 | # Windows
|
---|
81 | if (WIN32)
|
---|
82 | target_link_libraries(
|
---|
83 | ${PROJECT_NAME}
|
---|
84 | ROAD_TIME
|
---|
85 | Winmm
|
---|
86 | )
|
---|
87 | endif()
|
---|
88 |
|
---|
89 | # ========================================
|
---|
90 | # Properties
|
---|
91 | # ========================================
|
---|
92 | set_target_properties(
|
---|
93 | ${PROJECT_NAME}
|
---|
94 | PROPERTIES DEBUG_POSTFIX "_d"
|
---|
95 | )
|
---|
96 |
|
---|
97 | # ========================================
|
---|
98 | # Install directories
|
---|
99 | # ========================================
|
---|
100 | install(
|
---|
101 | TARGETS ${PROJECT_NAME}
|
---|
102 | RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
|
---|
103 | LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
|
---|
104 | ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
|
---|
105 | )
|
---|