cmake_minimum_required(VERSION 2.8) project(fbgui) find_package(Qt4 REQUIRED) if (QT4_FOUND) message(STATUS "QT4 found.") else(QT4_FOUND) message(FATAL_ERROR "QT4 not found!") endif(QT4_FOUND) #find_package(Qxt REQUIRED) set(QT_USE_QTNETWORK TRUE) set(QT_USE_QTWEBKIT TRUE) file(GLOB_RECURSE FBGUI_SOURCES src/*.cpp) file(GLOB_RECURSE FBGUI_MOC_HEADERS src/*.h) file(GLOB_RECURSE FBGUI_UIS src/*.ui) file(GLOB_RECURSE FBGUI_RCS src/*.qrc) include_directories(${CMAKE_CURRENT_BINARY_DIR} /usr/local/Qxt/include/QxtCore /usr/include/sysfs /usr/include/libusb-1.0) include(${QT_USE_FILE}) add_definitions(${QT_DEFINITIONS}) link_directories(/usr/local/Qxt/lib /usr/lib) QT4_ADD_RESOURCES(FBGUI_RC_SOURCES ${FBGUI_RCS}) QT4_WRAP_UI(FBGUI_UI_HEADERS ${FBGUI_UIS}) QT4_WRAP_CPP(FBGUI_MOC_SOURCES ${FBGUI_MOC_HEADERS}) add_executable(fbgui ${FBGUI_SOURCES} ${FBGUI_MOC_SOURCES} ${FBGUI_UI_HEADERS} ${FBGUI_RC_SOURCES}) target_link_libraries(fbgui ${QT_LIBRARIES} QxtCore qjson sysfs usb-1.0)