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

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

Use the Unix EOL instead of the Windows one.

File size: 3.1 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}/DbitePlayer/DbtPlyEngine.h
49 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyFileManager.h
50 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyTrigger.h
51 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyEngineStateChart.h
52 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyUserInterface.h
53)
54
55# ========================================
56# Files to MOC
57# ========================================
58set(
59 FILES_TO_MOC
60 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyEngine.h
61 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyFileManager.h
62 ${PACPUS_INCLUDE_DIR}/DbitePlayer/DbtPlyTrigger.h
63 ${PACPUS_INCLUDE_DIR}/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# ========================================
83add_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# Properties
110# ========================================
111set_target_properties(
112 ${PROJECT_NAME}
113 PROPERTIES DEBUG_POSTFIX "_d"
114)
115
116# ========================================
117# Install directories
118# ========================================
119install(
120 TARGETS ${PROJECT_NAME}
121 RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
122 LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
123 ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
124)
Note: See TracBrowser for help on using the repository browser.