2 cmake_minimum_required(VERSION 2.8)
4 project(test_add_resource_options)
6 find_package(Qt5Core REQUIRED)
8 include_directories(${Qt5Core_INCLUDE_DIRS})
10 add_definitions(${Qt5Core_DEFINITIONS})
12 qt5_wrap_cpp(moc_files myobject.h)
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)
19 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
21 add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
22 target_link_libraries(myobject ${Qt5Core_LIBRARIES})