RazorAutostartEntry => LxQt::AutostartEntry
[lxde/liblxqt.git] / CMakeLists.txt
CommitLineData
0eff6363
HJYP
1cmake_minimum_required( VERSION 2.6 )
2
af223b3d 3project(liblxqt)
0eff6363 4
af223b3d
AS
5set(LXQT_MAJOR_VERSION 0)
6set(LXQT_MINOR_VERSION 5)
7set(LXQT_PATCH_VERSION 0)
0eff6363 8
0eff6363 9
af223b3d 10set(PUB_HDRS
7ffe2055 11 aboutdialog/lxqtaboutdialog.h
4ef6cee9 12 razorsettings.h
4ef6cee9 13 xfitman.h
14 razorplugininfo.h
15 powermanager.h
16 addplugindialog/addplugindialog.h
17 screensaver.h
077c1e76 18 lxqtapplication.h
4ef6cee9 19 libtranslate.h
49e9d4f2 20 programfinder.h
ad7ee7e8
AS
21
22 configdialog/configdialog.h
23 configdialog/pageselectwidget.h
24
8e6db58a 25 lxqtpower/lxqtpower.h
f2cde75a 26 razornotification.h
739b8f7f 27 lxqtautostartentry.h
f6abd4cf 28 translatorsinfo/translatorsinfo.h
ca1b12f4 29 razorgridlayout.h
4182f457 30 rotatedwidget.h
4ef6cee9 31)
32
af223b3d 33set(PUB_LINKS
7ffe2055
AS
34
35 aboutdialog/LxQtAboutDialog
af223b3d
AS
36)
37
38set(PRIV_HDRS
7ffe2055 39 aboutdialog/lxqtaboutdialog_p.h
1641df6e
AS
40 aboutdialog/technicalinfo.h
41)
42
af223b3d 43set(SRCS
7ffe2055 44 aboutdialog/lxqtaboutdialog.cpp
1641df6e 45 aboutdialog/technicalinfo.cpp
4ef6cee9 46 xfitman.cpp
47 razorplugininfo.cpp
48 powermanager.cpp
49 addplugindialog/addplugindialog.cpp
50 razorsettings.cpp
51 screensaver.cpp
077c1e76 52 lxqtapplication.cpp
49e9d4f2 53 programfinder.cpp
ad7ee7e8
AS
54
55 configdialog/configdialog.cpp
56 configdialog/pageselectwidget.cpp
57
8e6db58a
AS
58 lxqtpower/lxqtpower.cpp
59 lxqtpower/lxqtpowerproviders.cpp
f2cde75a 60 razornotification.cpp
739b8f7f 61 lxqtautostartentry.cpp
f6abd4cf 62 translatorsinfo/translatorsinfo.cpp
ca1b12f4 63 razorgridlayout.cpp
4182f457 64 rotatedwidget.cpp
4ef6cee9 65)
66
af223b3d 67set(MOCS
7ffe2055
AS
68 aboutdialog/lxqtaboutdialog.h
69 aboutdialog/lxqtaboutdialog_p.h
4ef6cee9 70 powermanager.h
71 addplugindialog/addplugindialog.h
72 razorsettings.h
73 screensaver.h
077c1e76 74 lxqtapplication.h
ad7ee7e8
AS
75
76 configdialog/configdialog.h
77 configdialog/pageselectwidget.h
78
f2cde75a
AM
79 razornotification.h
80 razornotification_p.h
8e6db58a
AS
81 lxqtpower/lxqtpower.h
82 lxqtpower/lxqtpowerproviders.h
ca1b12f4 83 razorgridlayout.h
4182f457 84 rotatedwidget.h
4ef6cee9 85)
86
af223b3d 87set(FORMS
7ffe2055 88 aboutdialog/lxqtaboutdialog.ui
ad7ee7e8
AS
89
90 configdialog/configdialog.ui
91
af223b3d
AS
92 addplugindialog/addplugindialog.ui
93)
94
95
8e6db58a 96find_package(Qt4 REQUIRED QUIET)
af223b3d
AS
97include(${QT_USE_FILE})
98
99QT4_ADD_DBUS_INTERFACE(SRCS
0eff6363 100 dbus/org.freedesktop.Notifications.xml
f2cde75a
AM
101 notifications_interface
102)
103
8e6db58a 104find_package(X11 REQUIRED QUIET)
af223b3d 105
8e6db58a 106find_package(QTXDG REQUIRED QUIET)
af223b3d
AS
107include(${QTXDG_USE_FILE})
108
109
110include_directories (
111 ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
112 ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}
113 ${X11_INCLUDE_DIR}
114 ${CMAKE_SOURCE_DIR}/libraries
d7e822b0
AS
115)
116
af223b3d 117set(LXQT_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSION})
f88aabc1 118
af223b3d
AS
119message(STATUS "")
120message(STATUS "liblxqt version: ${LXQT_VERSION}")
121message(STATUS "")
122
123
124#************************************************
125# Build config.cmake files
126#************************************************
127set(LXQT_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/lxqt/)
128include(cmake/FindInstallConfigPath.cmake)
129
130set(LXQT_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include/lxqt)
131
132configure_file(
133 ${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqt-config.cmake.in
134 ${CMAKE_CURRENT_BINARY_DIR}/lxqt-config.cmake
135 @ONLY
136)
137#************************************************
138# End of build config.cmake
139#************************************************
140include_directories(${LXQT_INCLUDE_DIR})
141
142set(APP_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/liblxqrt)
73d5cdb0 143add_definitions(-DTRANSLATIONS_DIR=\"${APP_SHARE_DIR}\")
f88aabc1 144
4ef6cee9 145# Translations **********************************
af223b3d
AS
146include(cmake/lxqt_use.cmake)
147razor_translate_ts(QM_FILES
d7e822b0 148 SOURCES
af223b3d
AS
149 ${PUB_HDRS}
150 ${PRIV_HDRS}
151 ${SRCS}
152 ${MOCS}
153 ${FORMS}
d7e822b0
AS
154 INSTALLATION_DIR
155 ${APP_SHARE_DIR}
4ef6cee9 156)
d7e822b0 157
4ef6cee9 158#************************************************
159
af223b3d
AS
160
161QT4_WRAP_CPP(MOCS ${MOCS})
162QT4_WRAP_UI(UIS ${FORMS})
4ef6cee9 163
f6abd4cf
AS
164include(translatorsinfo/CMakeLists.txt)
165get_translatorsinfo_qrc(translatorsinfo_qrc)
166qt4_add_resources(QRC_CXX_SOURCES ${translatorsinfo_qrc})
167
af223b3d
AS
168add_library(lxqt
169 SHARED ${PUB_HDRS}
170 ${PRIV_HDRS}
171 ${SRCS}
172 ${dbus_generated}
173 ${UIS} ${MOCS}
174 ${QM_FILES}
175 ${QRC_CXX_SOURCES})
176
177target_link_libraries(lxqt
178 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}
179 ${QT_QTDBUS_LIBRARY}
180 ${X11_X11_LIB}
181 qtxdg
182)
4ef6cee9 183
af223b3d
AS
184set_target_properties(lxqt PROPERTIES
185 VERSION ${LXQT_VERSION}
186 SOVERSION ${LXQT_MAJOR_VERSION}
4ef6cee9 187)
188
af223b3d
AS
189install(TARGETS lxqt DESTINATION lib${LIB_SUFFIX})
190install(FILES ${PUB_HDRS} DESTINATION ${LXQT_INCLUDE_DIR})
191install(FILES ${PUB_LINKS} DESTINATION ${LXQT_INCLUDE_DIR})
192
193install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lxqt-config.cmake DESTINATION share/cmake/lxqt)
194install(FILES cmake/lxqt_use.cmake DESTINATION share/cmake/lxqt)
4ef6cee9 195
af223b3d
AS
196include(cmake/create_pkgconfig_file.cmake)
197create_pkgconfig_file(lxqt "Shared library for LXQt applications")