e79b954f3dd29ff356726cb433ea9509dacba271
[profile/ivi/qtbase.git] / tests / auto / cmake / test_add_resource_options / CMakeLists.txt
1
2 cmake_minimum_required(VERSION 2.8)
3
4 project(test_add_resource_options)
5
6 find_package(Qt5Core REQUIRED)
7
8 include_directories(${Qt5Core_INCLUDE_DIRS})
9
10 add_definitions(${Qt5Core_DEFINITIONS})
11
12 qt5_wrap_cpp(moc_files myobject.h)
13
14 # Test options. The -binary option generates a binary to dlopen instead of
15 # a source file to compile. The compiler will consider it garbage when used
16 # in the add_executable call.
17 qt5_add_resources(rcc_files "test_macro_options.qrc" OPTIONS -binary)
18
19 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
20
21 add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
22 target_link_libraries(myobject ${Qt5Core_LIBRARIES})