projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Settings: Refactor out a checkbox creator method
[pulseview.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index 0d9b455f2316548c71507a746fe95c4e241601e9..983dc537c3de4ba87cf718d52a589cd565060f75 100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-18,7
+18,7
@@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
## 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)
include(GNUInstallDirs)
@@
-55,10
+55,13
@@
endif()
#= Dependencies
#-------------------------------------------------------------------------------
#= Dependencies
#-------------------------------------------------------------------------------
-list(APPEND PKGDEPS libsigrokcxx>=0.4.0)
+list(APPEND PKGDEPS glib-2.0>=2.28.0)
+list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
+
+list(APPEND PKGDEPS libsigrokcxx>=0.5.0)
if(ENABLE_DECODE)
if(ENABLE_DECODE)
- list(APPEND PKGDEPS libsigrokdecode>=0.
4
.0)
+ list(APPEND PKGDEPS libsigrokdecode>=0.
5
.0)
endif()
if(ANDROID)
endif()
if(ANDROID)
@@
-68,10
+71,9
@@
endif()
find_package(PkgConfig)
pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
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)
+
+find_package(Qt5 COMPONENTS Core Gui Widgets Svg REQUIRED)
if(WIN32)
# MXE workaround: Use pkg-config to find Qt5 libs.
if(WIN32)
# MXE workaround: Use pkg-config to find Qt5 libs.
@@
-79,10
+81,7
@@
if(WIN32)
pkg_check_modules(QT5ALL REQUIRED Qt5Widgets Qt5Gui Qt5Svg)
endif()
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)
set(QT_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Svg)
-add_definitions(${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
set(BOOSTCOMPS filesystem serialization system)
if(ENABLE_TESTS)
set(BOOSTCOMPS filesystem serialization system)
if(ENABLE_TESTS)
@@
-154,9
+153,10
@@
memaccess_check_unaligned_le(HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS)
#-------------------------------------------------------------------------------
set(PV_TITLE PulseView)
#-------------------------------------------------------------------------------
set(PV_TITLE PulseView)
-set(PV_DESCRIPTION "A GUI for sigrok")
set(PV_VERSION_STRING "0.4.0")
set(PV_VERSION_STRING "0.4.0")
+set(PV_GLIBMM_VERSION ${PKGDEPS_glibmm-2.4_VERSION})
+
include(GetGitRevisionDescription)
# Append the revision hash unless we are exactly on a tagged release.
include(GetGitRevisionDescription)
# Append the revision hash unless we are exactly on a tagged release.
@@
-366,14
+366,13
@@
if(ANDROID)
)
endif()
)
endif()
-qt5_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS})
qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES})
#===============================================================================
#= Global Definitions
#-------------------------------------------------------------------------------
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)
add_definitions(-D__STDC_LIMIT_MACROS)
add_definitions(-Wall -Wextra)
add_definitions(-std=c++11)
@@
-399,7
+398,6
@@
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
- ${QT_INCLUDE_DIRS}
)
if(STATIC_PKGDEPS_LIBS)
)
if(STATIC_PKGDEPS_LIBS)
@@
-445,17
+443,9
@@
if(ANDROID)
endif()
if(ANDROID)
endif()
if(ANDROID)
-add_library(${PROJECT_NAME} SHARED
- ${pulseview_SOURCES}
- ${pulseview_HEADERS_MOC}
- ${pulseview_RESOURCES_RCC}
-)
+ add_library(${PROJECT_NAME} SHARED ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC})
else()
else()
-add_executable(${PROJECT_NAME}
- ${pulseview_SOURCES}
- ${pulseview_HEADERS_MOC}
- ${pulseview_RESOURCES_RCC}
-)
+ add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC})
endif()
target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})
endif()
target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})