1
###| CMAKE qtermwidget/lib |###
3
#| 2.6 is out, but most distros only have 2.4
4
cmake_minimum_required ( VERSION 2.4 )
7
project ( qtermwidget )
11
TerminalCharacterDecoder.cpp
12
KeyboardTranslator.cpp
13
Screen.cpp History.cpp BlockArray.cpp konsole_wcwidth.cpp
16
Vt102Emulation.cpp TerminalDisplay.cpp Filter.cpp
17
Pty.cpp kpty.cpp k3process.cpp k3processcontroller.cpp
18
Session.cpp ShellCommand.cpp
23
#| Only the Headers that need to be moc'd go here
27
Vt102Emulation.h TerminalDisplay.h Filter.h
28
Pty.h k3process.h k3processcontroller.h
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}/../.
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}"
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
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
60
add_definitions ( -DHAVE_POSIX_OPENPT )
61
#add_definitions( -DHAVE_GETPT )
64
#add_library( qtermwidget STATIC ${SRCS} ${MOC_SRCS} )
65
add_library ( qtermwidget SHARED ${SRCS} ${MOC_SRCS} )
68
set ( CMAKE_BUILD_TYPE
70
"relwithdebinfo" # Default
76
set_target_properties ( qtermwidget PROPERTIES
77
#OUTPUT_NAME "alternateName"
79
SOVERSION ${qtermwidget_VERSION_MAJOR}
81
VERSION ${qtermwidget_VERSION}
85
target_link_libraries ( qtermwidget ${QT_LIBRARIES} )