8 changed files with 278 additions and 0 deletions
@ -0,0 +1,76 @@
|
||||
############################################ |
||||
# # |
||||
# Improvements and feedbacks are welcome # |
||||
# # |
||||
# This file is released under GPL >= 3 # |
||||
# # |
||||
############################################ |
||||
|
||||
|
||||
cmake_minimum_required( VERSION 2.8 ) |
||||
|
||||
|
||||
#### general package setup |
||||
|
||||
project( libkipi ) |
||||
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_TRANSLATIONS "Build translations" ${BUILD_ALL} ) |
||||
|
||||
|
||||
##### configure checks |
||||
|
||||
include( ConfigureChecks.cmake ) |
||||
|
||||
|
||||
###### global compiler settings |
||||
|
||||
add_definitions( -DHAVE_CONFIG_H ) |
||||
|
||||
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( ${PROJECT_NAME} ) |
||||
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) |
||||
|
||||
|
||||
##### write configure files |
||||
|
||||
configure_file( config.h.cmake config.h @ONLY ) |
@ -0,0 +1,33 @@
|
||||
########################################### |
||||
# # |
||||
# 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 <kdemacros.h> header |
||||
|
||||
tde_save( CMAKE_REQUIRED_INCLUDES ) |
||||
list( APPEND CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" ) |
||||
check_include_file( "kdemacros.h" KDEMACROS_USABLE ) |
||||
tde_restore( CMAKE_REQUIRED_INCLUDES ) |
@ -0,0 +1,8 @@
|
||||
#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@ |
@ -0,0 +1,15 @@
|
||||
add_subdirectory( ${PROJECT_NAME} ) |
||||
|
||||
|
||||
##### other data |
||||
|
||||
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} ) |
||||
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} ) |
||||
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} ) |
||||
|
||||
configure_file( libkipi.pc.cmake ${PROJECT_NAME}.pc @ONLY ) |
||||
|
||||
install( |
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc |
||||
DESTINATION ${PKGCONFIG_INSTALL_DIR} |
||||
) |
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@ |
||||
exec_prefix=@PC_EXEC_PREFIX@ |
||||
libdir=@PC_LIB_DIR@ |
||||
includedir=@PC_INCLUDE_DIR@ |
||||
|
||||
Name: @PROJECT_NAME@ |
||||
Description: TDE library for shared plugins between graphical applications |
||||
Requires: |
||||
Version: 0.1.5 |
||||
Libs: -L${libdir} -lkipi |
||||
Cflags: -I${includedir} |
@ -0,0 +1,91 @@
|
||||
include_directories( |
||||
${CMAKE_BINARY_DIR} |
||||
${CMAKE_CURRENT_BINARY_DIR} |
||||
${CMAKE_CURRENT_SOURCE_DIR} |
||||
${TDE_INCLUDE_DIR} |
||||
${TQT_INCLUDE_DIRS} |
||||
${CMAKE_SOURCE_DIR}/libkipi |
||||
${CMAKE_BINARY_DIR}/libkipi |
||||
) |
||||
|
||||
link_directories( |
||||
${TQT_LIBRARY_DIRS} |
||||
${TDE_LIB_DIR} |
||||
) |
||||
|
||||
|
||||
##### kipi (shared) |
||||
|
||||
tde_add_library( kipi SHARED AUTOMOC |
||||
|
||||
SOURCES |
||||
interface.cpp |
||||
plugin.cpp |
||||
pluginloader.cpp |
||||
KDStream.cpp |
||||
imageinfo.cpp |
||||
imagecollection.cpp |
||||
imageinfoshared.cpp |
||||
imagecollectionshared.cpp |
||||
imagedialog.cpp |
||||
uploadwidget.cpp |
||||
batchprogressdialog.cpp |
||||
imagecollectionselector.cpp |
||||
LINK |
||||
tdecore-shared |
||||
tdeio-shared |
||||
tdeui-shared |
||||
|
||||
VERSION 0.1.1 |
||||
|
||||
DESTINATION ${LIB_INSTALL_DIR} |
||||
) |
||||
|
||||
|
||||
##### headers |
||||
|
||||
configure_file( libkipi_export.h.cmake libkipi_export.h @ONLY ) |
||||
|
||||
install( |
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libkipi_export.h |
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME} |
||||
) |
||||
|
||||
install( |
||||
FILES |
||||
interface.h |
||||
plugin.h |
||||
pluginloader.h |
||||
imageinfo.h |
||||
imagecollection.h |
||||
imageinfoshared.h |
||||
imagecollectionshared.h |
||||
imagedialog.h |
||||
uploadwidget.h |
||||
batchprogressdialog.h |
||||
imagecollectionselector.h |
||||
version.h |
||||
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME} |
||||
) |
||||
|
||||
|
||||
##### icons |
||||
|
||||
tde_install_icons( kipi ) |
||||
|
||||
|
||||
##### other data |
||||
|
||||
install( |
||||
FILES |
||||
kipi-plugins_logo.png |
||||
banner_left.png |
||||
|
||||
DESTINATION ${DATA_INSTALL_DIR}/kipi/data |
||||
) |
||||
|
||||
install( |
||||
FILES kipiplugin.desktop |
||||
DESTINATION ${SERVICETYPES_INSTALL_DIR} |
||||
) |
@ -0,0 +1,37 @@
|
||||
/* |
||||
This file is part of libkipi project |
||||
Copyright (c) 2005 Laurent Montel <montel@kde.org> |
||||
|
||||
This library is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU Library General Public |
||||
License as published by the Free Software Foundation; either |
||||
version 2 of the License, or (at your option) any later version. |
||||
|
||||
This library is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
Library General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU Library General Public License |
||||
along with this library; see the file COPYING.LIB. If not, write to |
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, |
||||
Boston, MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
#ifndef _LIBKIPI_EXPORT_H |
||||
#define _LIBKIPI_EXPORT_H |
||||
|
||||
#cmakedefine KDEMACROS_USABLE @KDEMACROS_USABLE@ |
||||
|
||||
#ifdef KDEMACROS_USABLE |
||||
#include <kdemacros.h> |
||||
#endif |
||||
|
||||
#ifdef KDE_EXPORT |
||||
#define LIBKIPI_EXPORT KDE_EXPORT |
||||
#else |
||||
#define LIBKIPI_EXPORT |
||||
#endif |
||||
|
||||
#endif /* _LIBKIPI_EXPORT_H */ |
||||
|
@ -0,0 +1,7 @@
|
||||
file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}.po ) |
||||
|
||||
foreach( _po ${po_files} ) |
||||
string( REPLACE "/" ";" _path "${_po}" ) |
||||
list( GET _path 0 _lang ) |
||||
tde_create_translation( FILES ${_po} LANG ${_lang} ) |
||||
endforeach( ) |
Loading…
Reference in new issue