You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libqtxdg-packaging/xdgiconloader/CMakeLists.txt

84 lines
2.4 KiB

include_directories(
"${Qt5Gui_PRIVATE_INCLUDE_DIRS}"
)
set(xdgiconloader_PUBLIC_H_FILES
)
set(xdgiconloader_PUBLIC_CLASSES
)
set(xdgiconloader_PRIVATE_H_FILES
)
set(xdgiconloader_CPP_FILES
xdgiconloader.cpp
)
set(xdgiconloader_MOCS
)
set(xdgiconloader_PRIVATE_INSTALLABLE_H_FILES
xdgiconloader_p.h
)
add_library(${QTXDGX_ICONLOADER_LIBRARY_NAME} SHARED
${xdgiconloader_CPP_FILES}
${xdgiconloader_PRIVATE_INSTALLABLE_H_FILES}
)
generate_export_header(${QTXDGX_ICONLOADER_LIBRARY_NAME} BASE_NAME XdgIconLoader)
# Copy public headers (in tree building)
set(XDGICONLOADER_EXPORT_FILE "xdgiconloader_export.h")
configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/${XDGICONLOADER_EXPORT_FILE}"
"${QTXDGX_INTREE_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}/${XDGICONLOADER_EXPORT_FILE}"
COPYONLY
)
target_include_directories(${QTXDGX_ICONLOADER_LIBRARY_NAME}
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}>"
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}/${QTXDG_VERSION_STRING}>"
)
# include directories and targets for the in tree build
target_include_directories(${QTXDGX_ICONLOADER_LIBRARY_NAME}
PUBLIC "$<BUILD_INTERFACE:${QTXDGX_INTREE_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}>"
PUBLIC "$<BUILD_INTERFACE:${QTXDGX_INTREE_INCLUDEDIR}>"
PUBLIC "$<BUILD_INTERFACE:${QTXDGX_INTREE_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}/${QTXDG_VERSION_STRING}>"
)
target_link_libraries(${QTXDGX_ICONLOADER_LIBRARY_NAME}
PUBLIC
Qt5::Gui
Qt5::Svg
)
set_target_properties(${QTXDGX_ICONLOADER_LIBRARY_NAME}
PROPERTIES
VERSION ${QTXDG_VERSION_STRING}
SOVERSION ${QTXDG_MAJOR_VERSION}
)
export(TARGETS ${QTXDGX_ICONLOADER_LIBRARY_NAME} FILE "${CMAKE_BINARY_DIR}/${QTXDGX_ICONLOADER_FILE_NAME}-targets.cmake")
install(TARGETS
${QTXDGX_ICONLOADER_LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_LIBDIR}"
EXPORT "${QTXDGX_ICONLOADER_FILE_NAME}-targets"
COMPONENT Runtime
)
install(FILES
${xdgiconloader_PRIVATE_INSTALLABLE_H_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}/${QTXDG_VERSION_STRING}/private/xdgiconloader"
COMPONENT Devel
)
install(FILES
"${QTXDGX_INTREE_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}/${XDGICONLOADER_EXPORT_FILE}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${QTXDGX_ICONLOADER_FILE_NAME}"
)