cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
if( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif(COMMAND cmake_policy )
project( Plugins )
set(QT_MIN_VERSION "4.6.0")
set(QUTIM_PATH "" CACHE FILEPATH "Path to qutim distro")
set(CMAKE_INSTALL_PREFIX ${QUTIM_PATH})
LIST (APPEND CMAKE_MODULE_PATH "cmake")
LIST (APPEND CMAKE_MODULE_PATH "${QUTIM_PATH}/share/cmake/Modules")
LIST (APPEND CMAKE_PREFIX_PATH "${QUTIM_PATH}")
INCLUDE (MacroEnsureVersion)
find_package(Qt4 COMPONENTS QtCore QtGui)
find_package(QutIM REQUIRED)
include_directories(include)
add_subdirectory(src)
find_library( SIMPLECONTACTLIST_LIBRARIES simplecontactlist PATHS ${QUTIM_PATH}/lib )
message (${SIMPLECONTACTLIST_LIBRARIES})
qutim_add_plugin(simplecontactlistwidget
EXTENSION
EXTENSION_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/sevenwidget.h
EXTENSION_CLASS Core::SimpleContactList::SimpleWidget
DISPLAY_NAME "Seven"
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
DESCRIPTION "Windows seven specific implementation with button's in caption"
LINK_LIBRARIES ${SIMPLECONTACTLIST_LIBRARIES}
)
m_model = ServiceManager::getByName<AbstractContactModel*>( "ContactModel" );
Q_ASSERT(m_model);
m_view = new TreeView(m_model, this );
layout->addWidget(m_view);
m_view->setItemDelegate(ServiceManager::getByName<QAbstractItemDelegate*>( "ContactDelegate" ));
* This source code was highlighted with Source Code Highlighter .
m_model = ServiceManager::getByName<AbstractContactModel*>( "ContactModel" );
Q_ASSERT(m_model);
m_view = new TreeView(m_model, this );
layout->addWidget(m_view);
m_view->setItemDelegate(ServiceManager::getByName<QAbstractItemDelegate*>( "ContactDelegate" ));
* This source code was highlighted with Source Code Highlighter .
m_model = ServiceManager::getByName<AbstractContactModel*>( "ContactModel" );
Q_ASSERT(m_model);
m_view = new TreeView(m_model, this );
layout->addWidget(m_view);
m_view->setItemDelegate(ServiceManager::getByName<QAbstractItemDelegate*>( "ContactDelegate" ));
* This source code was highlighted with Source Code Highlighter .
H:\develop\windows\labs\build>cmake ..\sevenlist -DCMAKE_BUILD_TYPE=Release -DQUTIM_PATH=H:\develop\qutim\dist -G"MinGW Makefiles"
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: H:/apps/QtCreator/mingw/bin/gcc.exe
-- Check for working C compiler: H:/apps/QtCreator/mingw/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: H:/apps/QtCreator/mingw/bin/g++.exe
-- Check for working CXX compiler: H:/apps/QtCreator/mingw/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.7.2 (using H:/apps/Qt/4.7.2/bin/qmake.exe)
-- Found QutIM: H:/develop/qutim/dist/lib/liblibqutim.dll.a
H:/develop/qutim/dist/lib/libsimplecontactlist.dll.a
-- Configuring done
-- Generating done
-- Build files have been written to: H:/develop/windows/labs/build
Source: https://habr.com/ru/post/117181/
All Articles