Merge pull request #345 from MultiMote/master

Remove QtScript dependency in CMakeLists
This commit is contained in:
Alexander Arin 2021-09-30 16:53:28 +03:00 committed by GitHub
commit 5648f68a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,11 +5,11 @@ find_package(PNG REQUIRED)
find_package( find_package(
QT NAMES Qt6 Qt5 QT NAMES Qt6 Qt5
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport Script UiTools COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport UiTools
) )
find_package( find_package(
Qt${QT_VERSION_MAJOR} Qt${QT_VERSION_MAJOR}
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport Script UiTools COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport UiTools
) )
# Old Qt does not provide QT_VERSION_MAJOR # Old Qt does not provide QT_VERSION_MAJOR
@ -37,7 +37,7 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
set ( LIMEREPORT_SOURCES set ( LIMEREPORT_SOURCES
${PROJECT_NAME}/bands/lrdataband.cpp ${PROJECT_NAME}/bands/lrdataband.cpp
${PROJECT_NAME}/bands/lrgroupbands.cpp ${PROJECT_NAME}/bands/lrgroupbands.cpp
${PROJECT_NAME}/bands/lrpagefooter.cpp ${PROJECT_NAME}/bands/lrpagefooter.cpp
@ -282,13 +282,13 @@ ${PROJECT_NAME}/translationeditor/languageselectdialog.ui
${PROJECT_NAME}/translationeditor/translationeditor.ui ${PROJECT_NAME}/translationeditor/translationeditor.ui
./${PROJECT_NAME}/databrowser/lrdatabrowser.qrc ${PROJECT_NAME}/databrowser/lrdatabrowser.qrc
./${PROJECT_NAME}/dialogdesigner/dialogdesigner.qrc ${PROJECT_NAME}/dialogdesigner/dialogdesigner.qrc
./${PROJECT_NAME}/items/items.qrc ${PROJECT_NAME}/items/items.qrc
./${PROJECT_NAME}/objectinspector/lobjectinspector.qrc ${PROJECT_NAME}/objectinspector/lobjectinspector.qrc
./${PROJECT_NAME}/report.qrc ${PROJECT_NAME}/report.qrc
./${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.qrc ${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.qrc
./${PROJECT_NAME}/translationeditor/translationeditor.qrc ${PROJECT_NAME}/translationeditor/translationeditor.qrc
) )
if (ENABLE_ZINT) if (ENABLE_ZINT)
@ -402,30 +402,29 @@ if (LIMEREPORT_STATIC AND ENABLE_ZINT)
endif(LIMEREPORT_STATIC AND ENABLE_ZINT) endif(LIMEREPORT_STATIC AND ENABLE_ZINT)
target_link_libraries( ${PROJECT_NAME} PUBLIC target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Xml Qt${QT_VERSION_MAJOR}::Xml
Qt${QT_VERSION_MAJOR}::Sql Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::PrintSupport
Qt${QT_VERSION_MAJOR}::Script Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::UiTools) Qt${QT_VERSION_MAJOR}::UiTools)
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DHAVE_QT5 -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DHAVE_UI_LOADER -D_CRT_SECURE_NO_WARNINGS) target_compile_definitions( ${PROJECT_NAME} PRIVATE -DHAVE_QT5 -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DHAVE_UI_LOADER -D_CRT_SECURE_NO_WARNINGS)
target_include_directories( ${PROJECT_NAME} PRIVATE target_include_directories( ${PROJECT_NAME} PRIVATE
limereport/ limereport/
limereport/base limereport/base
limereport/bands limereport/bands
limereport/databrowser limereport/databrowser
limereport/items/editors limereport/items/editors
limereport/items limereport/items
limereport/objectinspector limereport/objectinspector
limereport/scriptbrowser limereport/scriptbrowser
limereport/serializators limereport/serializators
limereport/scripteditor ) limereport/scripteditor )
install(TARGETS install(TARGETS
${PROJECT_NAME} ${PROJECT_NAME}
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib