projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a build issue with std::roundf() on Android.
[pulseview.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index 0d9b455f2316548c71507a746fe95c4e241601e9..45055ab8e66a72f885bdb7580e4e242b44c59817 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)
@@
-68,10
+68,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
+78,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)
@@
-366,14
+362,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
+394,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
+439,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})