kdelibs/kinit/CMakeLists.txt

87 lines
2 KiB
Text
Raw Normal View History

2014-11-13 01:04:59 +02:00
project(kdeinit)
if(ENABLE_TESTING)
add_subdirectory(tests)
endif()
2014-11-13 01:04:59 +02:00
2015-09-27 01:19:30 +00:00
include_directories(${KDE4_KPARTS_INCLUDES})
2014-11-13 01:04:59 +02:00
########### Configuring (mainly for proctitle) ###########
include(CheckFunctionExists)
include(CheckVariableExists)
2014-11-13 01:04:59 +02:00
check_variable_exists(__progname HAVE___PROGNAME)
check_variable_exists(__progname_full HAVE___PROGNAME_FULL)
check_function_exists(setproctitle HAVE_SETPROCTITLE)
set(KINIT_SOCKET_LIBRARY)
2014-11-13 01:04:59 +02:00
if(HAVE_SOCKET_LIBRARY)
2015-09-27 01:19:30 +00:00
set(KINIT_SOCKET_LIBRARY socket)
endif()
2014-11-13 01:04:59 +02:00
if (NOT Q_WS_X11 AND NOT Q_WS_QWS)
add_definitions(-DNO_DISPLAY)
endif()
2014-11-13 01:04:59 +02:00
########### kdeinit4 ###############
2014-11-27 18:22:42 +00:00
set(kdeinit_SRCS
kinit.cpp
proctitle.cpp
klauncher_cmds.cpp
)
2014-11-13 01:04:59 +02:00
add_executable(kdeinit4 ${kdeinit_SRCS})
2014-11-13 01:04:59 +02:00
2015-09-27 01:19:30 +00:00
target_link_libraries(kdeinit4 ${KDE4_KDEUI_LIBS} ${KINIT_SOCKET_LIBRARY})
2014-11-13 01:04:59 +02:00
if (Q_WS_X11)
2015-09-27 01:19:30 +00:00
target_link_libraries(kdeinit4 ${X11_X11_LIB})
endif()
2014-11-13 01:04:59 +02:00
2015-09-27 01:19:30 +00:00
install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS})
2014-11-13 01:04:59 +02:00
########### kioslave ###############
add_executable(kioslave kioslave.cpp)
2014-11-13 01:04:59 +02:00
target_link_libraries(kioslave ${QT_QTCORE_LIBRARY})
2014-11-13 01:04:59 +02:00
install(TARGETS kioslave DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
2014-11-13 01:04:59 +02:00
########### klauncher ###############
set(klauncher_SRCS
2015-09-27 01:19:30 +00:00
klauncher.cpp
klauncher_main.cpp
klauncher_adaptor.cpp
autostart.cpp
klauncher_cmds.cpp
# just so that it gets generated
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml
)
2014-11-13 01:04:59 +02:00
# The adaptor is manually edited, generate the xml from it.
qt4_generate_dbus_interface(klauncher_adaptor.h org.kde.KLauncher.xml)
2015-09-27 01:19:30 +00:00
add_executable(klauncher ${klauncher_SRCS})
target_link_libraries(klauncher ${KDE4_KIO_LIBS} ${X11_LIBRARIES})
2014-11-13 01:04:59 +02:00
install(TARGETS klauncher DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
2014-11-13 01:04:59 +02:00
########### install files ###############
2015-09-27 01:19:30 +00:00
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
2015-09-27 01:19:30 +00:00
)
2014-11-13 01:04:59 +02:00
########### config-kdeinit.h ############
configure_file(
config-kdeinit.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-kdeinit.h
)