1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(DBITEPlayer)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Compiler definitions
|
---|
13 | # ========================================
|
---|
14 | add_definitions(${QT_DEFINITIONS})
|
---|
15 |
|
---|
16 | # ========================================
|
---|
17 | # Include directories
|
---|
18 | # ========================================
|
---|
19 | include_directories(
|
---|
20 | ${CMAKE_BINARY_DIR}/DBITEPlayer
|
---|
21 | ${QT_INCLUDE_DIR}
|
---|
22 | )
|
---|
23 |
|
---|
24 | # ========================================
|
---|
25 | # Link directories
|
---|
26 | # ========================================
|
---|
27 | link_directories(
|
---|
28 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
29 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
30 | ${PROJECT_BINARY_DIR}/../DBITEPlayerLib
|
---|
31 | ${PROJECT_BINARY_DIR}/../PacpusTools
|
---|
32 | ${PROJECT_BINARY_DIR}/../RoadTime
|
---|
33 | )
|
---|
34 |
|
---|
35 | # ========================================
|
---|
36 | # List of sources
|
---|
37 | # ========================================
|
---|
38 | set(PROJECT_HDRS
|
---|
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/road_time.h
|
---|
47 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
|
---|
48 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
|
---|
49 | )
|
---|
50 | set(PROJECT_SRCS
|
---|
51 | ./ComponentBase.cpp
|
---|
52 | ./ComponentFactoryBase.cpp
|
---|
53 | ./ComponentManager.cpp
|
---|
54 | ./Log.cpp
|
---|
55 | ./XmlComponentConfig.cpp
|
---|
56 | ./XmlConfigFile.cpp
|
---|
57 | )
|
---|
58 |
|
---|
59 | # ========================================
|
---|
60 | # Build an executable
|
---|
61 | # ========================================
|
---|
62 | pacpus_add_executable(
|
---|
63 | ${PROJECT_NAME}
|
---|
64 | ./src/main.cpp
|
---|
65 | ../ico/heudiasycIco.rc
|
---|
66 | )
|
---|
67 |
|
---|
68 | # ========================================
|
---|
69 | # Libraries & Dependencies
|
---|
70 | # ========================================
|
---|
71 |
|
---|
72 | set(OPT_LIBRARIES
|
---|
73 | optimized dbiteplayerlib debug dbiteplayerlib_d
|
---|
74 | optimized FileLib debug FileLib_d
|
---|
75 | optimized PacpusLib debug PacpusLib_d
|
---|
76 | )
|
---|
77 |
|
---|
78 | # Windows platform
|
---|
79 | if(WIN32)
|
---|
80 | LIST(APPEND OPT_LIBRARIES
|
---|
81 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
82 | Winmm
|
---|
83 | )
|
---|
84 | endif()
|
---|
85 |
|
---|
86 | if(UNIX)
|
---|
87 | LIST(APPEND OPT_LIBRARIES
|
---|
88 | pthread
|
---|
89 | )
|
---|
90 | endif()
|
---|
91 |
|
---|
92 | # All the platform
|
---|
93 | target_link_libraries(
|
---|
94 | ${PROJECT_NAME}
|
---|
95 | ${QT_LIBRARIES}
|
---|
96 | ${OPT_LIBRARIES}
|
---|
97 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
98 | )
|
---|
99 |
|
---|
100 | # ========================================
|
---|
101 | # Install
|
---|
102 | # ========================================
|
---|
103 | pacpus_install(${PROJECT_NAME})
|
---|
104 |
|
---|
105 | # ========================================
|
---|
106 | # Folder
|
---|
107 | # ========================================
|
---|
108 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|