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 | # Windows platform
|
---|
91 | if(WIN32)
|
---|
92 | set(LIBS
|
---|
93 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
94 | Winmm
|
---|
95 | )
|
---|
96 | endif()
|
---|
97 |
|
---|
98 | # All platform
|
---|
99 | target_link_libraries(
|
---|
100 | ${PROJECT_NAME}
|
---|
101 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
102 | ${LIBS}
|
---|
103 | optimized FileLib debug FileLib_d
|
---|
104 | optimized PacpusLib debug PacpusLib_d
|
---|
105 | ${QT_LIBRARIES}
|
---|
106 | )
|
---|
107 |
|
---|
108 | # ========================================
|
---|
109 | # Install
|
---|
110 | # ========================================
|
---|
111 | pacpus_install(${PROJECT_NAME})
|
---|
112 |
|
---|
113 | # ========================================
|
---|
114 | # Folder
|
---|
115 | # ========================================
|
---|
116 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|