kdelibs/kexiv2/libkexiv2/CMakeLists.txt
Ivailo Monev 4d6fb007e7 generic: fix most of the overlinking issues
TODO from https://github.com/fluxer/katana/issues/7. I've decided to
keep KDE4 and Katie libraries as PUBLIC, all other libraries as PRIVATE
for that and not use INTERFACE at all since that will not require a lot
of changes to all other sub-projects (kde-baseapps, kde-workspace and
kde-extraapps) build systems.

MusicBrainz5 CMake module was also rewritten as the actual library that
should be linked to is libmusicbrainz5cc, libmusicbrainz5 is the C
version of it.

common checks for X11 extensions where move to main config header,
eventually to be moved to separate config-x11 header.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-09 21:58:11 +00:00

100 lines
2.5 KiB
CMake

# ===========================================================
#
# This file is a part of digiKam project
# <a href="http://www.digikam.org">http://www.digikam.org</a>
#
# @date 2006-09-15
# @brief Exiv2 library interface for KDE
#
# @author Copyright (C) 2006-2014 by Gilles Caulier
# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation;
# either version 2, or (at your option)
# any later version.
#
# This program 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 General Public License for more details.
#
# ============================================================
include_directories(${EXIV2_INCLUDE_DIR})
add_definitions(${EXIV2_DEFINITIONS} ${KDE4_ENABLE_EXCEPTIONS})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/version.h
)
# This was used to enable catching of exceptions thrown by libexiv2.
# We use now #pragma GCC visibility push(default) around the headers
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
set(kexiv2_LIB_SRCS
kexiv2.cpp
kexiv2_p.cpp
kexiv2image.cpp
kexiv2comments.cpp
kexiv2exif.cpp
kexiv2iptc.cpp
kexiv2gps.cpp
kexiv2xmp.cpp
kexiv2previews.cpp
altlangstredit.cpp
msgtextedit.cpp
countryselector.cpp
subjectwidget.cpp
rotationmatrix.cpp
)
add_library(kexiv2 ${LIBRARY_TYPE} ${kexiv2_LIB_SRCS})
target_link_libraries(kexiv2 PRIVATE
${EXIV2_LIBRARIES}
)
target_link_libraries(kexiv2 PUBLIC
${KDE4_KDEUI_LIBS}
${KDE4_KDECORE_LIBS}
${QT_QTXML_LIBRARY}
)
set_target_properties(kexiv2 PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
install(
TARGETS kexiv2
EXPORT kdelibsLibraryTargets
${INSTALL_TARGETS_DEFAULT_ARGS}
)
install(
FILES
topicset.iptc-subjectcode.xml
DESTINATION ${DATA_INSTALL_DIR}/libkexiv2/data
)
generate_export_header(kexiv2)
install(
FILES
kexiv2.h
kexiv2data.h
kexiv2previews.h
msgtextedit.h
subjectwidget.h
altlangstredit.h
countryselector.h
rotationmatrix.h
${CMAKE_CURRENT_BINARY_DIR}/kexiv2_export.h
${CMAKE_CURRENT_BINARY_DIR}/version.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libkexiv2
COMPONENT Devel
)