summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/scxml/Qt6ScxmlMacros.cmake22
-rw-r--r--src/scxml/doc/qtscxml-instantiating-state-machines.qdoc8
-rw-r--r--tests/auto/scxmlcoutput/arguments/CMakeLists.txt2
-rw-r--r--tests/auto/scxmlcoutput/path/CMakeLists.txt2
-rw-r--r--tools/qscxmlc/doc/qscxmlc.qdoc17
5 files changed, 33 insertions, 18 deletions
diff --git a/src/scxml/Qt6ScxmlMacros.cmake b/src/scxml/Qt6ScxmlMacros.cmake
index a1559c5..f78155c 100644
--- a/src/scxml/Qt6ScxmlMacros.cmake
+++ b/src/scxml/Qt6ScxmlMacros.cmake
@@ -38,8 +38,8 @@
function(qt6_add_statecharts target_or_outfiles)
set(options)
- set(oneValueArgs OUTPUT_DIR NAMESPACE)
- set(multiValueArgs QSCXMLC_ARGUMENTS)
+ set(oneValueArgs OUTPUT_DIR OUTPUT_DIRECTORY NAMESPACE)
+ set(multiValueArgs QSCXMLC_ARGUMENTS OPTIONS)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -50,9 +50,21 @@ function(qt6_add_statecharts target_or_outfiles)
set(namespace "--namespace" ${ARGS_NAMESPACE})
endif()
- set(qscxmlcOutputDir ${CMAKE_CURRENT_BINARY_DIR})
if (ARGS_OUTPUT_DIR)
- set(qscxmlcOutputDir ${ARGS_OUTPUT_DIR})
+ message(AUTHOR_WARNING
+ "OUTPUT_DIR is deprecated. Please use OUTPUT_DIRECTORY instead.")
+ set(ARGS_OUTPUT_DIRECTORY ${ARGS_OUTPUT_DIR})
+ endif()
+
+ if (ARGS_QSCXMLC_ARGUMENTS)
+ message(AUTHOR_WARNING
+ "QSCXMLC_ARGUMENTS is deprecated. Please use OPTIONS instead.")
+ set(ARGS_OPTIONS ${ARGS_QSCXMLC_ARGUMENTS})
+ endif()
+
+ set(qscxmlcOutputDir ${CMAKE_CURRENT_BINARY_DIR})
+ if (ARGS_OUTPUT_DIRECTORY)
+ set(qscxmlcOutputDir ${ARGS_OUTPUT_DIRECTORY})
if (NOT EXISTS "${qscxmlcOutputDir}" OR NOT IS_DIRECTORY "${qscxmlcOutputDir}")
message(WARNING
"qt6_add_statecharts: output dir does not exist: \"" ${qscxmlcOutputDir} "\". "
@@ -70,7 +82,7 @@ function(qt6_add_statecharts target_or_outfiles)
add_custom_command(OUTPUT ${outfile_cpp} ${outfile_h}
${QT_TOOL_PATH_SETUP_COMMAND}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc
- ARGS ${namespace} ${ARGS_QSCXMLC_ARGUMENTS} --output ${outfile} ${infile}
+ ARGS ${namespace} ${ARGS_OPTIONS} --output ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
VERBATIM)
list(APPEND outfiles ${outfile_cpp})
diff --git a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
index 32710e7..0883e92 100644
--- a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
+++ b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
@@ -100,10 +100,10 @@
This will tell qmake to run \e qscxmlc which generates MyStatemachine.h
and MyStatemachine.cpp, and adds them to appropriately to the project
headers and sources. By default, the generated files are saved in
- the build directory. The qmake \e QSCXMLC_DIR or cmake \e OUTPUT_DIR variable
- can be set to specify another directory. The qmake \e QSCXMLC_NAMESPACE
- or cmake \e NAMESPACE variable can be set to put the state machine code into a
- C++ namespace.
+ the build directory. The qmake \e QSCXMLC_DIR or cmake \e OUTPUT_DIRECTORY
+ variable can be set to specify another directory. The qmake
+ \e QSCXMLC_NAMESPACE or cmake \e NAMESPACE variable can be set to put the
+ state machine code into a C++ namespace.
After instantiating a state machine, you can connect to any state's
active property as follows. For example, if the state machine for a
diff --git a/tests/auto/scxmlcoutput/arguments/CMakeLists.txt b/tests/auto/scxmlcoutput/arguments/CMakeLists.txt
index 239fc24..4e0d7ff 100644
--- a/tests/auto/scxmlcoutput/arguments/CMakeLists.txt
+++ b/tests/auto/scxmlcoutput/arguments/CMakeLists.txt
@@ -8,5 +8,5 @@ qt_internal_add_test(tst_scxmlcoutput_arguments
# This testcase tests providing the namespace
qt6_add_statecharts(tst_scxmlcoutput_arguments
../shared/ids1.scxml
- QSCXMLC_ARGUMENTS --classname MyClass
+ OPTIONS --classname MyClass
)
diff --git a/tests/auto/scxmlcoutput/path/CMakeLists.txt b/tests/auto/scxmlcoutput/path/CMakeLists.txt
index cb7f548..68408cd 100644
--- a/tests/auto/scxmlcoutput/path/CMakeLists.txt
+++ b/tests/auto/scxmlcoutput/path/CMakeLists.txt
@@ -13,5 +13,5 @@ file(MAKE_DIRECTORY "${outputPath}")
qt6_add_statecharts(tst_scxmlcoutput_path
../shared/ids1.scxml
- OUTPUT_DIR "${outputPath}"
+ OUTPUT_DIRECTORY "${outputPath}"
)
diff --git a/tools/qscxmlc/doc/qscxmlc.qdoc b/tools/qscxmlc/doc/qscxmlc.qdoc
index 2372440..c725ddf 100644
--- a/tools/qscxmlc/doc/qscxmlc.qdoc
+++ b/tools/qscxmlc/doc/qscxmlc.qdoc
@@ -73,8 +73,7 @@
\section1 Command-Line Options
- The \c qscxmlc tool supports the following command-line options, which can be specified using
- the \c QSCXMLC_ARGUMENTS variable in the project file:
+ The \c qscxmlc tool supports the following command-line options:
\table
\header
@@ -105,20 +104,24 @@
a state is currently active.
\endtable
- In addition to \c QSCXMLC_ARGUMENTS options, the \c qmake and \c CMake project files support
- the following options:
+ The \c qmake and \c CMake project files support the following options:
\table
\header
\li Option
\li Description
\row
- \li \c {QSCXMLC_DIR|OUTPUT_DIR <directory>}
- \li \c QSCXMLC_DIR (qmake) or \c OUTPUT_DIR (cmake) specifies the directory for the output
- files.
+ \li \c {QSCXMLC_DIR|OUTPUT_DIRECTORY <directory>}
+ \li \c QSCXMLC_DIR (qmake) or \c OUTPUT_DIRECTORY (cmake) specifies the directory for
+ the output files. OUTPUT_DIR (cmake) has been deprecated.
\row
\li \c {QSCXMLC_NAMESPACE|NAMESPACE <namespace>}
\li \c QSCXMLC_NAMESPACE (qmake) or \c NAMESPACE (cmake) specifies the namespace for the
generated classes.
+ \row
+ \li \c {QSCXMLC_ARGUMENTS|OPTIONS <options>}
+ \li \c QSCXMLC_ARGUMENTS (qmake) or \c OPTIONS (cmake) allows specifying additional
+ options for the \c qscxmlc compiler. QSCXMLC_ARGUMENTS with cmake has been
+ deprecated.
\endtable
*/