## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 2.8.12)
include(GNUInstallDirs)
find_package(PkgConfig)
pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
-find_package(Qt5Core REQUIRED)
-find_package(Qt5Widgets REQUIRED)
-find_package(Qt5Gui REQUIRED)
-find_package(Qt5Svg REQUIRED)
+set(CMAKE_AUTOMOC TRUE)
+set(CMAKE_AUTORCC TRUE)
+
+find_package(Qt5 COMPONENTS Core Gui Widgets Svg REQUIRED)
if(WIN32)
# MXE workaround: Use pkg-config to find Qt5 libs.
pkg_check_modules(QT5ALL REQUIRED Qt5Widgets Qt5Gui Qt5Svg)
endif()
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
-set(QT_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
set(QT_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Svg)
-add_definitions(${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
set(BOOSTCOMPS filesystem serialization system)
if(ENABLE_TESTS)
pv/widgets/sweeptimingwidget.cpp
pv/widgets/timestampspinbox.cpp
pv/widgets/wellarray.cpp
+ pulseview.qrc
)
# This list includes only QObject derived class headers.
pv/widgets/wellarray.hpp
)
-set(pulseview_RESOURCES
- pulseview.qrc
-)
-
if(ENABLE_SIGNALS)
list(APPEND pulseview_SOURCES signalhandler.cpp)
list(APPEND pulseview_HEADERS signalhandler.hpp)
)
endif()
-qt5_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS})
-qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES})
-
#===============================================================================
#= Global Definitions
#-------------------------------------------------------------------------------
-add_definitions(${QT_DEFINITIONS} -DQT_NO_KEYWORDS)
+add_definitions(-DQT_NO_KEYWORDS)
add_definitions(-D__STDC_LIMIT_MACROS)
add_definitions(-Wall -Wextra)
add_definitions(-std=c++11)
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
- ${QT_INCLUDE_DIRS}
)
if(STATIC_PKGDEPS_LIBS)
endif()
if(ANDROID)
-add_library(${PROJECT_NAME} SHARED
- ${pulseview_SOURCES}
- ${pulseview_HEADERS_MOC}
- ${pulseview_RESOURCES_RCC}
-)
+ add_library(${PROJECT_NAME} SHARED ${pulseview_SOURCES})
else()
-add_executable(${PROJECT_NAME}
- ${pulseview_SOURCES}
- ${pulseview_HEADERS_MOC}
- ${pulseview_RESOURCES_RCC}
-)
+ add_executable(${PROJECT_NAME} ${pulseview_SOURCES})
endif()
target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})