2014-03-04 14:03:37 +04:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.12)
|
|
|
|
project(IncrementalMoc)
|
|
|
|
|
|
|
|
find_package(Qt4 REQUIRED)
|
|
|
|
|
2014-04-30 10:35:51 +04:00
|
|
|
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})
|
2014-03-04 14:03:37 +04:00
|
|
|
|
|
|
|
add_library(testlib foo.cpp moc_foo.cpp)
|
|
|
|
target_link_libraries(testlib Qt4::QtCore)
|
2014-04-30 10:35:51 +04:00
|
|
|
if (ADD_TARGET_DEF)
|
2014-03-04 14:03:37 +04:00
|
|
|
target_compile_definitions(testlib PRIVATE NEW_DEF)
|
|
|
|
endif()
|