Cmake qt5 wrap cpp

qt5_wrap_cpp

Creates rules for calling the Meta-Object Compiler (moc) on the given source files. For each input file, an output file is generated in the build directory. The paths of the generated files are added to .

Note: This is a low-level macro. See the CMake AUTOMOC Documentation for a more convenient way to let source files be processed with moc .

Note: For compatibility with Qt 6, the command is also available under the name qt_wrap_cpp.

Arguments

You can set an explicit TARGET . This will make sure that the target properties INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS are also used when scanning the source files with moc .

You can set additional OPTIONS that should be added to the moc calls. You can find possible options in the moc documentation.

DEPENDS allows you to add additional dependencies for recreation of the generated files. This is useful when the sources have implicit dependencies, like code for a Qt plugin that includes a .json file using the Q_PLUGIN_METADATA() macro.

Examples

set(SOURCES myapp.cpp main.cpp) qt5_wrap_cpp(SOURCES myapp.h) add_executable(myapp $)

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Читайте также:  Online color code html

Источник

qt_wrap_cpp

Creates rules for calling the Meta-Object Compiler (moc) on the given source files. For each input file, an output file is generated in the build directory. The paths of the generated files are added to .

Note: This is a low-level macro. See the CMake AUTOMOC Documentation for a more convenient way to let source files be processed with moc .

This command was introduced in Qt 5.15. You can use qt5_wrap_cpp in older versions of Qt.

Arguments

You can set an explicit TARGET . This will make sure that the target properties INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS are also used when scanning the source files with moc .

You can set additional OPTIONS that should be added to the moc calls. You can find possible options in the moc documentation.

DEPENDS allows you to add additional dependencies for recreation of the generated files. This is useful when the sources have implicit dependencies, like code for a Qt plugin that includes a .json file using the Q_PLUGIN_METADATA() macro.

Examples

set(SOURCES myapp.cpp main.cpp) qt_wrap_cpp(SOURCES myapp.h) add_executable(myapp $)

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Источник

qt5_wrap_cpp

Creates rules for calling the Meta-Object Compiler (moc) on the given source files. For each input file, an output file is generated in the build directory. The paths of the generated files are added to .

Note: This is a low-level macro. See the CMake AUTOMOC Documentation for a more convenient way to let source files be processed with moc .

Note: For compatibility with Qt 6, the command is also available under the name qt_wrap_cpp.

Arguments

You can set an explicit TARGET . This will make sure that the target properties INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS are also used when scanning the source files with moc .

You can set additional OPTIONS that should be added to the moc calls. You can find possible options in the moc documentation.

DEPENDS allows you to add additional dependencies for recreation of the generated files. This is useful when the sources have implicit dependencies, like code for a Qt plugin that includes a .json file using the Q_PLUGIN_METADATA() macro.

Examples

set(SOURCES myapp.cpp main.cpp) qt5_wrap_cpp(SOURCES myapp.h) add_executable(myapp $)

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Источник

qt_wrap_cpp

Creates rules for calling the Meta-Object Compiler (moc) on the given source files. For each input file, an output file is generated in the build directory. The paths of the generated files are added to .

Note: This is a low-level macro. See the CMake AUTOMOC Documentation for a more convenient way to let source files be processed with moc .

This command was introduced in Qt 5.15. You can use qt5_wrap_cpp in older versions of Qt.

Arguments

You can set an explicit TARGET . This will make sure that the target properties INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS are also used when scanning the source files with moc .

You can set additional OPTIONS that should be added to the moc calls. You can find possible options in the moc documentation.

DEPENDS allows you to add additional dependencies for recreation of the generated files. This is useful when the sources have implicit dependencies, like code for a Qt plugin that includes a .json file using the Q_PLUGIN_METADATA() macro.

Examples

set(SOURCES myapp.cpp main.cpp) qt_wrap_cpp(SOURCES myapp.h) add_executable(myapp $)

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown CMake command «QT5_WRAP_CPP» #36

Unknown CMake command «QT5_WRAP_CPP» #36

Comments

Running ./bootstrap.sh under Mac OS X El Capitan Version 10.11.6. Using Qt 5.9. More output below.

. -- C++ compiler is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Setup build directories. Adding submodule omnicalib -- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.13") -- Doxygen is setup. Use 'make doc' to generate documentation. -- Omnidome 1.0.1 CMake Error at cmake-scripts/base/build_target.cmake:111 (QT5_WRAP_CPP): Unknown CMake command "QT5_WRAP_CPP". Call Stack (most recent call first): cmake-scripts/base/build_target.cmake:127 (omni_setup_build_target) CMakeLists.txt:36 (omni_add_shared_library) -- Configuring incomplete, errors occurred! See also "/Volumes/CHAPPIE/omnidome/CMakeFiles/CMakeOutput.log". make: *** No targets specified and no makefile found. Stop. 

The text was updated successfully, but these errors were encountered:

Installed Qt 5.8 as the latest commit is with a description «Qt 5.8». Tried to compile with Qt being in my home directory and omnidome repo as well. This is where the ./bootstrap.sh script stopped.

-- Plugin plugin_mapping_CubeMap in /Users/kris/omnidome/src/plugins/mapping/CubeMap -- Plugin plugin_mapping_Cylindrical in /Users/kris/omnidome/src/plugins/mapping/Cylindrical -- Plugin plugin_mapping_Equirectangular in /Users/kris/omnidome/src/plugins/mapping/Equirectangular -- Plugin plugin_mapping_Fisheye in /Users/kris/omnidome/src/plugins/mapping/Fisheye -- Plugin plugin_mapping_TexCoords in /Users/kris/omnidome/src/plugins/mapping/TexCoords -- Configuring done -- Generating done -- Build files have been written to: /Users/kris/omnidome Scanning dependencies of target omni [ 1%] Building CXX object CMakeFiles/omni.dir/src/lib/BlendMask.cpp.o In file included from /Users/kris/omnidome/src/lib/BlendMask.cpp:23: In file included from /Users/kris/omnidome/include/omni/proj/Tuning.h:29: /Users/kris/omnidome/include/omni/proj/ColorCorrection.h:24:10: fatal error: 'omnic/ColorCorrectionLOT.h' file not found #include ^ 1 error generated. make[2]: *** [CMakeFiles/omni.dir/src/lib/BlendMask.cpp.o] Error 1 make[1]: *** [CMakeFiles/omni.dir/all] Error 2 make: *** [all] Error 2 

I have the same issue with Qt 5.9 installed via Homebrew.

$ cmake . -DQT_PATH=/usr/local/opt/qt/ . -- Omnidome 1.0.1 CMake Error at cmake-scripts/base/build_target.cmake:111 (QT5_WRAP_CPP): Unknown CMake command "QT5_WRAP_CPP". Call Stack (most recent call first): cmake-scripts/base/build_target.cmake:127 (omni_setup_build_target) CMakeLists.txt:36 (omni_add_shared_library) -- Configuring incomplete, errors occurred! See also "/Users/Paul/Developer/omnidome/CMakeFiles/CMakeOutput.log". 

I also changed the Qt minor version to 9 as per #33 (comment) but no dice.

@@ -34,7 +34,7 @@ include(CMakeParseArguments) omni_option(QT_MAJOR_VERSION "Qt Major Version" 5 ) # Qt Minor version, default is 6 -omni_option(QT_MINOR_VERSION "Qt Minor Version" 8 ) +omni_option(QT_MINOR_VERSION "Qt Minor Version" 9 ) omni_option(QT_PATH "Qt Path" "$ENV/Qt" ) MACRO(find_qt5_component COMPONENT_NAME)

so here is how to fix this issue (assuming you are on mac osx and have the latest version of Qt — 5.9.2)

in the file qt.cmake — line 37

omni_option(QT_MINOR_VERSION «Qt Minor Version» 9.2 )

then run the bootstrap.sh file (you need a github account with a valid ssh key)

Источник

Оцените статью