https://github.com/Kitware/CMake
Raw File
Tip revision: 96541918c88c9a1647b44fbe07ca7d50e821a98a authored by Brad King on 16 July 2019, 11:08:05 UTC
CMake 3.14.6
Tip revision: 9654191
CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(MocOnly)
include("../AutogenCoreTest.cmake")

add_executable(mocOnly
  main.cpp
  # Test different Q_OBJECT position styles
  StyleA.cpp
  StyleB.cpp
  # Test different moc_/.moc include positions
  IncA.cpp
  IncB.cpp
)
set_property(TARGET mocOnly PROPERTY AUTOMOC ON)
target_link_libraries(mocOnly ${QT_LIBRARIES})
# Add compile definitions with unusual characters
target_compile_definitions(mocOnly PUBLIC "TOKEN=\"hello\;\"" )
back to top