2008-12-02 20:59:10 +08:00
|
|
|
find_package(Qt4 REQUIRED)
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
|
|
|
add_definitions ( "-DNDEBUG" )
|
|
|
|
endif (CMAKE_COMPILER_IS_GNUCXX)
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
include_directories( ${QT_INCLUDE_DIR} )
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
set(mandelbrot_SRCS
|
2008-06-29 04:33:47 +08:00
|
|
|
mandelbrot.cpp
|
|
|
|
)
|
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
qt4_automoc(${mandelbrot_SRCS})
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
add_executable(mandelbrot ${mandelbrot_SRCS})
|
2009-09-28 05:48:53 +08:00
|
|
|
add_dependencies(demos mandelbrot)
|
2008-06-29 04:33:47 +08:00
|
|
|
|
2008-12-02 20:59:10 +08:00
|
|
|
target_link_libraries(mandelbrot ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|