katie/src/designer/CMakeLists.txt
Ivailo Monev 01d315b51a set extra link libraries as private where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-12-24 08:31:03 +00:00

137 lines
4 KiB
CMake

add_definitions(
-DQT_SCRIPT_LIB
-DKATIE_TOOLS_SUFFIX="${KATIE_TOOLS_SUFFIX}"
)
set(EXTRA_DESIGNER_LIBS
KtCore KtGui KtXml KtUiTools
)
set(DESIGNER_PUBLIC_HEADERS
QAbstractExtensionFactory
QAbstractExtensionManager
QAbstractFormBuilder
QDesignerActionEditorInterface
QDesignerBrushManagerInterface
QDesignerComponents
QDesignerContainerExtension
QDesignerCustomWidgetCollectionInterface
QDesignerCustomWidgetInterface
QDesignerDnDItemInterface
QDesignerDynamicPropertySheetExtension
QDesignerExtraInfoExtension
QDesignerFormEditorInterface
QDesignerFormEditorPluginInterface
QDesignerFormWindowCursorInterface
QDesignerFormWindowInterface
QDesignerFormWindowManagerInterface
QDesignerFormWindowToolInterface
QDesignerIconCacheInterface
QDesignerIntegrationInterface
QDesignerLanguageExtension
QDesignerLayoutDecorationExtension
QDesignerMemberSheetExtension
QDesignerMetaDataBaseInterface
QDesignerMetaDataBaseItemInterface
QDesignerObjectInspectorInterface
QDesignerPromotionInterface
QDesignerPropertyEditorInterface
QDesignerPropertySheetExtension
QDesignerResourceBrowserInterface
QDesignerTaskMenuExtension
QDesignerWidgetBoxInterface
QDesignerWidgetDataBaseInterface
QDesignerWidgetDataBaseItemInterface
QDesignerWidgetFactoryInterface
QExtensionFactory
QExtensionManager
QFormBuilder
)
include(extension/extension.cmake)
include(sdk/sdk.cmake)
include(shared/shared.cmake)
add_subdirectory(components)
set(DESIGNER_HEADERS
${DESIGNER_HEADERS}
${CMAKE_CURRENT_SOURCE_DIR}/container.h
${CMAKE_CURRENT_SOURCE_DIR}/qdesignerexportwidget.h
${CMAKE_CURRENT_SOURCE_DIR}/qdesigner_components_global.h
${CMAKE_CURRENT_SOURCE_DIR}/qdesigner_components.h
)
set(DESIGNER_SOURCES
${DESIGNER_SOURCES}
${CMAKE_SOURCE_DIR}/src/tools/rcc/rcc.cpp
)
include_directories(
${CMAKE_BINARY_DIR}/include
${CMAKE_BINARY_DIR}/privateinclude
${CMAKE_BINARY_DIR}/include/QtCore
${CMAKE_BINARY_DIR}/privateinclude/QtCore
${CMAKE_BINARY_DIR}/include/QtGui
${CMAKE_BINARY_DIR}/privateinclude/QtGui
${CMAKE_BINARY_DIR}/include/QtXml
${CMAKE_BINARY_DIR}/privateinclude/QtXml
${CMAKE_BINARY_DIR}/include/QtScript
${CMAKE_BINARY_DIR}/privateinclude/QtScript
${CMAKE_BINARY_DIR}/include/QtUiTools
${CMAKE_BINARY_DIR}/privateinclude/QtUiTools
${CMAKE_BINARY_DIR}/include/QtDesigner
${CMAKE_BINARY_DIR}/privateinclude/QtDesigner
# for widgets.table
${CMAKE_SOURCE_DIR}/src/shared
# for rcc.h
${CMAKE_SOURCE_DIR}/src/tools/rcc
)
if(${KATIE_TYPE} STREQUAL SHARED)
add_definitions(
-DQDESIGNER_SDK_LIBRARY
-DQDESIGNER_EXTENSION_LIBRARY
-DQDESIGNER_SHARED_LIBRARY
)
else()
add_definitions(-DQT_DESIGNER_STATIC)
endif()
set(DESIGNER_HEADERS
${DESIGNER_HEADERS}
${CMAKE_CURRENT_SOURCE_DIR}/qdesignercommon_p.h
)
katie_generate_misc("${DESIGNER_HEADERS}" QtDesigner)
katie_generate_public("${DESIGNER_PUBLIC_HEADERS}" QtDesigner)
katie_generate_package(KtDesigner "KtCore KtGui KtXml KtUiTools")
katie_setup_target(KtDesigner ${DESIGNER_SOURCES} ${DESIGNER_HEADERS})
add_library(KtDesigner ${KATIE_TYPE} ${KtDesigner_SOURCES}
$<TARGET_OBJECTS:sharedqtgradienteditor>
$<TARGET_OBJECTS:sharedqtpropertybrowser>
$<TARGET_OBJECTS:sharedfindwidget>
)
target_link_libraries(KtDesigner PRIVATE ${EXTRA_DESIGNER_LIBS})
set_target_properties(KtDesigner PROPERTIES
VERSION ${KATIE_MAJOR}.${KATIE_MINOR}
SOVERSION ${KATIE_VERSION}
EXPORT_NAME Designer
)
katie_setup_object(KtDesigner sharedqtgradienteditor sharedqtpropertybrowser sharedfindwidget)
install(
TARGETS KtDesigner
EXPORT KatieLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}
DESTINATION ${KATIE_LIBRARIES_RELATIVE}
COMPONENT Runtime
)
install(
DIRECTORY ${CMAKE_BINARY_DIR}/include/QtDesigner
DESTINATION ${KATIE_HEADERS_RELATIVE}
COMPONENT Devel
)
katie_optimize_headers(${KATIE_HEADERS_FULL}/QtDesigner)