macOS build support
This commit is contained in:
parent
8e39ffc18e
commit
a3fc603dc7
5 changed files with 25 additions and 15 deletions
|
|
@ -2,12 +2,8 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
cd build
|
||||||
cd build
|
make install
|
||||||
make install
|
tar -zcvf "${INSTALL_DIR}.tar.gz" ${INSTALL_DIR}
|
||||||
tar -zcvf "${INSTALL_DIR}.tar.gz" ${INSTALL_DIR}
|
mv "${INSTALL_DIR}.tar.gz" ${TRAVIS_BUILD_DIR}
|
||||||
mv "${INSTALL_DIR}.tar.gz" ${TRAVIS_BUILD_DIR}
|
cd ..
|
||||||
cd ..
|
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
|
||||||
echo "TODO: xcodebuild make install or dmg image?"
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,16 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
mkdir -p build/${INSTALL_DIR} && cd build
|
|
||||||
|
|
||||||
|
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||||
# FIXME: lto error in build when enabled
|
# FIXME: lto error in build when enabled
|
||||||
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=OFF -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=OFF -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||||
mkdir build && cd build
|
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/${INSTALL_DIR} ..
|
||||||
cmake -D SFIZZ_JACK=OFF -G Xcode .. # FIXME: client build
|
make -j$(sysctl -n hw.ncpu)
|
||||||
xcodebuild -project sfizz.xcodeproj -alltargets -configuration Debug build
|
|
||||||
|
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
|
||||||
|
# xcodebuild -project sfizz.xcodeproj -alltargets -configuration Debug build
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,12 @@ set (BUILD_TESTING OFF CACHE BOOL "Disable Abseil's tests [default: OFF]")
|
||||||
set (LV2PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/lv2" CACHE STRING
|
set (LV2PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/lv2" CACHE STRING
|
||||||
"Install destination for LV2 bundle [default: ${CMAKE_INSTALL_PREFIX}/lib/lv2]")
|
"Install destination for LV2 bundle [default: ${CMAKE_INSTALL_PREFIX}/lib/lv2]")
|
||||||
|
|
||||||
|
# On macOS add the needed directories for both library and jack client
|
||||||
|
if (APPLE)
|
||||||
|
include_directories (SYSTEM /usr/local/opt/libsndfile/include)
|
||||||
|
link_directories (/usr/local/opt/libsndfile/lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
option (ENABLE_LTO "Enable Link Time Optimization [default: ON]" ON)
|
option (ENABLE_LTO "Enable Link Time Optimization [default: ON]" ON)
|
||||||
option (SFIZZ_JACK "Enable JACK stand-alone build [default: ON]" ON)
|
option (SFIZZ_JACK "Enable JACK stand-alone build [default: ON]" ON)
|
||||||
option (SFIZZ_LV2 "Enable LV2 plug-in build [default: ON]" ON)
|
option (SFIZZ_LV2 "Enable LV2 plug-in build [default: ON]" ON)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
project (sfizz)
|
project (sfizz)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
include_directories (SYSTEM /usr/local/opt/jack/include)
|
||||||
|
link_directories (/usr/local/opt/jack/lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable (sfizz_jack jack_client.cpp)
|
add_executable (sfizz_jack jack_client.cpp)
|
||||||
target_link_libraries (sfizz_jack sfizz::sfizz jack absl::flags_parse)
|
target_link_libraries (sfizz_jack sfizz::sfizz jack absl::flags_parse)
|
||||||
sfizz_enable_lto_if_needed (sfizz_jack)
|
sfizz_enable_lto_if_needed (sfizz_jack)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ find_package (Threads REQUIRED)
|
||||||
target_link_libraries (sfizz PUBLIC absl::strings)
|
target_link_libraries (sfizz PUBLIC absl::strings)
|
||||||
target_link_libraries (sfizz PRIVATE sndfile absl::flat_hash_map Threads::Threads)
|
target_link_libraries (sfizz PRIVATE sndfile absl::flat_hash_map Threads::Threads)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries (sfizz PUBLIC atomic)
|
target_link_libraries (sfizz PUBLIC atomic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue