mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 10:52:53 +00:00

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>
74 lines
2.3 KiB
CMake
74 lines
2.3 KiB
CMake
PROJECT(libksane)
|
|
|
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
|
find_package(KDE4 4.19.0 REQUIRED)
|
|
include(KDE4Defaults)
|
|
include_directories(${KDE4_INCLUDES})
|
|
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
|
endif()
|
|
|
|
# Check if sane API is available.
|
|
find_package(Sane)
|
|
set_package_properties(Sane PROPERTIES
|
|
DESCRIPTION "Scanner Access Now Easy (SANE) development package"
|
|
URL "http://www.sane-project.org"
|
|
PURPOSE "Needed by libksane"
|
|
TYPE REQUIRED
|
|
)
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
${CMAKE_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMAKE_CURRENT_BINARY_DIR}/libksane
|
|
)
|
|
|
|
# =======================================================
|
|
# Information to update before to release this library.
|
|
|
|
# Library version history:
|
|
# API ABI
|
|
# 0.1.0 => 0.1.0
|
|
# 0.1.1 => 0.1.1
|
|
# 0.2.0 => 0.2.0
|
|
|
|
# Library API version
|
|
SET(KSANE_LIB_MAJOR_VERSION "0")
|
|
SET(KSANE_LIB_MINOR_VERSION "3")
|
|
SET(KSANE_LIB_PATCH_VERSION "0")
|
|
|
|
# Suffix to add at end of version string. Usual values are:
|
|
# "-git" : alpha code unstable from git. Do not use in production
|
|
# "-beta1" : beta1 release.
|
|
# "-beta2" : beta2 release.
|
|
# "-beta3" : beta3 release.
|
|
# "-rc" : release candidate.
|
|
# "" : final relase. Can be used in production.
|
|
SET(KSANE_LIB_SUFFIX_VERSION "")
|
|
|
|
# Library ABI version used by linker.
|
|
# For details : http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
|
|
SET(KSANE_LIB_SO_CUR_VERSION "0")
|
|
SET(KSANE_LIB_SO_REV_VERSION "2")
|
|
SET(KSANE_LIB_SO_AGE_VERSION "0")
|
|
|
|
# =======================================================
|
|
# Set env. variables accordinly.
|
|
|
|
SET(KSANE_LIB_VERSION_STRING "${KSANE_LIB_MAJOR_VERSION}.${KSANE_LIB_MINOR_VERSION}.${KSANE_LIB_PATCH_VERSION}${KSANE_LIB_SUFFIX_VERSION}")
|
|
SET(KSANE_LIB_VERSION_ID "0x0${KSANE_LIB_MAJOR_VERSION}0${KSANE_LIB_MINOR_VERSION}0${KSANE_LIB_PATCH_VERSION}")
|
|
|
|
SET(KSANE_LIB_SO_VERSION_STRING "${KSANE_LIB_SO_CUR_VERSION}.${KSANE_LIB_SO_REV_VERSION}.${KSANE_LIB_SO_AGE_VERSION}")
|
|
|
|
# =======================================================
|
|
|
|
ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=51004)
|
|
|
|
CONFIGURE_FILE(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libksane/version.h.cmake.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/libksane/version.h
|
|
)
|
|
|
|
# =======================================================
|
|
|
|
ADD_SUBDIRECTORY(libksane)
|
|
ADD_SUBDIRECTORY(ksaneplugin)
|