2011-12-05 01:46:22 +00:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project(pass4)
|
|
|
|
|
|
|
|
find_package(Qt5Core REQUIRED)
|
|
|
|
|
|
|
|
include_directories(${Qt5Core_INCLUDE_DIRS})
|
|
|
|
|
2012-02-10 15:40:12 +00:00
|
|
|
add_definitions(${Qt5Core_DEFINITIONS})
|
|
|
|
|
2011-12-05 01:46:22 +00:00
|
|
|
qt5_wrap_cpp(moc_files myobject.h)
|
|
|
|
|
|
|
|
# Test options. The -binary option generates a binary to dlopen instead of
|
|
|
|
# a source file to compile. The compiler will consider it garbage when used
|
|
|
|
# in the add_executable call.
|
|
|
|
qt5_add_resources(rcc_files "pass4.qrc" OPTIONS -binary)
|
|
|
|
|
2012-02-21 11:06:54 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
|
2011-12-05 01:46:22 +00:00
|
|
|
add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
|
|
|
|
target_link_libraries(myobject ${Qt5Core_LIBRARIES})
|