source: pacpusframework/branches/2.0-beta1/src/DBITEPlayer/CMakeLists.txt@ 150

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

Fix boost log for linux (add link with boost_log_setup and pthread)

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(DBITEPlayer)
10
11# ========================================
12# Compiler definitions
13# ========================================
14add_definitions(
15 ${QT_DEFINITIONS}
16)
17
18# ========================================
19# Include directories
20# ========================================
21include_directories(
22 ${CMAKE_BINARY_DIR}/DBITEPlayer
23 ${QT_INCLUDE_DIR}
24)
25
26# ========================================
27# Link directories
28# ========================================
29link_directories(
30 ${PROJECT_BINARY_DIR}/../PacpusLib
31 ${PROJECT_BINARY_DIR}/../FileLib
32 ${PROJECT_BINARY_DIR}/../DBITEPlayerLib
33 ${PROJECT_BINARY_DIR}/../PacpusTools
34 ${PROJECT_BINARY_DIR}/../RoadTime
35)
36
37# ========================================
38# List of sources
39# ========================================
40set(
41 PROJECT_SRCS
42 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
43 ${PACPUS_INCLUDE_DIR}/Pacpus//kernel/ComponentBase.h
44 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
45 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
46 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
47 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
48 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
49 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
50 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
51 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
52 ./ComponentBase.cpp
53 ./ComponentFactoryBase.cpp
54 ./ComponentManager.cpp
55 ./Log.cpp
56 ./XmlComponentConfig.cpp
57 ./XmlConfigFile.cpp
58)
59
60# ========================================
61# Build an executable
62# ========================================
63pacpus_add_executable(
64 ${PROJECT_NAME}
65 ./src/main.cpp
66)
67
68# ========================================
69# Libraries & Dependencies
70# ========================================
71
72set(OPT_LIBRARIES
73 optimized dbiteplayerlib debug dbiteplayerlib_d
74 optimized FileLib debug FileLib_d
75 optimized PacpusLib debug PacpusLib_d
76)
77
78# Windows platform
79if(WIN32)
80 LIST(APPEND OPT_LIBRARIES
81 optimized ROAD_TIME debug ROAD_TIME_d
82 Winmm
83 )
84endif()
85
86if(UNIX)
87 LIST(APPEND OPT_LIBRARIES
88 pthread
89 boost_log_setup
90)
91endif()
92
93# All the platform
94target_link_libraries(
95 ${PROJECT_NAME}
96 ${QT_LIBRARIES}
97 ${OPT_LIBRARIES}
98 ${PACPUS_DEPENDENCIES_LIB}
99)
100
101# ========================================
102# Install
103# ========================================
104pacpus_install(${PROJECT_NAME})
105
106# ========================================
107# Folder
108# ========================================
109pacpus_folder(${PROJECT_NAME} "tools")
Note: See TracBrowser for help on using the repository browser.