You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB
CMake

# Set sources
set(LAUNCHER ${CMAKE_HOME_DIRECTORY}/src/launcherlib)
set(COMMON "${CMAKE_HOME_DIRECTORY}/src/common")
set(SRC ut_daemon.cpp ${LAUNCHER}/appdata.cpp ${LAUNCHER}/booster.cpp ${LAUNCHER}/boosterfactory.cpp ${LAUNCHER}/boosterpluginregistry.cpp ${LAUNCHER}/daemon.cpp
${LAUNCHER}/connection.cpp ${LAUNCHER}/logger.cpp
${LAUNCHER}/singleinstance.cpp ${LAUNCHER}/socketmanager.cpp)
# Set moc headers
set(MOC_HDRS ut_daemon.h)
# Set the program name define used in daemon.cpp
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPROG_NAME_LAUNCHER=\\\"applauncherd\\\"")
# Run moc
qt4_wrap_cpp(MOC_SRC ${MOC_HDRS} )
# Enable test library
set(QT_USE_QTTEST TRUE)
# Set include paths
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/src/common ${LAUNCHER})
link_libraries(${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} ${X11_LIBRARIES} -ldl)
# Enable Qt (may not be needed, because already defined on higher level)
include(${QT_USE_FILE})
add_executable(ut_daemon ${SRC} ${MOC_SRC})
# Install
install(PROGRAMS ut_daemon DESTINATION /usr/share/applauncherd-tests/)