summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/MocInclude/shared.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-19 15:19:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-19 15:19:52 (GMT)
commit9c31d83aa2a3d3f5921f4a5a559e126e285b96c5 (patch)
tree9506b2dbacaa62370c1d978965bbf2750a6b7a04 /Tests/QtAutogen/MocInclude/shared.cmake
parente199294673665e01b1cba48625ec1b18c960c90e (diff)
parentcc0900d9cd5fe1fa224d48738965b2928c09f6e7 (diff)
downloadCMake-9c31d83aa2a3d3f5921f4a5a559e126e285b96c5.zip
CMake-9c31d83aa2a3d3f5921f4a5a559e126e285b96c5.tar.gz
CMake-9c31d83aa2a3d3f5921f4a5a559e126e285b96c5.tar.bz2
Merge topic 'autogen_path_prefix'
cc0900d9cd Help: Add release notes for AUTOMOC_PATH_PREFIX 692d8e3492 Help: Add documentation for AUTOMOC_PATH_PREFIX 1933ade9f1 Tests: At QtAutogen.MocIncludeSymlink test 706d9738a6 Tests: Merge QtAutogen.MocIncludeStrict and MocIncludeRelaxed d018d27c10 Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX) 77983c8147 Autogen: Add IsHeader flag to SourceFileT class f9e5441eb4 Autogen: Abbreviate file paths in messages 51676cf655 Autogen: Split JobEvalCacheT job into separate moc and uic jobs ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3818
Diffstat (limited to 'Tests/QtAutogen/MocInclude/shared.cmake')
-rw-r--r--Tests/QtAutogen/MocInclude/shared.cmake71
1 files changed, 0 insertions, 71 deletions
diff --git a/Tests/QtAutogen/MocInclude/shared.cmake b/Tests/QtAutogen/MocInclude/shared.cmake
deleted file mode 100644
index 2ca2841..0000000
--- a/Tests/QtAutogen/MocInclude/shared.cmake
+++ /dev/null
@@ -1,71 +0,0 @@
-# Test moc include patterns
-include_directories("../MocInclude")
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
-# Generate .moc file externally and enabled SKIP_AUTOMOC on the file
-qtx_generate_moc(
- ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.hpp
- ${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc)
-set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON)
-
-# Generate .moc file externally from generated source file
-# and enabled SKIP_AUTOMOC on the source file
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.hpp.in
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp)
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.cpp.in
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp)
-qtx_generate_moc(
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc)
-set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp PROPERTY SKIP_AUTOMOC ON)
-
-# Generate moc file externally and enabled SKIP_AUTOMOC on the header
-qtx_generate_moc(
- ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp
- ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp)
-set_property(
- SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp
- PROPERTY SKIP_AUTOMOC ON)
-# Custom target to depend on
-set(SOBJC_MOC ${CMAKE_CURRENT_BINARY_DIR}/moc_SObjCExtra.cpp)
-add_custom_target("${MOC_INCLUDE_NAME}_SOBJC"
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp
- BYPRODUCTS ${SOBJC_MOC}
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.moc.in
- ${SOBJC_MOC})
-
-# MOC_INCLUDE_NAME must be defined by the includer
-add_executable(${MOC_INCLUDE_NAME}
- # Common sources
- ../MocInclude/ObjA.cpp
- ../MocInclude/ObjB.cpp
-
- ../MocInclude/LObjA.cpp
- ../MocInclude/LObjB.cpp
-
- ../MocInclude/EObjA.cpp
- ../MocInclude/EObjAExtra.cpp
- ../MocInclude/EObjB.cpp
- ../MocInclude/subExtra/EObjBExtra.cpp
-
- ../MocInclude/SObjA.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc
- ../MocInclude/SObjC.cpp
- ../MocInclude/SObjCExtra.hpp
- ../MocInclude/SObjCExtra.cpp
-
- ../MocInclude/subGlobal/GObj.cpp
- main.cpp
-)
-add_dependencies(${MOC_INCLUDE_NAME} "${MOC_INCLUDE_NAME}_SOBJC")
-target_link_libraries(${MOC_INCLUDE_NAME} ${QT_LIBRARIES})
-set_target_properties(${MOC_INCLUDE_NAME} PROPERTIES AUTOMOC ON)