kde-extraapps/okular/generators/poppler/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

52 lines
1.1 KiB
CMake

add_subdirectory( conf )
include_directories(
${CMAKE_BINARY_DIR}/okular
${CMAKE_CURRENT_SOURCE_DIR}/../..
${POPPLER_QT4_INCLUDE_DIR}
)
########### next target ###############
# for syntex, properties already set in the parent directory
find_package(ZLIB REQUIRED)
include_directories(
synctex
${ZLIB_INCLUDE_DIR}
)
set(okularGenerator_poppler_PART_SRCS
generator_pdf.cpp
formfields.cpp
annots.cpp
synctex/synctex_parser.c
synctex/synctex_parser_utils.c
)
kde4_add_kcfg_files(okularGenerator_poppler_PART_SRCS conf/pdfsettings.kcfgc )
kde4_add_plugin(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
target_link_libraries(okularGenerator_poppler
${KDE4_KDEUI_LIBS}
${QT_QTXML_LIBRARY}
${ZLIB_LIBRARIES}
${POPPLER_QT4_LIBRARIES}
okularcore
)
install(TARGETS okularGenerator_poppler DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
########### install files ###############
install(
FILES libokularGenerator_poppler.desktop okularPoppler.desktop
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
)
install(
PROGRAMS okularApplication_pdf.desktop
DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR}
)