~lubuntu-dev/juffed/trunk

« back to all changes in this revision

Viewing changes to plugins/terminal/qtermwidget/lib/CMakeLists.txt

  • Committer: Mikhail Murzin
  • Date: 2012-01-31 01:33:22 UTC
  • Revision ID: git-v1:28dda15acf875c1565ffd527d8d4e8daa88ac487
Added plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###| CMAKE qtermwidget/lib |###
 
2
 
 
3
#| 2.6 is out, but most distros only have 2.4
 
4
cmake_minimum_required ( VERSION 2.4 )
 
5
 
 
6
#| Project
 
7
project ( qtermwidget )
 
8
 
 
9
#| Sources
 
10
set ( SRCS
 
11
        TerminalCharacterDecoder.cpp
 
12
        KeyboardTranslator.cpp 
 
13
        Screen.cpp History.cpp BlockArray.cpp konsole_wcwidth.cpp 
 
14
        ScreenWindow.cpp 
 
15
        Emulation.cpp 
 
16
        Vt102Emulation.cpp TerminalDisplay.cpp Filter.cpp 
 
17
        Pty.cpp kpty.cpp k3process.cpp k3processcontroller.cpp 
 
18
        Session.cpp ShellCommand.cpp 
 
19
        qtermwidget.cpp
 
20
)
 
21
 
 
22
#| Headers
 
23
#|      Only the Headers that need to be moc'd go here
 
24
set ( HDRS
 
25
        ScreenWindow.h 
 
26
        Emulation.h 
 
27
        Vt102Emulation.h TerminalDisplay.h Filter.h 
 
28
        Pty.h k3process.h k3processcontroller.h 
 
29
        Session.h 
 
30
        qtermwidget.h
 
31
)
 
32
 
 
33
#| Library Output
 
34
#|      CMake supports out-of-source builds, so the binary dir is not
 
35
#|      necessarily the same as the source directory
 
36
set ( LIBRARY_OUTPUT_PATH
 
37
        ${PROJECT_BINARY_DIR}/../.
 
38
)
 
39
 
 
40
#| Library Versioning
 
41
#|      Libraries are not versioned by default
 
42
set ( qtermwidget_VERSION_MAJOR "0" )
 
43
set ( qtermwidget_VERSION_MINOR "1" )
 
44
set ( qtermwidget_VERSION_PATCH "0" )
 
45
set ( qtermwidget_VERSION 
 
46
        "${qtermwidget_VERSION_MAJOR}.${qtermwidget_VERSION_MINOR}.${qtermwidget_VERSION_PATCH}"
 
47
)
 
48
 
 
49
#| Qt4 Required Options
 
50
add_definitions ( -Wall )
 
51
find_package ( Qt4 REQUIRED ) # Finds Qt4 on the system
 
52
include ( ${QT_USE_FILE} ) # Includes Qt4 headers and libraries (the above command is needed first)
 
53
QT4_WRAP_CPP ( MOC_SRCS ${HDRS} ) # Moc's the headers
 
54
#include ( ${CMAKE_BINARY_DIR} ) # For including the heades generated by ui files
 
55
 
 
56
#| qtermwidget specific
 
57
include_directories ( ${PROJECT_SOURCE_DIR} ) # You mark some of the headers as global, so I just add the source directory to the includes
 
58
 
 
59
#| Defines
 
60
add_definitions ( -DHAVE_POSIX_OPENPT )
 
61
#add_definitions( -DHAVE_GETPT )
 
62
 
 
63
#| Create the Library
 
64
#add_library( qtermwidget STATIC ${SRCS} ${MOC_SRCS} )
 
65
add_library ( qtermwidget SHARED ${SRCS} ${MOC_SRCS} )
 
66
 
 
67
#| Set Build Type
 
68
set ( CMAKE_BUILD_TYPE
 
69
        #"release"
 
70
        "relwithdebinfo" # Default
 
71
        #"debug"
 
72
        #"debugfull"
 
73
)
 
74
 
 
75
#| Library Properties
 
76
set_target_properties ( qtermwidget PROPERTIES
 
77
        #OUTPUT_NAME "alternateName"
 
78
        #PREFIX "lib" 
 
79
        SOVERSION ${qtermwidget_VERSION_MAJOR}
 
80
        #SUFFIX "so"
 
81
        VERSION ${qtermwidget_VERSION}
 
82
)
 
83
 
 
84
#| Link Qt4 Libraries
 
85
target_link_libraries ( qtermwidget ${QT_LIBRARIES} )
 
86