Browse Source

More tweaks to cmake and macOS framework builds

Signed-off-by: falkTX <falktx@falktx.com>
fix-audiofile-buffering
falkTX 1 year ago
parent
commit
c38ea6ca34
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 72 additions and 17 deletions
  1. +17
    -3
      .github/workflows/cmake.yml
  2. +18
    -14
      cmake/CMakeLists.txt
  3. +37
    -0
      cmake/Info-framework.plist.in

+ 17
- 3
.github/workflows/cmake.yml View File

@@ -12,15 +12,29 @@ env:
DESTDIR: ${{ github.workspace }}/build/tmp

jobs:
macos-11:
runs-on: macos-11
macos-libs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
- name: configure
run: cmake -S cmake -B build
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=OFF
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: install
run: cmake --install build --verbose

macos-frameworks:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
- name: configure
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=ON
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: install


+ 18
- 14
cmake/CMakeLists.txt View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15)
project(carla)

set(PROJECT_VERSION 2.6.0-alpha1)
set(PROJECT_SHORT_VERSION 2.6)
set(PROJECT_SHORT_VERSION 2.5.91)

set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
@@ -50,6 +50,10 @@ if(${CARLA_BUILD_FRAMEWORKS} AND NOT APPLE)
mark_as_advanced(CARLA_BUILD_FRAMEWORKS)
endif()

if(${CARLA_BUILD_FRAMEWORKS})
execute_process(COMMAND "date -u +%y%m%d%H%M%S" OUTPUT_VARIABLE CARLA_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

#######################################################################################################################
# required dependencies

@@ -150,6 +154,7 @@ function(set_common_target_properties TARGET)
$<$<BOOL:${PYQT_FOUND}>:HAVE_PYQT>
$<$<BOOL:${SNDFILE_FOUND}>:HAVE_SNDFILE>
$<$<BOOL:${X11_FOUND}>:HAVE_X11>
$<$<BOOL:${MSVC}>:_USE_MATH_DEFINES>
)

target_compile_options(${TARGET}
@@ -414,11 +419,6 @@ add_library(carla::native-plugins ALIAS carla-native-plugins)

set_common_target_properties(carla-native-plugins)

target_compile_definitions(carla-native-plugins
PRIVATE
$<$<BOOL:${MSVC}>:_USE_MATH_DEFINES>
)

target_include_directories(carla-native-plugins
PRIVATE
../source/includes
@@ -673,11 +673,6 @@ add_library(carla::zita-resampler ALIAS carla-zita-resampler)

set_common_target_properties(carla-zita-resampler)

target_compile_definitions(carla-zita-resampler
PRIVATE
$<$<BOOL:${MSVC}>:_USE_MATH_DEFINES>
)

target_include_directories(carla-zita-resampler
PRIVATE
../source/includes
@@ -844,8 +839,11 @@ if(${CARLA_BUILD_FRAMEWORKS})
FRAMEWORK_VERSION A
OUTPUT_NAME carla-native-plugin
PUBLIC_HEADER "${carla-native-plugin-public-headers}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-framework.plist.in"
MACOSX_FRAMEWORK_IDENTIFIER "studio.kx.carla.native-plugin"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${PROJECT_VERSION}"
MACOSX_FRAMEWORK_BUNDLE_NAME "carla-native-plugin"
MACOSX_FRAMEWORK_BUNDLE_DISPLAY_NAME "Carla Native Plugin"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${CARLA_DATE}"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PROJECT_SHORT_VERSION}"
)
else()
@@ -1012,8 +1010,11 @@ if(${CARLA_BUILD_FRAMEWORKS})
FRAMEWORK_VERSION A
OUTPUT_NAME carla-standalone
PUBLIC_HEADER "${carla-standalone-public-headers}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-framework.plist.in"
MACOSX_FRAMEWORK_IDENTIFIER "studio.kx.carla.standalone"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${PROJECT_VERSION}"
MACOSX_FRAMEWORK_BUNDLE_NAME "carla-standalone"
MACOSX_FRAMEWORK_BUNDLE_DISPLAY_NAME "Carla Standalone"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${CARLA_DATE}"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PROJECT_SHORT_VERSION}"
)
else()
@@ -1158,8 +1159,11 @@ if(${CARLA_BUILD_FRAMEWORKS})
FRAMEWORK_VERSION A
OUTPUT_NAME carla-utils
PUBLIC_HEADER "${carla-utils-public-headers}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-framework.plist.in"
MACOSX_FRAMEWORK_IDENTIFIER "studio.kx.carla.utils"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${PROJECT_VERSION}"
MACOSX_FRAMEWORK_BUNDLE_NAME "carla-utils"
MACOSX_FRAMEWORK_BUNDLE_DISPLAY_NAME "Carla Utils"
MACOSX_FRAMEWORK_BUNDLE_VERSION "${CARLA_DATE}"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PROJECT_SHORT_VERSION}"
)
else()


+ 37
- 0
cmake/Info-framework.plist.in View File

@@ -0,0 +1,37 @@
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>@MACOSX_FRAMEWORK_BUNDLE_DISPLAY_NAME@</string>
<key>CFBundleExecutable</key>
<string>@MACOSX_FRAMEWORK_BUNDLE_NAME@</string>
<key>CFBundleIdentifier</key>
<string>@MACOSX_FRAMEWORK_IDENTIFIER@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleName</key>
<string>@MACOSX_FRAMEWORK_BUNDLE_NAME@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>@MACOSX_FRAMEWORK_BUNDLE_VERSION@</string>
<key>CFBundleShortVersionString</key>
<string>@MACOSX_FRAMEWORK_SHORT_VERSION_STRING@</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>@CMAKE_MACOSX_DEPLOYMENT_TARGET@</string>
<key>NSHumanReadableCopyright</key>
<string>(C) 2011-2023 Filipe Coelho.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version</string>
</dict>
</plist>

Loading…
Cancel
Save