1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(dbiteplayerlib)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Configure qt4
|
---|
13 | # ========================================
|
---|
14 | #if(QT4_FOUND)
|
---|
15 | # set(QT_USE_QTXML true)
|
---|
16 | # include(${QT_USE_FILE})
|
---|
17 | #else()
|
---|
18 | # message(ERROR "Qt4 needed")
|
---|
19 | #endif(QT4_FOUND)
|
---|
20 |
|
---|
21 | # ========================================
|
---|
22 | # Compiler definitions
|
---|
23 | # ========================================
|
---|
24 | add_definitions(
|
---|
25 | -DDBITE_PLAYER_EXPORTS
|
---|
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 | ./DbtPlyEngine.cpp
|
---|
43 | ./DbtPlyUserInterface.cpp
|
---|
44 | ./DbtPlyEngineStateChart.cpp
|
---|
45 | ./DbtPlyFileManager.cpp
|
---|
46 | ./DbtPlyTrigger.cpp
|
---|
47 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
---|
48 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
---|
49 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
---|
50 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
|
---|
51 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
---|
52 | )
|
---|
53 |
|
---|
54 | # ========================================
|
---|
55 | # Files to MOC
|
---|
56 | # ========================================
|
---|
57 | set(
|
---|
58 | FILES_TO_MOC
|
---|
59 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
---|
60 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
---|
61 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
---|
62 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
---|
63 | )
|
---|
64 |
|
---|
65 | # ========================================
|
---|
66 | # Call MOC
|
---|
67 | # ========================================
|
---|
68 | qt5_wrap_cpp(
|
---|
69 | PROJECT_MOC_SRCS
|
---|
70 | ${FILES_TO_MOC}
|
---|
71 | )
|
---|
72 |
|
---|
73 | # ========================================
|
---|
74 | # Directories architecture
|
---|
75 | # ========================================
|
---|
76 | SOURCE_GROUP(Core FILES ${PROJECT_SRCS} )
|
---|
77 | SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS})
|
---|
78 |
|
---|
79 | # ========================================
|
---|
80 | # Build a library
|
---|
81 | # ========================================
|
---|
82 | pacpus_add_library(
|
---|
83 | ${PROJECT_NAME} SHARED
|
---|
84 | ${PROJECT_SRCS}
|
---|
85 | ${PROJECT_MOC_SRCS}
|
---|
86 | )
|
---|
87 |
|
---|
88 | # ========================================
|
---|
89 | # Libraries
|
---|
90 | # ========================================
|
---|
91 | # All platform
|
---|
92 | target_link_libraries(
|
---|
93 | ${PROJECT_NAME}
|
---|
94 | FileLib
|
---|
95 | PacpusTools
|
---|
96 | #optimized FileLib debug FileLib_d
|
---|
97 | #optimized PacpusTools debug PacpusTools_d
|
---|
98 | ${QT_LIBRARIES}
|
---|
99 | )
|
---|
100 | # Windows platform
|
---|
101 | if(WIN32)
|
---|
102 | target_link_libraries(
|
---|
103 | ${PROJECT_NAME}
|
---|
104 | ROAD_TIME
|
---|
105 | #optimized ROAD_TIME debug ROAD_TIME_d
|
---|
106 | Winmm
|
---|
107 | )
|
---|
108 | endif()
|
---|
109 |
|
---|
110 | # ========================================
|
---|
111 | # Install
|
---|
112 | # ========================================
|
---|
113 | pacpus_install(${PROJECT_NAME})
|
---|
114 |
|
---|
115 | # ========================================
|
---|
116 | # Folder
|
---|
117 | # ========================================
|
---|
118 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|