mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-10 10:33:29 -05:00
first attempt to use cpack()
This commit is contained in:
parent
078012a88f
commit
74ba41a587
185
CMakeLists.txt
185
CMakeLists.txt
@ -1,25 +1,36 @@
|
|||||||
cmake_minimum_required(VERSION 3.1.0)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
|
||||||
# just to be sure that c++11 is fully supported
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
|
|
||||||
message(FATAL_ERROR "SDRangel requires GCC version 4.9 or higher!")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
project(sdrangel)
|
project(sdrangel)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||||
|
|
||||||
|
# disable only when needed
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
# For some external project macros
|
# For some external project macros
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
# configure version
|
# configure version
|
||||||
set(SDRANGEL_VERSION_MAJOR "4")
|
set(sdrangel_VERSION_MAJOR "4")
|
||||||
set(SDRANGEL_VERSION_MINOR "5")
|
set(sdrangel_VERSION_MINOR "5")
|
||||||
set(SDRANGEL_VERSION_PATCH "6")
|
set(sdrangel_VERSION_PATCH "6")
|
||||||
set(SDRANGEL_VERSION_SUFFIX "")
|
set(sdrangel_VERSION_SUFFIX "")
|
||||||
|
|
||||||
|
# Set additional project information
|
||||||
|
set(COMPANY "f4exb")
|
||||||
|
add_definitions("-DCOMPANY=\"${COMPANY}\"")
|
||||||
|
set(APPLICATION_NAME "SDRangel")
|
||||||
|
add_definitions("-DAPPLICATION_NAME=\"${APPLICATION_NAME}\"")
|
||||||
|
set(APPLICATION_MAINTAINER="Edouard Griffiths")
|
||||||
|
set(COPYRIGHT "Copyright (c) 2019 Edouard Griffiths. All rights reserved.")
|
||||||
|
add_definitions("-DCOPYRIGHT=\"${COPYRIGHT}\"")
|
||||||
|
set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}")
|
||||||
|
add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"")
|
||||||
|
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
if(GIT_FOUND)
|
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
|
||||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
|
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
RESULT_VARIABLE res
|
RESULT_VARIABLE res
|
||||||
@ -27,23 +38,34 @@ if(GIT_FOUND)
|
|||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(NOT res)
|
if(NOT res)
|
||||||
set(SDRANGEL_VERSION_SUFFIX "-${out}")
|
set(sdrangel_VERSION_SUFFIX "-${out}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SDRANGEL_VERSION "${SDRANGEL_VERSION_MAJOR}.${SDRANGEL_VERSION_MINOR}.${SDRANGEL_VERSION_PATCH}${SDRANGEL_VERSION_SUFFIX}")
|
set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}")
|
||||||
message(STATUS "SDRAngel Version: ${SDRANGEL_VERSION}")
|
message(STATUS "${APPLICATION_NAME} Version: ${sdrangel_VERSION}")
|
||||||
add_definitions("-DSDRANGEL_LIB_VERSION=\"${SDRANGEL_VERSION_MAJOR}.${SDRANGEL_VERSION_MINOR}.${SDRANGEL_VERSION_PATCH}\"")
|
add_definitions("-DSDRANGEL_LIB_VERSION=\"${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}\"")
|
||||||
add_definitions("-DSDRANGEL_VERSION=\"${SDRANGEL_VERSION}\"")
|
add_definitions("-DSDRANGEL_VERSION=\"${sdrangel_VERSION}\"")
|
||||||
|
|
||||||
set(CPACK_PACKAGE_VERSION "${SDRANGEL_VERSION}")
|
# configure CPACK infomation
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${SDRANGEL_VERSION_MAJOR})
|
set(CPACK_PACKAGE_NAME "${APPLICATION_NAME}")
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${SDRANGEL_VERSION_MINOR})
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube")
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${SDRANGEL_VERSION_PATCH})
|
set(CPACK_PACKAGE_VENDOR "${COMPANY}")
|
||||||
|
set(CPACK_PACKAGE_CONTACT "https://github.com/f4exb/sdrangel")
|
||||||
# disable only when needed
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/Readme.md")
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
set(CPACK_PACKAGE_VERSION "${sdrangel_VERSION}")
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR ${sdrangel_VERSION_MAJOR})
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR ${sdrangel_VERSION_MINOR})
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH ${sdrangel_VERSION_PATCH})
|
||||||
|
set(CPACK_SOURCE_STRIP_FILES true)
|
||||||
|
set(CPACK_STRIP_FILES true)
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${sdrangel_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||||
|
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/Readme.md")
|
||||||
|
set(CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR};/.git/;.gitignore;menu.yml;.travis.yml;.appveyor.yml;default.nix;.envrc;TODOs.org;/.scripts/")
|
||||||
|
set(CPACK_SOURCE_GENERATOR "ZIP;TGZ")
|
||||||
|
set(CPACK_GENERATOR "ZIP;TGZ")
|
||||||
|
|
||||||
# quite unfair with *BSD/...
|
# quite unfair with *BSD/...
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
@ -56,6 +78,7 @@ option(SANITIZE_ADDRESS "Activate memory address sanitization" OFF)
|
|||||||
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" ON)
|
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" ON)
|
||||||
option(BUILD_SERVER "Build Server" ON)
|
option(BUILD_SERVER "Build Server" ON)
|
||||||
option(BUILD_GUI "Build GUI" ON)
|
option(BUILD_GUI "Build GUI" ON)
|
||||||
|
option(BUNDLE "Enable distribution bundle" OFF)
|
||||||
option(FORCE_SSSE3 "Compile with SSSE3 instruction only" OFF)
|
option(FORCE_SSSE3 "Compile with SSSE3 instruction only" OFF)
|
||||||
option(FORCE_SSE41 "Compile with SSE4.1 instruction only" OFF)
|
option(FORCE_SSE41 "Compile with SSE4.1 instruction only" OFF)
|
||||||
option(ENABLE_EXTERNAL_LIBRARIES "Build external libraries" OFF)
|
option(ENABLE_EXTERNAL_LIBRARIES "Build external libraries" OFF)
|
||||||
@ -71,14 +94,12 @@ option(ENABLE_PERSEUS "Enable perseus support" ON)
|
|||||||
option(ENABLE_RTLSDR "Enable rtl-sdr support" ON)
|
option(ENABLE_RTLSDR "Enable rtl-sdr support" ON)
|
||||||
option(ENABLE_SOAPYSDR "Enable SoapySDR support" ON)
|
option(ENABLE_SOAPYSDR "Enable SoapySDR support" ON)
|
||||||
option(ENABLE_XTRX "Enable XTRX support" ON)
|
option(ENABLE_XTRX "Enable XTRX support" ON)
|
||||||
if(APPLE)
|
|
||||||
option(MACOS_BUNDLE "Enable macOS Bundle" OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# if we don't set build_type
|
# if we don't set build_type
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT DEFINED CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
# as default disable qDebug()
|
# as default disable qDebug()
|
||||||
if(NOT DEBUG_OUTPUT)
|
if(NOT DEBUG_OUTPUT)
|
||||||
@ -97,31 +118,20 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|||||||
set(BUILD_PLUGINS_DIR ${CMAKE_BINARY_DIR}/lib/plugins)
|
set(BUILD_PLUGINS_DIR ${CMAKE_BINARY_DIR}/lib/plugins)
|
||||||
set(BUILD_PLUGINSSRV_DIR ${CMAKE_BINARY_DIR}/lib/pluginssrv)
|
set(BUILD_PLUGINSSRV_DIR ${CMAKE_BINARY_DIR}/lib/pluginssrv)
|
||||||
set(INSTALL_BIN_DIR "bin/")
|
set(INSTALL_BIN_DIR "bin/")
|
||||||
set(INSTALL_LIB_DIR "lib/${PROJECT_NAME}")
|
# use only lib when create .app/.dmg
|
||||||
|
if(APPLE AND BUNDLE AND BUILD_GUI)
|
||||||
|
set(INSTALL_LIB_DIR "lib")
|
||||||
|
else()
|
||||||
|
set(INSTALL_LIB_DIR "lib/${CMAKE_PROJECT_NAME}")
|
||||||
|
endif()
|
||||||
set(INSTALL_PLUGINS_DIR ${INSTALL_LIB_DIR}/plugins)
|
set(INSTALL_PLUGINS_DIR ${INSTALL_LIB_DIR}/plugins)
|
||||||
set(INSTALL_PLUGINSSRV_DIR ${INSTALL_LIB_DIR}/pluginssrv)
|
set(INSTALL_PLUGINSSRV_DIR ${INSTALL_LIB_DIR}/pluginssrv)
|
||||||
set(EXTERNAL_BUILD_LIBRARIES "${CMAKE_BINARY_DIR}/external_build")
|
set(EXTERNAL_BUILD_LIBRARIES "${CMAKE_BINARY_DIR}/external_build")
|
||||||
set(EXTERNAL_INSTALL_LIBRARIES "${CMAKE_BINARY_DIR}/external")
|
set(EXTERNAL_INSTALL_LIBRARIES "${CMAKE_BINARY_DIR}/external")
|
||||||
|
|
||||||
if(NOT CMAKE_INSTALL_RPATH)
|
|
||||||
set(CMAKE_INSTALL_RPATH
|
|
||||||
${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} CACHE
|
|
||||||
PATH "Library Install RPath" FORCE)
|
|
||||||
endif(NOT CMAKE_INSTALL_RPATH)
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET, "10.9")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET, "10.9")
|
||||||
set(CMAKE_MACOSX_RPATH ON)
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
|
|
||||||
if(NOT CMAKE_INSTALL_NAME_DIR)
|
|
||||||
set(CMAKE_INSTALL_NAME_DIR
|
|
||||||
${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} CACHE
|
|
||||||
PATH "Library Install Name Destination Directory" FORCE)
|
|
||||||
else()
|
|
||||||
set(CMAKE_INSTALL_NAME_DIR
|
|
||||||
${CMAKE_INSTALL_NAME_DIR}/${PROJECT_NAME} CACHE
|
|
||||||
PATH "Library Install Name Destination Directory" FORCE)
|
|
||||||
endif(NOT CMAKE_INSTALL_NAME_DIR)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@ -184,6 +194,8 @@ set(CMAKE_AUTORCC TRUE)
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# Qt requirements
|
# Qt requirements
|
||||||
|
# TODO check minimum version
|
||||||
|
set(_required_qt_version "5.6.0")
|
||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||||
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||||
find_package(Qt5 COMPONENTS Multimedia REQUIRED)
|
find_package(Qt5 COMPONENTS Multimedia REQUIRED)
|
||||||
@ -331,7 +343,6 @@ if (BUILD_GUI)
|
|||||||
sdrbase
|
sdrbase
|
||||||
sdrgui
|
sdrgui
|
||||||
logging
|
logging
|
||||||
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -353,7 +364,77 @@ if (BUILD_SERVER)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
############ install targets ################
|
############ install/package targets ################
|
||||||
|
if(APPLE AND BUNDLE AND BUILD_GUI)
|
||||||
|
|
||||||
|
# https://cmake.org/cmake/help/v3.0/module/InstallRequiredSystemLibraries.html
|
||||||
|
#CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
||||||
|
|
||||||
|
install(TARGETS sdrangelbench)
|
||||||
|
if (BUILD_SERVER)
|
||||||
|
install(TARGETS sdrangelsrv)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#include(DeployQt)
|
||||||
|
#macdeployqt(sdrangel)
|
||||||
|
|
||||||
|
include(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
|
configure_file("${CMAKE_SOURCE_DIR}/custom/desktop/MacOSXBundleInfo.plist.in"
|
||||||
|
"${CMAKE_BINARY_DIR}/Info.plist" @ONLY)
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR "Bundle")
|
||||||
|
set(CPACK_BINARY_DRAGNDROP ON)
|
||||||
|
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/custom/desktop/sdrangel_icon.icns")
|
||||||
|
set(CPACK_BUNDLE_NAME "${APPLICATION_NAME}")
|
||||||
|
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/custom/desktop/sdrangel_icon.icns")
|
||||||
|
set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/Info.plist")
|
||||||
|
set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}")
|
||||||
|
#set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};lib;/")
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/custom/desktop/sdrangel_icon.icns")
|
||||||
|
|
||||||
|
elseif(LINUX AND BUNDLE)
|
||||||
|
|
||||||
|
# see https://gitlab.kitware.com/cmake/community/wikis/doc/cpack/PackageGenerators
|
||||||
|
list(APPEND CPACK_GENERATOR "DEB")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${APPLICATION_MAINTAINER}")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_SECTION "hamradio")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
|
||||||
|
|
||||||
|
list(APPEND CPACK_GENERATOR "RPM")
|
||||||
|
set(CPACK_RPM_PACKAGE_RELEASE "1")
|
||||||
|
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3.0")
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "libusb")
|
||||||
|
|
||||||
|
elseif((WIN32 OR MINGW) AND BUNDLE)
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||||
|
|
||||||
|
list(APPEND CPACK_GENERATOR "NSIS")
|
||||||
|
set(CPACK_NSIS_PACKAGE_NAME "${APPLICATION_NAME}")
|
||||||
|
set(CPACK_NSIS_CONTACT "${APPLICATION_MAINTAINER}")
|
||||||
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||||
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
|
|
||||||
|
# from https://blog.nathanosman.com/2017/11/24/using-windeployqt-with-cpack.html
|
||||||
|
# DeployQt.cmake
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
if(NOT CMAKE_INSTALL_RPATH)
|
||||||
|
set(CMAKE_INSTALL_RPATH
|
||||||
|
${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} CACHE
|
||||||
|
PATH "Library Install RPath" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# force full path
|
||||||
|
if(APPLE AND NOT CMAKE_INSTALL_NAME_DIR)
|
||||||
|
set(CMAKE_INSTALL_NAME_DIR
|
||||||
|
${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} CACHE
|
||||||
|
PATH "Library Install Name Destination Directory" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR})
|
install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR})
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
install(TARGETS sdrangel DESTINATION ${INSTALL_BIN_DIR})
|
install(TARGETS sdrangel DESTINATION ${INSTALL_BIN_DIR})
|
||||||
@ -364,12 +445,18 @@ endif()
|
|||||||
|
|
||||||
#install files and directories (linux specific)
|
#install files and directories (linux specific)
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
install(DIRECTORY custom/udev-rules DESTINATION share/sdrangel)
|
# TODO remove useless udev
|
||||||
install(FILES custom/udev-rules/install.sh DESTINATION share/sdrangel/udev-rules PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
#install(DIRECTORY custom/udev-rules DESTINATION share/sdrangel)
|
||||||
|
#install(FILES custom/udev-rules/install.sh DESTINATION share/sdrangel/udev-rules PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
install(FILES custom/desktop/sdrangel.desktop DESTINATION share/applications)
|
install(FILES custom/desktop/sdrangel.desktop DESTINATION share/applications)
|
||||||
install(FILES custom/desktop/sdrangel_icon.png DESTINATION share/pixmaps)
|
install(FILES custom/desktop/sdrangel_icon.png DESTINATION share/pixmaps)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "CPack generators: ${CPACK_GENERATOR}")
|
||||||
|
include(CPack)
|
||||||
|
|
||||||
############ uninstall target ################
|
############ uninstall target ################
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/uninstall.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/uninstall.cmake.in"
|
||||||
|
@ -34,8 +34,8 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
|
|||||||
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
||||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||||
*/
|
*/
|
||||||
QCoreApplication::setOrganizationName("f4exb");
|
QCoreApplication::setOrganizationName(COMPANY);
|
||||||
QCoreApplication::setApplicationName("SDRangel");
|
QCoreApplication::setApplicationName(APPLICATION_NAME);
|
||||||
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
|
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
|
||||||
|
Binary file not shown.
@ -58,7 +58,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
|
|||||||
{
|
{
|
||||||
QCoreApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
|
|
||||||
QCoreApplication::setOrganizationName("f4exb");
|
QCoreApplication::setOrganizationName(COMPANY);
|
||||||
QCoreApplication::setApplicationName("SDRangelBench");
|
QCoreApplication::setApplicationName("SDRangelBench");
|
||||||
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
|
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ if(NOT LIBPERSEUS_FOUND)
|
|||||||
set(LIBPERSEUS_FOUND TRUE CACHE INTERNAL "libperseus found")
|
set(LIBPERSEUS_FOUND TRUE CACHE INTERNAL "libperseus found")
|
||||||
message(STATUS "Found libperseus: ${LIBPERSEUS_INCLUDE_DIR}, ${LIBPERSEUS_LIBRARIES}")
|
message(STATUS "Found libperseus: ${LIBPERSEUS_INCLUDE_DIR}, ${LIBPERSEUS_LIBRARIES}")
|
||||||
else(LIBPERSEUS_INCLUDE_DIR AND LIBPERSEUS_LIBRARIES)
|
else(LIBPERSEUS_INCLUDE_DIR AND LIBPERSEUS_LIBRARIES)
|
||||||
set(LIBPERSEUS_FOUND FALSE CACHE INTERNAL "libperseus found")
|
set(LIBPERSEUS_FOUND FALSE CACHE INTERNAL "libperseus not found")
|
||||||
message(STATUS "libperseus not found.")
|
message(STATUS "libperseus not found.")
|
||||||
endif(LIBPERSEUS_INCLUDE_DIR AND LIBPERSEUS_LIBRARIES)
|
endif(LIBPERSEUS_INCLUDE_DIR AND LIBPERSEUS_LIBRARIES)
|
||||||
|
|
||||||
|
42
custom/desktop/MacOSXBundleInfo.plist.in
Normal file
42
custom/desktop/MacOSXBundleInfo.plist.in
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>@PROJECT_NAME@</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>@CPACK_PACKAGE_DESCRIPTION_SUMMARY@</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>@APPLICATION_NAME@.icns</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>@IDENTIFIER@</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string>@CPACK_PACKAGE_VERSION@</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>@CPACK_PACKAGE_NAME@</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>@CPACK_PACKAGE_VERSION@</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>@COPYRIGHT@</string>
|
||||||
|
<key>ForAppStore</key>
|
||||||
|
<string>yes</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.education</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>True</string>
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -74,7 +74,7 @@ void PluginManager::loadPluginsPart(const QString& pluginsSubDir)
|
|||||||
PluginsPath << applicationDirPath + "/lib/" + pluginsSubDir;
|
PluginsPath << applicationDirPath + "/lib/" + pluginsSubDir;
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// on SDRAngel.app
|
// on SDRAngel.app
|
||||||
PluginsPath << applicationDirPath + "/../Frameworks/" + pluginsSubDir;
|
PluginsPath << applicationDirPath + "/../Resources/lib/" + pluginsSubDir;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOTE: exit on the first folder found
|
// NOTE: exit on the first folder found
|
||||||
|
Loading…
Reference in New Issue
Block a user