kde-extraapps/ark/app/CMakeLists.txt
Ivailo Monev ca6ec59cc7 generic: replace macro_log_feature() with set_package_properties() calls
other changes such as syncing properties, updating some of the URLs,
adding missing feature information, removing of redundant checks and
variables and indentation were done in the process while testing if the
changes work as intended.

replacing find_package() with macro_optional_find_package() was also done
where applicable however it's usage is questionable due to the CMake
`CMAKE_DISABLE_FIND_PACKAGE_<PACKAGE>` option.

there is a lot to be done, mostly updating package properties so I am
thinking of either providing a package properties file (like the
MacroLibrary) which sets properties for packages globablly or setting
package properties from the CMake modules shipped with kdelibs. the first
solution may override properties for packages if other projects define them
however a check to ensure that is not done should suffice. the second
solution will cover only DESCRIPTION and URL meaning PURPOSE and TYPE will
still have to be specified in the build systems.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-21 05:37:28 +02:00

86 lines
1.9 KiB
CMake

add_subdirectory(icons)
set(ark_SRCS
batchextract.cpp
main.cpp
mainwindow.cpp
)
add_executable(ark ${ark_SRCS})
target_link_libraries(ark
${KDE4_KFILE_LIBS}
${KDE4_KPARTS_LIBS}
kerfuffle
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark.desktop
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark_dndextract.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ark_servicemenu.desktop.cmake
${CMAKE_CURRENT_BINARY_DIR}/ark_servicemenu.desktop
)
install(TARGETS ark ${INSTALL_TARGETS_DEFAULT_ARGS})
install(
FILES ark_addtoservicemenu.desktop ${CMAKE_CURRENT_BINARY_DIR}/ark_servicemenu.desktop
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ServiceMenus
)
install(
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ark.desktop
DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR}
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/ark.appdata.xml
DESTINATION share/appdata
)
install(
FILES arkui.rc
DESTINATION ${KDE4_DATA_INSTALL_DIR}/ark
)
########### konqueror ark_extract_here plugin ###############
macro_optional_find_package(LibKonq)
set_package_properties(LibKonq PROPERTIES
DESCRIPTION "libkonq library"
PURPOSE "Need to integrate in konqueror"
)
if (LibKonq_FOUND)
include_directories(${LIBKONQ_INCLUDE_DIR})
set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
kde4_add_plugin(extracthere WITH_PREFIX ${extracthere_SRCS})
target_link_libraries(extracthere
kerfuffle
${KDE4_KDECORE_LIBS}
${KDE4_KPARTS_LIBS}
${KDE4_KFILE_LIBS}
${LIBKONQ_LIBRARY}
)
install(
TARGETS extracthere
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
)
endif()