source: pacpusframework/trunk/src/DBITEPlayerLib/CMakeLists.txt@ 40

Last change on this file since 40 was 28, checked in by sgosseli, 12 years ago

Major: to avoid names collision with other libraries, we should include 'Pacpus/kernel/file.h' instead of 'kernel/file.h'
To work-around this patch, if you use old stuff, you can add in your cmake: include_directories(${PACPUS_INCLUDE_DIR}/Pacpus)

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