generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-09-03 22:21:32 +00:00
parent a40952a3bc
commit 078b3431a5
4 changed files with 66 additions and 55 deletions

View file

@ -256,6 +256,8 @@ add_subdirectory( kdewebkit )
add_subdirectory( includes )
add_subdirectory( libkdcraw )
add_subdirectory( libkexiv2 )
add_subdirectory( libkcddb )
add_subdirectory( libkcompactdisc )
add_subdirectory( experimental )
################# write dependency file which will be installed #################

View file

@ -1,32 +1,32 @@
project(kdeui)
include_directories(
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/interfaces/kregexpeditor
${CMAKE_SOURCE_DIR}/kdecore/sonnet
${CMAKE_SOURCE_DIR}/kdeui
${KDE4_KDECORE_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/actions
${CMAKE_CURRENT_SOURCE_DIR}/colors
${CMAKE_CURRENT_SOURCE_DIR}/config
${CMAKE_CURRENT_SOURCE_DIR}/dialogs
${CMAKE_CURRENT_SOURCE_DIR}/findreplace
${CMAKE_CURRENT_SOURCE_DIR}/fonts
${CMAKE_CURRENT_SOURCE_DIR}/icons
${CMAKE_CURRENT_SOURCE_DIR}/itemviews
${CMAKE_CURRENT_SOURCE_DIR}/jobs
${CMAKE_CURRENT_SOURCE_DIR}/kernel
${CMAKE_CURRENT_SOURCE_DIR}/notifications
${CMAKE_CURRENT_SOURCE_DIR}/paged
${CMAKE_CURRENT_SOURCE_DIR}/plotting
${CMAKE_CURRENT_SOURCE_DIR}/shortcuts
${CMAKE_CURRENT_SOURCE_DIR}/sonnet
${CMAKE_CURRENT_SOURCE_DIR}/util
${CMAKE_CURRENT_SOURCE_DIR}/widgets
${CMAKE_CURRENT_SOURCE_DIR}/windowmanagement
${CMAKE_CURRENT_SOURCE_DIR}/xmlgui
${CMAKE_CURRENT_BINARY_DIR}/util
${DBUSMENUQT_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/interfaces/kregexpeditor
${CMAKE_SOURCE_DIR}/kdecore/sonnet
${CMAKE_SOURCE_DIR}/kdeui
${KDE4_KDECORE_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/actions
${CMAKE_CURRENT_SOURCE_DIR}/colors
${CMAKE_CURRENT_SOURCE_DIR}/config
${CMAKE_CURRENT_SOURCE_DIR}/dialogs
${CMAKE_CURRENT_SOURCE_DIR}/findreplace
${CMAKE_CURRENT_SOURCE_DIR}/fonts
${CMAKE_CURRENT_SOURCE_DIR}/icons
${CMAKE_CURRENT_SOURCE_DIR}/itemviews
${CMAKE_CURRENT_SOURCE_DIR}/jobs
${CMAKE_CURRENT_SOURCE_DIR}/kernel
${CMAKE_CURRENT_SOURCE_DIR}/notifications
${CMAKE_CURRENT_SOURCE_DIR}/paged
${CMAKE_CURRENT_SOURCE_DIR}/plotting
${CMAKE_CURRENT_SOURCE_DIR}/shortcuts
${CMAKE_CURRENT_SOURCE_DIR}/sonnet
${CMAKE_CURRENT_SOURCE_DIR}/util
${CMAKE_CURRENT_SOURCE_DIR}/widgets
${CMAKE_CURRENT_SOURCE_DIR}/windowmanagement
${CMAKE_CURRENT_SOURCE_DIR}/xmlgui
${CMAKE_CURRENT_BINARY_DIR}/util
${DBUSMENUQT_INCLUDE_DIR}
)
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/widgets )

View file

@ -39,21 +39,22 @@ set(kfile_LIB_SRCS
add_library(kfile ${LIBRARY_TYPE} ${kfile_LIB_SRCS})
target_link_libraries(kfile PRIVATE
${KDE4_KIO_LIBS}
${ZLIB_LIBRARY}
${KDE4_SOLID_LIBS}
${X11_LIBRARIES}
${KDE4_KIO_LIBS}
${ZLIB_LIBRARY}
${KDE4_SOLID_LIBS}
${X11_LIBRARIES}
)
if(X11_Xrender_FOUND)
target_link_libraries(kfile PRIVATE ${X11_Xrender_LIB} )
target_link_libraries(kfile PRIVATE ${X11_Xrender_LIB})
endif(X11_Xrender_FOUND)
target_link_libraries(kfile PUBLIC kio kdeui kdecore ${QT_QTGUI_LIBRARY} )
target_link_libraries(kfile PUBLIC kio kdeui kdecore ${QT_QTGUI_LIBRARY})
set_target_properties(kfile PROPERTIES VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
set_target_properties(kfile PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
install(TARGETS kfile EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
@ -76,9 +77,8 @@ install( FILES
)
############ module used by KFileDialog ##########
set(kfilemodule_SRCS
kfilemodule.cpp
)
set(kfilemodule_SRCS kfilemodule.cpp)
kde4_add_plugin(kfilemodule ${kfilemodule_SRCS})

View file

@ -1,30 +1,39 @@
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
MACRO(KFILE_UNIT_TESTS)
FOREACH(_testname ${ARGN})
kde4_add_unit_test(${_testname} TESTNAME kfile-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY})
ENDFOREACH(_testname)
FOREACH(_testname ${ARGN})
kde4_add_test(kfile-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname}
${KDE4_KFILE_LIBS}
${KDE4_KIO_LIBS}
${QT_QTTEST_LIBRARY}
${QT_QTXML_LIBRARY}
)
ENDFOREACH(_testname)
ENDMACRO(KFILE_UNIT_TESTS)
MACRO(KFILE_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN})
kde4_add_executable(${_testname} TEST ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KFILE_LIBS} ${QT_QTTEST_LIBRARY})
ENDFOREACH(_testname)
FOREACH(_testname ${ARGN})
add_executable(${_testname} ${_testname}.cpp)
target_link_libraries(${_testname}
${KDE4_KFILE_LIBS}
${QT_QTTEST_LIBRARY}
)
ENDFOREACH(_testname)
ENDMACRO(KFILE_EXECUTABLE_TESTS)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
KFILE_EXECUTABLE_TESTS(
kdirselectdialogtest
kfiletreeviewtest
kdirselectdialogtest
kfiletreeviewtest
)
add_definitions(-DTEST_DATA="\\"${CMAKE_SOURCE_DIR}/solid/solid/backends/fakehw/fakecomputer.xml\\"")
add_definitions(
-DTEST_DATA="\\"${CMAKE_SOURCE_DIR}/solid/solid/backends/fakehw/fakecomputer.xml\\""
)
KFILE_UNIT_TESTS(
kfileplacesmodeltest
kurlnavigatortest
kdiroperatortest
knewfilemenutest
kfileplacesmodeltest
kurlnavigatortest
kdiroperatortest
knewfilemenutest
)