cmake_minimum_required(VERSION 2.8) project(fbsplash) find_package(Qt4 REQUIRED) if (QT4_FOUND) message(STATUS "QT4 found.") else(QT4_FOUND) message(FATAL_ERROR "QT4 not found!") endif(QT4_FOUND) file(GLOB_RECURSE fbsplash_SOURCES src/*.cpp) file(GLOB_RECURSE fbsplash_MOC_HEADERS src/*.h) file(GLOB_RECURSE fbsplash_UIS src/*.ui) include(${QT_USE_FILE}) add_definitions(${QT_DEFINITIONS}) QT4_WRAP_UI(fbsplash_UI_HEADERS ${fbsplash_UIS}) QT4_WRAP_CPP(fbsplash_MOC_SOURCES ${fbsplash_MOC_HEADERS}) add_executable(fbsplash ${fbsplash_SOURCES} ${fbsplash_MOC_SOURCES} ${fbsplash_UI_HEADERS}) target_link_libraries(fbsplash ${QT_LIBRARIES}) include_directories(${CMAKE_CURRENT_BINARY_DIR})