summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
d56edfc)
Move some of the common cmake includes to a location near the top of the
file. Lookup the pkg-config(1) utility before the construction of the
list of dependendencies.
Remaining subsequent includes are strictly conditional (backtrace), or
belong to different groups than source compilation (VCS revision, CPack).
#= Dependencies
#-------------------------------------------------------------------------------
#= Dependencies
#-------------------------------------------------------------------------------
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
+include(CMakePushCheckState)
+include(memaccess)
+
+find_package(PkgConfig)
+
list(APPEND PKGDEPS glib-2.0>=2.28.0)
list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
list(APPEND PKGDEPS glib-2.0>=2.28.0)
list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
list(APPEND PKGDEPS libsigrokandroidutils>=0.1.0)
endif()
list(APPEND PKGDEPS libsigrokandroidutils>=0.1.0)
endif()
pkg_check_modules(LIBSRCXX ${LIBSR_CXX_BINDING})
if(NOT LIBSRCXX_FOUND OR NOT LIBSRCXX_VERSION)
message(FATAL_ERROR "libsigrok C++ bindings missing, check libsigrok's 'configure' output (missing dependencies?)")
pkg_check_modules(LIBSRCXX ${LIBSR_CXX_BINDING})
if(NOT LIBSRCXX_FOUND OR NOT LIBSRCXX_VERSION)
message(FATAL_ERROR "libsigrok C++ bindings missing, check libsigrok's 'configure' output (missing dependencies?)")
# Helper for checking for atomics
function(check_working_cxx_atomics varname additional_lib)
# Helper for checking for atomics
function(check_working_cxx_atomics varname additional_lib)
- include(CheckCXXSourceCompiles)
- include(CMakePushCheckState)
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
set(CMAKE_REQUIRED_LIBRARIES "${additional_lib}")
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
set(CMAKE_REQUIRED_LIBRARIES "${additional_lib}")
# Check availability of features which depend on library versions.
# TODO Ideally use check_symbol_exists() instead, reduce boilerplate.
if(ENABLE_DECODE)
# Check availability of features which depend on library versions.
# TODO Ideally use check_symbol_exists() instead, reduce boilerplate.
if(ENABLE_DECODE)
- include(CheckCSourceCompiles)
- include(CMakePushCheckState)
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES "${PKGDEPS_INCLUDE_DIRS}")
set(CMAKE_REQUIRED_LIBRARIES "sigrokdecode")
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES "${PKGDEPS_INCLUDE_DIRS}")
set(CMAKE_REQUIRED_LIBRARIES "sigrokdecode")
#= System Introspection
#-------------------------------------------------------------------------------
#= System Introspection
#-------------------------------------------------------------------------------
memaccess_check_unaligned_le(HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS)
#===============================================================================
memaccess_check_unaligned_le(HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS)
#===============================================================================