source: pacpusframework/branches/2.0-beta1/src/_NewComponent/CMakeLists.txt.in@ 147

Last change on this file since 147 was 147, checked in by Marek Kurdej, 11 years ago

Added: scripts to create new component.

File size: 2.3 KB
Line 
1project(@PACPUS_COMPONENT_NAME@)
2
3################################################################################
4create_export(EXPORT_HDR ${PROJECT_NAME})
5
6################################################################################
7# Qt
8set(QT_USE_QTXML true)
9set(QT_USE_QTNETWORK true)
10include(${QT_USE_FILE})
11
12add_definitions(
13 ${QT_DEFINITIONS}
14)
15
16################################################################################
17# Include directories
18include_directories(
19 ${PACPUSINCLUDE_DIRECTORY}
20 ${PROJECT_BINARY_DIR}
21 ${QT_INCLUDE_DIR}
22)
23
24################################################################################
25# Link directories
26link_directories(
27 ${PACPUS_LIB_DIR}
28)
29pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME})
30
31################################################################################
32# FILES
33set(HDRS
34 ${EXPORT_HDR}
35 @PACPUS_COMPONENT_NAME@.h
36)
37
38set(SRCS
39 @PACPUS_COMPONENT_NAME@.cpp
40 ${PLUGIN_CPP}
41)
42
43set(MOC_FILES
44 #@PACPUS_COMPONENT_NAME@.h
45 ${PLUGIN_H}
46)
47
48set(UI_FILES
49)
50
51################################################################################
52# Call moc, uic
53qt_wrap_cpp(MOC_SRCS
54 ${MOC_FILES}
55)
56qt_wrap_ui(UI_SRCS
57 ${UI_FILES}
58)
59
60################################################################################
61# BUILD and LINK
62pacpus_add_library(${PROJECT_NAME} SHARED
63 ${SRCS}
64 ${HDRS}
65 ${MOC_SRCS}
66 ${UI_SRCS}
67)
68
69################################################################################
70# LIBS
71message(STATUS ${PACPUS_DEPENDENCIES_LIB})
72
73set(LIBS
74 ${PACPUS_LIBRARIES}
75 ${QT_LIBRARIES}
76 ${PACPUS_DEPENDENCIES_LIB}
77 optimized FileLib debug FileLib_d
78 optimized PacpusLib debug PacpusLib_d
79 optimized PacpusTools debug PacpusTools_d
80)
81if (WIN32)
82 list(APPEND LIBS
83 optimized ROAD_TIME debug ROAD_TIME_d
84 )
85endif()
86
87################################################################################
88# LINK
89target_link_libraries(${PROJECT_NAME} ${LIBS})
90# PROPERTIES
91set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_d")
92# FOLDERS
93pacpus_folder(${PROJECT_NAME} "components")
94
95################################################################################
96# INSTALL
97pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.