Skip to content

Commit

Permalink
feat(cmake): allow to exclude templatengine from build
Browse files Browse the repository at this point in the history
  • Loading branch information
msvetkin authored and silven committed Oct 9, 2023
1 parent 993a05c commit faf066f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion QtWebApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ install(TARGETS QtWebAppGlobal

add_subdirectory(logging)
add_subdirectory(httpserver)
add_subdirectory(templateengine)

option(WITH_TEMPLATEENGINE "Template engine" OFF)
if (WITH_TEMPLATEENGINE)
add_subdirectory(templateengine)
endif()

configure_file(cmake/QtWebAppConfig.cmake.in QtWebAppConfig.cmake @ONLY)
configure_file(cmake/QtWebAppConfigVersion.cmake.in QtWebAppConfigVersion.cmake @ONLY)
Expand Down
2 changes: 1 addition & 1 deletion QtWebApp/cmake/QtWebAppConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (NOT ${Qt@QT_VERSION_MAJOR@_FOUND})
set(QtWebApp_FOUND False)
return()
endif()
if (@QT_VERSION_MAJOR@ EQUAL 6)
if (@QT_VERSION_MAJOR@ EQUAL 6 AND @WITH_TEMPLATEENGINE@)
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
endif()

Expand Down

0 comments on commit faf066f

Please sign in to comment.