1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(dbiteplayerlib)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Compiler definitions
|
---|
13 | # ========================================
|
---|
14 | add_definitions(
|
---|
15 | -DDBITE_PLAYER_EXPORTS
|
---|
16 | ${QT_DEFINITIONS}
|
---|
17 | )
|
---|
18 |
|
---|
19 | # ========================================
|
---|
20 | # Include directories
|
---|
21 | # ========================================
|
---|
22 | include_directories(
|
---|
23 | ${CMAKE_BINARY_DIR}/DBITEPlayer
|
---|
24 | ${QT_INCLUDE_DIR}
|
---|
25 | )
|
---|
26 |
|
---|
27 | # ========================================
|
---|
28 | # Link directories
|
---|
29 | # ========================================
|
---|
30 | link_directories(
|
---|
31 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
32 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
33 | ${PROJECT_BINARY_DIR}/../RoadTime
|
---|
34 | )
|
---|
35 |
|
---|
36 | # ========================================
|
---|
37 | # List of sources
|
---|
38 | # ========================================
|
---|
39 | set(
|
---|
40 | PROJECT_SRCS
|
---|
41 | ./DbtPlyEngine.cpp
|
---|
42 | ./DbtPlyUserInterface.cpp
|
---|
43 | ./DbtPlyEngineStateChart.cpp
|
---|
44 | ./DbtPlyFileManager.cpp
|
---|
45 | ./DbtPlyTrigger.cpp
|
---|
46 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
---|
47 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
---|
48 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
---|
49 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
|
---|
50 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
---|
51 | )
|
---|
52 |
|
---|
53 | # ========================================
|
---|
54 | # Files to MOC
|
---|
55 | # ========================================
|
---|
56 | set(
|
---|
57 | FILES_TO_MOC
|
---|
58 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
---|
59 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
---|
60 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
---|
61 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
---|
62 | )
|
---|
63 |
|
---|
64 | # ========================================
|
---|
65 | # Call MOC
|
---|
66 | # ========================================
|
---|
67 | qt5_wrap_cpp(
|
---|
68 | PROJECT_MOC_SRCS
|
---|
69 | ${FILES_TO_MOC}
|
---|
70 | )
|
---|
71 |
|
---|
72 | # ========================================
|
---|
73 | # Directories architecture
|
---|
74 | # ========================================
|
---|
75 | SOURCE_GROUP(Core FILES ${PROJECT_SRCS} )
|
---|
76 | SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS})
|
---|
77 |
|
---|
78 | # ========================================
|
---|
79 | # Build a library
|
---|
80 | # ========================================
|
---|
81 | pacpus_add_library(
|
---|
82 | ${PROJECT_NAME} SHARED
|
---|
83 | ${PROJECT_SRCS}
|
---|
84 | ${PROJECT_MOC_SRCS}
|
---|
85 | )
|
---|
86 |
|
---|
87 | # ========================================
|
---|
88 | # Libraries
|
---|
89 | # ========================================
|
---|
90 | set(OPT_LIBRARIES
|
---|
91 | optimized FileLib debug FileLib_d
|
---|
92 | optimized PacpusLib debug PacpusLib_d
|
---|
93 | )
|
---|
94 |
|
---|
95 | # Windows platform
|
---|
96 | if(WIN32)
|
---|
97 | LIST(APPEND OPT_LIBRARIES
|
---|
98 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
99 | Winmm
|
---|
100 | )
|
---|
101 | endif()
|
---|
102 |
|
---|
103 | # All platform
|
---|
104 | target_link_libraries(
|
---|
105 | ${PROJECT_NAME}
|
---|
106 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
107 | ${OPT_LIBRARIES}
|
---|
108 | ${QT_LIBRARIES}
|
---|
109 | )
|
---|
110 |
|
---|
111 | # ========================================
|
---|
112 | # Install
|
---|
113 | # ========================================
|
---|
114 | pacpus_install(${PROJECT_NAME})
|
---|
115 |
|
---|
116 | # ========================================
|
---|
117 | # Folder
|
---|
118 | # ========================================
|
---|
119 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|