parent
df8cb58095
commit
6b2ab74c0b
@ -0,0 +1,80 @@
|
|||||||
|
############################################
|
||||||
|
# #
|
||||||
|
# Improvements and feedbacks are welcome #
|
||||||
|
# #
|
||||||
|
# This file is released under GPL >= 3 #
|
||||||
|
# #
|
||||||
|
############################################
|
||||||
|
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 2.8 )
|
||||||
|
|
||||||
|
|
||||||
|
#### general package setup
|
||||||
|
|
||||||
|
project( kbibtex )
|
||||||
|
set( VERSION R14.1.0 )
|
||||||
|
|
||||||
|
|
||||||
|
#### include essential cmake modules
|
||||||
|
|
||||||
|
include( FindPkgConfig )
|
||||||
|
include( CheckFunctionExists )
|
||||||
|
include( CheckSymbolExists )
|
||||||
|
include( CheckIncludeFile )
|
||||||
|
include( CheckLibraryExists )
|
||||||
|
include( CheckCSourceCompiles )
|
||||||
|
include( CheckCXXSourceCompiles )
|
||||||
|
|
||||||
|
|
||||||
|
#### include our cmake modules
|
||||||
|
|
||||||
|
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
|
||||||
|
include( TDEMacros )
|
||||||
|
|
||||||
|
|
||||||
|
##### setup install paths
|
||||||
|
|
||||||
|
include( TDESetupPaths )
|
||||||
|
tde_setup_paths( )
|
||||||
|
|
||||||
|
|
||||||
|
##### optional stuff
|
||||||
|
|
||||||
|
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
||||||
|
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
|
||||||
|
|
||||||
|
|
||||||
|
##### user requested modules
|
||||||
|
|
||||||
|
option( BUILD_ALL "Build all" ON )
|
||||||
|
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
||||||
|
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
|
||||||
|
|
||||||
|
|
||||||
|
##### configure checks
|
||||||
|
|
||||||
|
include( ConfigureChecks.cmake )
|
||||||
|
|
||||||
|
|
||||||
|
###### global compiler settings
|
||||||
|
|
||||||
|
add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
|
||||||
|
|
||||||
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
||||||
|
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||||
|
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||||
|
|
||||||
|
|
||||||
|
##### directories
|
||||||
|
|
||||||
|
add_subdirectory( src )
|
||||||
|
add_subdirectory( xslt )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_DOC doc )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_DOC man )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
|
||||||
|
|
||||||
|
|
||||||
|
##### write configure files
|
||||||
|
|
||||||
|
configure_file( config.h.cmake config.h @ONLY )
|
@ -0,0 +1,51 @@
|
|||||||
|
###########################################
|
||||||
|
# #
|
||||||
|
# Improvements and feedback are welcome #
|
||||||
|
# #
|
||||||
|
# This file is released under GPL >= 3 #
|
||||||
|
# #
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# required stuff
|
||||||
|
find_package( TQt )
|
||||||
|
find_package( TDE )
|
||||||
|
|
||||||
|
tde_setup_architecture_flags( )
|
||||||
|
|
||||||
|
include(TestBigEndian)
|
||||||
|
test_big_endian(WORDS_BIGENDIAN)
|
||||||
|
|
||||||
|
tde_setup_largefiles( )
|
||||||
|
|
||||||
|
|
||||||
|
##### check for gcc visibility support
|
||||||
|
|
||||||
|
if( WITH_GCC_VISIBILITY )
|
||||||
|
tde_setup_gcc_visibility( )
|
||||||
|
endif( WITH_GCC_VISIBILITY )
|
||||||
|
|
||||||
|
|
||||||
|
##### check for libxml-2.0
|
||||||
|
|
||||||
|
find_package( LibXml2 )
|
||||||
|
if( NOT LIBXML2_FOUND )
|
||||||
|
tde_message_fatal( "libxml-2.0 is required, but was not found on your system" )
|
||||||
|
endif( NOT LIBXML2_FOUND )
|
||||||
|
|
||||||
|
|
||||||
|
##### check for libxslt
|
||||||
|
|
||||||
|
find_package( LibXslt )
|
||||||
|
if( NOT LIBXSLT_FOUND )
|
||||||
|
tde_message_fatal( "libxslt is required, but was not found on your system" )
|
||||||
|
endif( NOT LIBXSLT_FOUND )
|
||||||
|
|
||||||
|
|
||||||
|
##### check for libyaz
|
||||||
|
|
||||||
|
pkg_search_module( LIBYAZ libyaz yaz )
|
||||||
|
if( LIBYAZ_FOUND )
|
||||||
|
set( HAVE_YAZ 1 )
|
||||||
|
else()
|
||||||
|
tde_message_fatal( "libyaz is required, but was not found on your system" )
|
||||||
|
endif( )
|
@ -0,0 +1,11 @@
|
|||||||
|
#define VERSION "@VERSION@"
|
||||||
|
|
||||||
|
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
|
||||||
|
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||||
|
|
||||||
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
|
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
||||||
|
|
||||||
|
// Defined if you have libyaz
|
||||||
|
#cmakedefine HAVE_YAZ 1
|
@ -0,0 +1 @@
|
|||||||
|
add_subdirectory( en )
|
@ -0,0 +1 @@
|
|||||||
|
tde_create_handbook( DESTINATION ${PROJECT_NAME} )
|
@ -0,0 +1,5 @@
|
|||||||
|
INSTALL(
|
||||||
|
FILES ${PROJECT_NAME}.1
|
||||||
|
DESTINATION ${MAN_INSTALL_DIR}/man1
|
||||||
|
COMPONENT doc
|
||||||
|
)
|
@ -0,0 +1,5 @@
|
|||||||
|
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
|
||||||
|
|
||||||
|
if( _srcs )
|
||||||
|
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
|
||||||
|
endif( )
|
@ -0,0 +1,128 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${TDE_INCLUDE_DIR}
|
||||||
|
${TQT_INCLUDE_DIRS}
|
||||||
|
${LIBXML2_INCLUDE_DIR}
|
||||||
|
${LIBXSLT_INCLUDE_DIR}
|
||||||
|
${LIBYAZ_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
link_directories(
|
||||||
|
${TQT_LIBRARY_DIRS}
|
||||||
|
${TDE_LIB_DIR}
|
||||||
|
${LIBXML2_LIB_DIR}
|
||||||
|
${LIBXSLT_LIB_DIR}
|
||||||
|
${LIBYAZ_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### kbibtex (executable)
|
||||||
|
|
||||||
|
tde_add_executable( ${PROJECT_NAME} AUTOMOC
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
kbibtexshell.cpp
|
||||||
|
main.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeio-shared
|
||||||
|
tdeui-shared
|
||||||
|
tdeparts-shared
|
||||||
|
|
||||||
|
DESTINATION ${BIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### libkbibtexpart (kpart)
|
||||||
|
|
||||||
|
tde_add_kpart( libkbibtexpart AUTOMOC
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
comment.cpp fileexporterdocbook5.cpp
|
||||||
|
commentwidget.cpp documentlistview.cpp
|
||||||
|
documentlistviewitem.cpp documentsourceview.cpp
|
||||||
|
documentwidget.cpp element.cpp
|
||||||
|
encoder.cpp encoderlatex.cpp
|
||||||
|
encoderxml.cpp entry.cpp
|
||||||
|
entryfield.cpp entrywidget.cpp
|
||||||
|
entrywidgetauthor.cpp entrywidgetexternal.cpp
|
||||||
|
entrywidgetkeyword.cpp entrywidgetmisc.cpp
|
||||||
|
entrywidgetother.cpp entrywidgetpublication.cpp
|
||||||
|
entrywidgetsource.cpp entrywidgettab.cpp
|
||||||
|
entrywidgettitle.cpp entrywidgetuserdefined.cpp
|
||||||
|
entrywidgetwarningsitem.cpp z3950connection.cpp
|
||||||
|
fieldlineedit.cpp fieldlistview.cpp
|
||||||
|
file.cpp fileexporter.cpp
|
||||||
|
fileexporterbibtex.cpp fileexporterris.cpp
|
||||||
|
fileexporterbibutils.cpp fileexporterexternal.cpp
|
||||||
|
fileexporterpdf.cpp fileexporterps.cpp
|
||||||
|
fileexporterrtf.cpp fileexportertoolchain.cpp
|
||||||
|
fileexporterxml.cpp fileexporterxslt.cpp
|
||||||
|
fileimporter.cpp fileimporterbibtex.cpp
|
||||||
|
fileimporterbibutils.cpp fileimporterexternal.cpp
|
||||||
|
fileimporterris.cpp idsuggestions.cpp
|
||||||
|
idsuggestionswidget.cpp kbibtex_part.cpp
|
||||||
|
macrowidget.cpp macro.cpp
|
||||||
|
mergeelements.cpp preamble.cpp
|
||||||
|
webqueryieeexplore.cpp preamblewidget.cpp
|
||||||
|
searchbar.cpp settings.cpp
|
||||||
|
settingsdlg.cpp settingsediting.cpp
|
||||||
|
settingsfileio.cpp settingsidsuggestions.cpp
|
||||||
|
settingskeyword.cpp settingssearchurl.cpp
|
||||||
|
settingsuserdefinedinput.cpp sidebar.cpp value.cpp
|
||||||
|
valuewidget.cpp webquery.cpp
|
||||||
|
webqueryamatex.cpp webqueryarxiv.cpp
|
||||||
|
webqueryciteseerx.cpp webquerybibsonomy.cpp
|
||||||
|
webquerycsb.cpp webquerycitebase.cpp
|
||||||
|
webquerydblp.cpp webqueryz3950.cpp
|
||||||
|
webquerygooglescholar.cpp webquerypubmed.cpp
|
||||||
|
webqueryspireshep.cpp webqueryzmath.cpp
|
||||||
|
xsltransform.cpp webquerysciencedirect.cpp
|
||||||
|
findduplicates.cpp settingsz3950.cpp
|
||||||
|
messagehandler.cpp iso6937converter.cpp
|
||||||
|
iso5426converter.cpp webquerymathscinet.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeio-shared
|
||||||
|
tdeui-shared
|
||||||
|
tdeparts-shared
|
||||||
|
tdeutils-shared
|
||||||
|
katepartinterfaces-shared
|
||||||
|
tdetexteditor
|
||||||
|
${LIBXML2_LIBRARIES}
|
||||||
|
${LIBXSLT_LIBRARIES}
|
||||||
|
${LIBXSLT_EXSLT_LIBRARIES}
|
||||||
|
${LIBYAZ_LIBRARIES}
|
||||||
|
|
||||||
|
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons( )
|
||||||
|
|
||||||
|
|
||||||
|
##### other data
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES z3950-servers.cfg kbibtex_shell.rc
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES kbibtex_part.desktop
|
||||||
|
DESTINATION ${SERVICES_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${PROJECT_NAME}.desktop
|
||||||
|
DESTINATION ${XDG_APPS_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES kbibtex_part.rc
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/kbibtexpart
|
||||||
|
)
|
@ -0,0 +1,6 @@
|
|||||||
|
file( GLOB _xsls RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.xsl )
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${_xsls}
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/kbibtexpart/xslt
|
||||||
|
)
|
Loading…
Reference in new issue