mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
New QGS check (partially untested).
New CHM check. Activating okular anyway, and disable its poppler generator if poppler is not found. svn path=/branches/work/kde4/playground/graphics/cmake/; revision=523311
This commit is contained in:
parent
a2fade65ae
commit
8db887dfb1
36
cmake/modules/modules/FindCHM.cmake
Normal file
36
cmake/modules/modules/FindCHM.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
# - Try to find the chm library
|
||||
# Once done this will define
|
||||
#
|
||||
# CHM_FOUND - system has the chm library
|
||||
# CHM_INCLUDE_DIR - the chm include directory
|
||||
# CHM_LIBRARY - Link this to use the chm library
|
||||
#
|
||||
include(CheckLibraryExists)
|
||||
|
||||
# reset vars
|
||||
set(CHM_INCLUDE_DIR)
|
||||
set(CHM_LIBRARY)
|
||||
|
||||
FIND_PATH(CHM_INCLUDE_DIR chm_lib.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
${GNUWIN32_DIR}/include
|
||||
)
|
||||
|
||||
#check_library_exists(chm ??? "" CHM_LIBRARY)
|
||||
|
||||
if(CHM_INCLUDE_DIR)
|
||||
set(CHM_FOUND TRUE)
|
||||
endif(CHM_INCLUDE_DIR)
|
||||
|
||||
if (CHM_FOUND)
|
||||
if (NOT CHM_FIND_QUIETLY)
|
||||
message(STATUS "Found CHM: ${CHM_LIBRARY}")
|
||||
endif (NOT CHM_FIND_QUIETLY)
|
||||
else (CHM_FOUND)
|
||||
if (CHM_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find CHM")
|
||||
endif (CHM_FIND_REQUIRED)
|
||||
endif (CHM_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(CHM_INCLUDE_DIR CHM_LIBRARY)
|
36
cmake/modules/modules/FindQGS.cmake
Normal file
36
cmake/modules/modules/FindQGS.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
# - Try to find the qgs library
|
||||
# Once done this will define
|
||||
#
|
||||
# QGS_FOUND - system has qgs
|
||||
# QGS_INCLUDE_DIR - the qgs include directory
|
||||
# QGS_LIBRARY - Link this to use qgs
|
||||
#
|
||||
include(CheckLibraryExists)
|
||||
|
||||
# reset vars
|
||||
set(QGS_INCLUDE_DIR)
|
||||
set(QGS_LIBRARY)
|
||||
|
||||
FIND_PATH(QGS_INCLUDE_DIR qgs.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
${GNUWIN32_DIR}/include
|
||||
)
|
||||
|
||||
check_library_exists(qgs main "" QGS_LIBRARY)
|
||||
|
||||
if(QGS_INCLUDE_DIR AND QGS_LIBRARY)
|
||||
set(QGS_FOUND TRUE)
|
||||
endif(QGS_INCLUDE_DIR AND QGS_LIBRARY)
|
||||
|
||||
if (QGS_FOUND)
|
||||
if (NOT QGS_FIND_QUIETLY)
|
||||
message(STATUS "Found qgs: ${QGS_LIBRARY}")
|
||||
endif (NOT QGS_FIND_QUIETLY)
|
||||
else (QGS_FOUND)
|
||||
if (QGS_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find QGS")
|
||||
endif (QGS_FIND_REQUIRED)
|
||||
endif (QGS_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(QGS_INCLUDE_DIR QGS_LIBRARY)
|
|
@ -1,11 +1,19 @@
|
|||
kde4_header()
|
||||
|
||||
add_subdirectory( poppler )
|
||||
# let's enable the generators properly configured
|
||||
|
||||
if(POPPLER_FOUND)
|
||||
add_subdirectory(poppler)
|
||||
endif(POPPLER_FOUND)
|
||||
if(QGS_FOUND)
|
||||
add_subdirectory(ghostview)
|
||||
endif(QGS_FOUND)
|
||||
add_subdirectory( fax )
|
||||
add_subdirectory( kimgio )
|
||||
if(CHM_FOUND)
|
||||
add_subdirectory( chm )
|
||||
endif(CHM_FOUND)
|
||||
|
||||
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(GSPLUGINDIR)")
|
||||
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(CHMPLUGINDIR)")
|
||||
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
kde4_header()
|
||||
|
||||
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/okular )
|
||||
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/okular ${POPPLER_INCLUDE_DIR}/poppler )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
@ -13,7 +13,7 @@ kde4_add_plugin(okularGenerator_poppler WITH_PREFIX ${okularGenerator_poppler_PA
|
|||
|
||||
kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} okularGenerator_poppler )
|
||||
|
||||
target_link_libraries(okularGenerator_poppler ${KDE4_KDECORE_LIBS} oKular ${KDE4_KDEPRINT_LIBS} ${KDE4_KDEUI_LIBS} m )
|
||||
target_link_libraries(okularGenerator_poppler ${KDE4_KDECORE_LIBS} oKular ${POPPLER_LIBRARY} ${KDE4_KDEPRINT_LIBS} ${KDE4_KDEUI_LIBS} m )
|
||||
|
||||
install_targets(${LIB_INSTALL_DIR}/kde4 okularGenerator_poppler )
|
||||
|
||||
|
|
Loading…
Reference in a new issue