kdelibs/kdeclarative/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

65 lines
1.4 KiB
CMake

project(kdeclarative)
if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
set(KDECLARATIVE_NO_KIO TRUE)
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config-kdeclarative.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-kdeclarative.h
)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_KIO_INCLUDES}
${CMAKE_SOURCE_DIR}/kio
${KDE4_KDEUI_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set(kdeclarative_LIB_SRCS
kdeclarative.cpp
private/engineaccess.cpp
private/kiconprovider.cpp
bindings/qscriptnonguibookkeeping.cpp
bindings/i18n.cpp
bindings/icon.cpp
bindings/url.cpp
)
add_library(kdeclarative ${LIBRARY_TYPE} ${kdeclarative_LIB_SRCS})
set_target_properties(kdeclarative PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
target_link_libraries(kdeclarative PUBLIC
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${QT_QTSCRIPT_LIBRARY}
${QT_QTSCRIPTTOOLS_LIBRARY}
${QT_QTDECLARATIVE_LIBRARY}
)
if(ENABLE_TESTING)
add_subdirectory(tests)
endif()
generate_export_header(kdeclarative)
install(
FILES
kdeclarative.h
${CMAKE_CURRENT_BINARY_DIR}/kdeclarative_export.h
DESTINATION ${INCLUDE_INSTALL_DIR}
COMPONENT Devel
)
install(
TARGETS kdeclarative
EXPORT kdelibsLibraryTargets
${INSTALL_TARGETS_DEFAULT_ARGS}
)