I’m using VS 2013 on Windows 10 to build a plugin that uses Qt5 classes. Currently I manually add the paths to the libraries I need to the Linker Input parameters via VS like this:
\Qt\5.6\msvc2013_64\lib\
Qt5Cored.lib \Qt\5.6\msvc2013_64\lib\
Qt5Widgetsd.lib \Qt\5.6\msvc2013_64\lib\
Qt5Guid.lib \Qt\5.6\msvc2013_64\lib\
Qt5Networkd.lib
What do I need to add to my projects CMakeLists.txt file to automatically include these libraries?
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)
find_package(Qt5Core)
find_package(Qt5PrintSupport)
find_package(Qt5Widgets)
[...]
target_link_libraries(pluginifdemo Qt5::Core Qt5::Widgets Qt5::PrintSupport)
My CMakeLists.txt file is below.
Thanks and regards…Paul
# CMakeLists.txt
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@xxxxxxxxxxxxx>
# Copyright 1998 Gerald Combs
#
# 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
# of the License, 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
include(WiresharkPlugin)
# This info is from moduleinfo.nmake
set_module_info(syncro 1 1 0 0)
set(CMAKE_AUTOMOC TRUE)
set(DISSECTOR_SRC
packet-syncro.c
syncroworker.cpp
syncroserver.cpp
syncroparser.cpp
)
set(PLUGIN_FILES
plugin.c
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
if (WERROR_COMMON_FLAGS)
set_source_files_properties(
${CLEAN_FILES}
PROPERTIES
COMPILE_FLAGS ${WERROR_COMMON_FLAGS}
)
endif()
include_directories(${CMAKE_
CURRENT_SOURCE_DIR})
register_dissector_files(
plugin.c plugin
${DISSECTOR_SRC}
)
add_plugin_library(syncro)
install(TARGETS syncro
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${
CPACK_PACKAGE_NAME}/plugins/${ CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${
CPACK_PACKAGE_NAME}/plugins/${ CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${
CPACK_PACKAGE_NAME}/plugins/${ CPACK_PACKAGE_VERSION} )
____________________________________________________________ __________
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.
Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ
____________________________________________________________ __________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
____________________________________________________________ __________
____________________________________________________________ _______________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@wireshark.org ?subject=unsubscribe
- Follow-Ups:
- Re: [Wireshark-dev] Including Qt5 libs in my plugin project
- From: Paul Offord
- Re: [Wireshark-dev] Including Qt5 libs in my plugin project
- From: Paul Offord
- Re: [Wireshark-dev] Including Qt5 libs in my plugin project
- References:
- [Wireshark-dev] Including Qt5 libs in my plugin project
- From: Paul Offord
- [Wireshark-dev] Including Qt5 libs in my plugin project
- Prev by Date: [Wireshark-dev] Including Qt5 libs in my plugin project
- Next by Date: Re: [Wireshark-dev] Including Qt5 libs in my plugin project
- Previous by thread: [Wireshark-dev] Including Qt5 libs in my plugin project
- Next by thread: Re: [Wireshark-dev] Including Qt5 libs in my plugin project
- Index(es):