Ticket #6: CMakeLists.txt

File CMakeLists.txt, 2.9 KB (added by DHERBOMEZ Gérald, 8 years ago)

cmakelists.txt OK dbcDescriptor

Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusDBCDecriptor)
10
11# ========================================
12# Compiler definitions
13# ========================================
14add_definitions(${QT_DEFINITIONS})
15
16# ========================================
17# Include directories
18# ========================================
19include_directories(
20 ${CMAKE_BINARY_DIR}/DBITEPlayer
21 ${QT_INCLUDE_DIR}
22)
23
24# ========================================
25# Link directories
26# ========================================
27link_directories(
28 ${PROJECT_BINARY_DIR}/../PacpusLib
29 ${PROJECT_BINARY_DIR}/../FileLib
30 ${PROJECT_BINARY_DIR}/../DBITEPlayerLib
31 ${PROJECT_BINARY_DIR}/../PacpusTools
32 ${PROJECT_BINARY_DIR}/../RoadTime
33)
34
35# ========================================
36# List of sources
37# ========================================
38set(PROJECT_HDRS
39
40)
41set(PROJECT_SRCS
42 src/mainwindow.cpp
43 src/main.cpp
44 src/mainwindow.h
45 src/structure.h
46 ../ico/heudiasycIco.rc
47)
48
49# ========================================
50# Files to MOC
51# ========================================
52SET(
53 FILES_TO_MOC
54 src/mainwindow.h
55)
56
57SET(
58 UI_FILES
59 src/mainwindow.ui
60)
61
62# ========================================
63# Call MOC
64# ========================================
65QT_WRAP_CPP(
66 PROJECT_MOC_SRCS
67 ${FILES_TO_MOC}
68)
69
70QT_WRAP_UI(
71 PROJECT_UI_SRCS
72 ${UI_FILES}
73)
74
75# ========================================
76# Build an executable
77# ========================================
78pacpus_add_executable(
79 ${PROJECT_NAME}
80 ${GUI_TYPE}
81 ${PROJECT_SRCS}
82 ${PROJECT_MOC_SRCS}
83 ${PROJECT_UI_SRCS}
84
85)
86
87# ========================================
88# Libraries & Dependencies
89# ========================================
90
91set(OPT_LIBRARIES
92 optimized dbiteplayerlib debug dbiteplayerlib_d
93 optimized FileLib debug FileLib_d
94 optimized PacpusLib debug PacpusLib_d
95)
96
97# Windows platform
98if(WIN32)
99 LIST(APPEND OPT_LIBRARIES
100 optimized ROAD_TIME debug ROAD_TIME_d
101 Winmm
102 )
103endif()
104
105if(UNIX)
106 LIST(APPEND OPT_LIBRARIES
107 pthread
108 )
109endif()
110
111# All the platform
112target_link_libraries(
113 ${PROJECT_NAME}
114 ${QT_LIBRARIES}
115 ${OPT_LIBRARIES}
116 ${PACPUS_DEPENDENCIES_LIB}
117)
118
119# ========================================
120# Install
121# ========================================
122pacpus_install(${PROJECT_NAME})
123
124# ========================================
125# Folder
126# ========================================
127pacpus_folder(${PROJECT_NAME} "tools")