project(QwtDataViewer) # Add FindQwt.cmake to the Find*.cmake list list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) FIND_PACKAGE(Qwt REQUIRED) FIND_PACKAGE(Qt4 REQUIRED) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTMAIN TRUE) INCLUDE(${QT_USE_FILE}) include_directories(${QT_INCLUDE_DIR} ${QWT_INCLUDE_DIR} ../) set(SOURCE_FILES ../Scope.cpp ../ScopeFixedStep.cpp ../ScopeVariableStep.cpp ../Scrollbar.cpp ) SET(FILES_TO_MOC ../Scope.h ../Scrollbar.h ) QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC}) add_library(${PROJECT_NAME} SHARED ${MOC_SOURCES} ${SOURCE_FILES} ) target_link_libraries( ${PROJECT_NAME} ${QWT_LIBRARIES} ${QT_LIBRARIES} ) set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_d" ) set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0 SOVERSION 1) INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION /usr/lib ) FILE(GLOB HEADER_FILES "../*.h") INSTALL(FILES ${HEADER_FILES} DESTINATION /usr/include/QwtDataViewer)