not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / kephal / libkephal / CMakeLists.txt
blob394f34ac97f5a43fd6a53ba67c52e9433c282fb4
1 INCLUDE_DIRECTORIES (. .. ${CMAKE_CURRENT_SOURCE_DIR}/../kephal/ ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
3 # register a factory method with Screens::self(), Outputs::self and Configurations::self()
4 ADD_DEFINITIONS (-DSCREENS_FACTORY=libkephal_factory)
5 ADD_DEFINITIONS (-DOUTPUTS_FACTORY=libkephal_factory)
6 ADD_DEFINITIONS (-DCONFIGURATIONS_FACTORY=libkephal_factory)
8 # dont build against kde, not needed for the lib
9 ADD_DEFINITIONS (-DNO_KDE)
11 SET (libkephal_SRCS
12         libkephal.cpp
13         ../kephal/screens.cpp
14         ../screens/simplescreen.cpp
15         ../screens/dbus/dbusscreens.cpp
16         ../screens/output/outputscreens.cpp
17         ../outputs/simpleoutput.cpp
18         ../outputs/dbus/dbusoutputs.cpp
19         ../outputs/desktopwidget/desktopwidgetoutputs.cpp
20         ../kephal/outputs.cpp
21         ../kephal/configurations.cpp
22         ../configurations/dbus/dbusconfigurations.cpp
23         ../configurations/noconfigurations.cpp)
24 QT4_WRAP_CPP (libkephal_SRCS
25         ../kephal/screens.h
26         ../screens/simplescreen.h
27         ../screens/dbus/dbusscreens.h
28         ../screens/output/outputscreens.h
29         ../outputs/simpleoutput.h
30         ../outputs/dbus/dbusoutputs.h
31         ../outputs/desktopwidget/desktopwidgetoutputs.h
32         ../kephal/outputs.h
33         ../kephal/configurations.h
34         ../configurations/dbus/dbusconfigurations.h
35         ../configurations/noconfigurations.h)
37 # generate dbus-interface from class and add the generated sources
38 QT4_GENERATE_DBUS_INTERFACE(../kded_kephal/dbus/dbusapi_screens.h org.kde.Kephal.Screens.xml)
39 QT4_ADD_DBUS_INTERFACE(libkephal_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Kephal.Screens.xml screens_interface)
40 QT4_GENERATE_DBUS_INTERFACE(../kded_kephal/dbus/dbusapi_outputs.h org.kde.Kephal.Outputs.xml)
41 QT4_ADD_DBUS_INTERFACE(libkephal_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Kephal.Outputs.xml outputs_interface)
42 QT4_GENERATE_DBUS_INTERFACE(../kded_kephal/dbus/dbusapi_configurations.h org.kde.Kephal.Configurations.xml)
43 QT4_ADD_DBUS_INTERFACE(libkephal_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Kephal.Configurations.xml configurations_interface)
45 ADD_LIBRARY (kephal SHARED ${libkephal_SRCS})
46 TARGET_LINK_LIBRARIES (kephal ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
47 set_target_properties(kephal PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
48         INSTALL_RPATH_USE_LINK_PATH true)
50 INSTALL (TARGETS kephal EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
51 INSTALL (FILES 
52         ../kephal/screens.h
53         ../kephal/outputs.h
54         ../kephal/kephal.h
55         ../kephal/configurations.h
56         ../kephal/kephal_export.h
57         DESTINATION ${INCLUDE_INSTALL_DIR}/kephal)
58 INSTALL (FILES FindKephal.cmake DESTINATION ${DATA_INSTALL_DIR}/cmake/modules)