summaryrefslogtreecommitdiffstats
path: root/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
blob: d0e96170b29dd71b1f0109552c67d2b3593a3062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

cmake_minimum_required(VERSION 3.5)
project(IncrementalMoc)

find_package(Qt4 REQUIRED)

if (ADD_TARGET_DEF)
  set(target_args TARGET testlib)
endif()

if (ADD_DIR_DEF)
  add_definitions(-DNEW_DEF)
endif()

qt4_generate_moc(foo.h moc_foo.cpp ${target_args})

add_library(testlib foo.cpp moc_foo.cpp)
target_link_libraries(testlib Qt4::QtCore)
if (ADD_TARGET_DEF)
  target_compile_definitions(testlib PRIVATE NEW_DEF)
endif()