Skip to content

Commit

Permalink
Don't attempt to build two examples with Qt6
Browse files Browse the repository at this point in the history
The lack of WebView means it can not work
  • Loading branch information
steveire committed Nov 11, 2022
1 parent 7b67cbe commit 20d415b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 53 deletions.
30 changes: 16 additions & 14 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,23 @@ ExternalProject_Add(codegen
DEPENDS books
)

ExternalProject_Add(contacts
SOURCE_DIR ${CMAKE_SOURCE_DIR}/contacts
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS codegen
)
if (NOT GRANTLEE_BUILD_WITH_QT6)
ExternalProject_Add(contacts
SOURCE_DIR ${CMAKE_SOURCE_DIR}/contacts
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS codegen
)

ExternalProject_Add(htmlapps
SOURCE_DIR ${CMAKE_SOURCE_DIR}/htmlapps
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS contacts
)
ExternalProject_Add(htmlapps
SOURCE_DIR ${CMAKE_SOURCE_DIR}/htmlapps
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS contacts
)
endif()

ExternalProject_Add(textedit
SOURCE_DIR ${CMAKE_SOURCE_DIR}/textedit
Expand Down
27 changes: 8 additions & 19 deletions examples/contacts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,14 @@ target_link_libraries(
Grantlee5::Templates
)

if (GRANTLEE_BUILD_WITH_QT6)
find_package(Qt6WebKitWidgets REQUIRED)
find_package(Qt6LinguistTools REQUIRED)
target_link_libraries(
contacts_linguist
Qt6::WebKitWidgets
)
set(lupdate_exe Qt6::lupdate)
set(lrelease_exe Qt6::lrelease)
else()
find_package(Qt5WebKitWidgets REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
target_link_libraries(
contacts_linguist
Qt5::WebKitWidgets
)
set(lupdate_exe Qt5::lupdate)
set(lrelease_exe Qt5::lrelease)
endif()
find_package(Qt5WebKitWidgets REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
target_link_libraries(
contacts_linguist
Qt5::WebKitWidgets
)
set(lupdate_exe Qt5::lupdate)
set(lrelease_exe Qt5::lrelease)

execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${PROJECT_SOURCE_DIR}/../../scripts" "${PROJECT_SOURCE_DIR}/scripts")

Expand Down
27 changes: 7 additions & 20 deletions examples/htmlapps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ find_package(Qt5 REQUIRED XmlPatterns Network)
target_link_libraries(customplugin
Grantlee5::Templates
)
if (GRANTLEE_BUILD_WITH_QT6)
target_link_libraries(customplugin
Qt6::XmlPatterns
Qt6::Network
)
else()
target_link_libraries(customplugin
Qt5::XmlPatterns
Qt5::Network
)
endif()
target_link_libraries(customplugin
Qt5::XmlPatterns
Qt5::Network
)

add_executable(htmlapps
main.cpp
Expand All @@ -50,12 +43,6 @@ target_link_libraries(htmlapps
Grantlee5::Templates
)

if (GRANTLEE_BUILD_WITH_QT6)
target_link_libraries(htmlapps
Qt6::WebKitWidgets
)
else()
target_link_libraries(htmlapps
Qt5::WebKitWidgets
)
endif()
target_link_libraries(htmlapps
Qt5::WebKitWidgets
)

0 comments on commit 20d415b

Please sign in to comment.