source: pacpusframework/branches/2.0-beta1/src/DBITEPlayerLib/CMakeLists.txt@ 110

Last change on this file since 110 was 110, checked in by morasjul, 11 years ago

Beta-2 : Fix CMakeList (link), remove useless code and add improvement

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(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# ========================================
24add_definitions(
25 -DDBITE_PLAYER_EXPORTS
26 ${QT_DEFINITIONS}
27)
28
29# ========================================
30# Include directories
31# ========================================
32include_directories(
33 ${CMAKE_BINARY_DIR}/DBITEPlayer
34 ${QT_INCLUDE_DIR}
35)
36
37# ========================================
38# Link directories
39# ========================================
40link_directories(
41 ${PROJECT_BINARY_DIR}/../PacpusLib
42 ${PROJECT_BINARY_DIR}/../FileLib
43)
44
45# ========================================
46# List of sources
47# ========================================
48set(
49 PROJECT_SRCS
50 ./DbtPlyEngine.cpp
51 ./DbtPlyUserInterface.cpp
52 ./DbtPlyEngineStateChart.cpp
53 ./DbtPlyFileManager.cpp
54 ./DbtPlyTrigger.cpp
55 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
56 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
57 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
58 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
59 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
60)
61
62# ========================================
63# Files to MOC
64# ========================================
65set(
66 FILES_TO_MOC
67 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
68 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
69 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
70 ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
71)
72
73# ========================================
74# Call MOC
75# ========================================
76qt5_wrap_cpp(
77 PROJECT_MOC_SRCS
78 ${FILES_TO_MOC}
79)
80
81# ========================================
82# Directories architecture
83# ========================================
84SOURCE_GROUP(Core FILES ${PROJECT_SRCS} )
85SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS})
86
87# ========================================
88# Build a library
89# ========================================
90pacpus_add_library(
91 ${PROJECT_NAME} SHARED
92 ${PROJECT_SRCS}
93 ${PROJECT_MOC_SRCS}
94)
95
96# ========================================
97# Libraries
98# ========================================
99# All platform
100target_link_libraries(
101 ${PROJECT_NAME}
102 ${PACPUS_DEPENDENCIES_LIB}
103 #FileLib
104 #PacpusTools
105 optimized FileLib debug FileLib_d
106 optimized PacpusLib debug PacpusLib_d
107 ${QT_LIBRARIES}
108)
109# Windows platform
110if(WIN32)
111 target_link_libraries(
112 ${PROJECT_NAME}
113 ROAD_TIME
114 #optimized ROAD_TIME debug ROAD_TIME_d
115 Winmm
116 )
117endif()
118
119# ========================================
120# Install
121# ========================================
122pacpus_install(${PROJECT_NAME})
123
124# ========================================
125# Folder
126# ========================================
127pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.