mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 08:10:07 +02:00
84 lines
2.7 KiB
Plaintext
84 lines
2.7 KiB
Plaintext
From e0ab2bde670d875a7134b225ec3feda7f8865f2a Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sat, 12 Jan 2019 10:48:33 +0100
|
|
Subject: Build and packaging fixes
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a19593d..ae751c7 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -72,8 +72,12 @@ add_subdirectory(manual)
|
|
#= Dependencies
|
|
#-------------------------------------------------------------------------------
|
|
|
|
+# glibmm uses c++14 features
|
|
+set(CMAKE_CXX_STANDARD 14)
|
|
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
+
|
|
list(APPEND PKGDEPS glib-2.0>=2.28.0)
|
|
-list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
|
|
+list(APPEND PKGDEPS glibmm-2.58>=2.28.0)
|
|
|
|
set(LIBSR_CXX_BINDING "libsigrokcxx>=0.5.1")
|
|
list(APPEND PKGDEPS "${LIBSR_CXX_BINDING}")
|
|
@@ -137,7 +141,6 @@ 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}")
|
|
set(CMAKE_REQUIRED_QUIET 1)
|
|
CHECK_CXX_SOURCE_COMPILES("
|
|
@@ -411,7 +414,6 @@ qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES})
|
|
add_definitions(-DQT_NO_KEYWORDS)
|
|
add_definitions(-D__STDC_LIMIT_MACROS)
|
|
add_definitions(-Wall -Wextra)
|
|
-add_definitions(-std=c++11)
|
|
add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1)
|
|
|
|
if(ENABLE_DECODE)
|
|
@@ -467,6 +469,11 @@ else()
|
|
list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES})
|
|
endif()
|
|
|
|
+if(HAIKU)
|
|
+ # Why do we need to manually link in libsigrok dependencies on Haiku?
|
|
+ list(APPEND PULSEVIEW_LINK_LIBS network usb-1.0 zip ftdi1)
|
|
+endif()
|
|
+
|
|
if(WIN32)
|
|
# On Windows we need to statically link the libqsvg imageformat
|
|
# plugin (and the QtSvg component) for SVG graphics/icons to work.
|
|
@@ -507,12 +514,16 @@ endif()
|
|
#= Installation
|
|
#-------------------------------------------------------------------------------
|
|
|
|
-# Install the executable.
|
|
-install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
|
|
-
|
|
# Install the manpage.
|
|
install(FILES doc/pulseview.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc)
|
|
|
|
+if(HAIKU)
|
|
+install(TARGETS ${PROJECT_NAME} DESTINATION apps/)
|
|
+
|
|
+else()
|
|
+# Install the executable.
|
|
+install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
|
|
+
|
|
# Install the desktop file.
|
|
install(FILES contrib/org.sigrok.PulseView.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
|
|
|
@@ -525,6 +536,7 @@ install(FILES icons/pulseview.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons
|
|
|
|
# Generate Windows installer script.
|
|
configure_file(contrib/pulseview_cross.nsi.in contrib/pulseview_cross.nsi @ONLY)
|
|
+endif()
|
|
|
|
#===============================================================================
|
|
#= Packaging (handled by CPack)
|
|
--
|
|
2.19.1
|
|
|