Skip to content

Commit

Permalink
Ensure QT_TOOLCHAIN_FILE inclusion on the initial build in CMakeLists…
Browse files Browse the repository at this point in the history
….txt
  • Loading branch information
boardend committed May 23, 2024
1 parent 0e4b691 commit 23e404f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ find_library(
NO_DEFAULT_PATH
)

# because on the initial build the Qt toolchain file is not yet generated and therefore not included by qgis-js.cmake
# this will ensure that the Qt toolchain file is included after qtbase is built
if(EXISTS ${QT_TOOLCHAIN_FILE})
set(QT_CHAINLOAD_TOOLCHAIN_FILE ${EMSCRIPTEN_TOOLCHAIN_FILE})
include(${QT_TOOLCHAIN_FILE})
else()
message(FATAL_ERROR "Could not find Qt toolchain file: ${QT_TOOLCHAIN_FILE}")
endif()

# since Qt 6.3 qt_standard_project_setup should be used so set some default values
qt_standard_project_setup()

set(QGISJS_SOURCES
src/qgis-js.cpp
Expand Down

0 comments on commit 23e404f

Please sign in to comment.