mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-22 23:59:59 +01:00
Compilation for OSX ARM M2
This commit is contained in:
@@ -60,8 +60,12 @@ if(UNIX)
|
|||||||
# the RPATH to be used when installing
|
# the RPATH to be used when installing
|
||||||
set(CMAKE_SKIP_RPATH TRUE)
|
set(CMAKE_SKIP_RPATH TRUE)
|
||||||
set(OpenGL_DIR /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/)
|
set(OpenGL_DIR /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/)
|
||||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
|
# set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||||
|
# set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
|
||||||
|
|
||||||
|
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "12")
|
||||||
|
|
||||||
# CPACK
|
# CPACK
|
||||||
set(CPACK_SYSTEM_NAME "OSX_${CMAKE_OSX_DEPLOYMENT_TARGET}_${CMAKE_OSX_ARCHITECTURES}")
|
set(CPACK_SYSTEM_NAME "OSX_${CMAKE_OSX_DEPLOYMENT_TARGET}_${CMAKE_OSX_ARCHITECTURES}")
|
||||||
@@ -70,7 +74,7 @@ if(UNIX)
|
|||||||
set(APPLE_CODESIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/osx/entitlements.plist")
|
set(APPLE_CODESIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/osx/entitlements.plist")
|
||||||
|
|
||||||
# find icu4c in OSX (pretty well hidden...)
|
# find icu4c in OSX (pretty well hidden...)
|
||||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/icu4c/lib/pkgconfig")
|
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
add_definitions(-DLINUX)
|
add_definitions(-DLINUX)
|
||||||
|
|||||||
@@ -1014,7 +1014,7 @@ void Control::receiveStreamAttribute(const std::string &attribute,
|
|||||||
if (Streaming::manager().enabled()) {
|
if (Streaming::manager().enabled()) {
|
||||||
// Stream request /vimix/stream/request
|
// Stream request /vimix/stream/request
|
||||||
if ( attribute.compare(OSC_STREAM_REQUEST) == 0 ) {
|
if ( attribute.compare(OSC_STREAM_REQUEST) == 0 ) {
|
||||||
int port = 0;
|
osc::int32 port = 0;
|
||||||
const char *label = nullptr;
|
const char *label = nullptr;
|
||||||
// read arguments, port is mandatory, label optionnal
|
// read arguments, port is mandatory, label optionnal
|
||||||
arguments >> port;
|
arguments >> port;
|
||||||
@@ -1023,11 +1023,11 @@ void Control::receiveStreamAttribute(const std::string &attribute,
|
|||||||
else
|
else
|
||||||
arguments >> label >> osc::EndMessage;
|
arguments >> label >> osc::EndMessage;
|
||||||
// remove prevous identical stream
|
// remove prevous identical stream
|
||||||
Streaming::manager().removeStream(sender, port);
|
Streaming::manager().removeStream(sender, (int) port);
|
||||||
// add the requested stream to manager
|
// add the requested stream to manager
|
||||||
std::string clientname = label == nullptr ? sender.substr(0, sender.find_last_of(":")) : label;
|
std::string clientname = label == nullptr ? sender.substr(0, sender.find_last_of(":")) : label;
|
||||||
clientname += " [" + std::to_string(port) + "]";
|
clientname += " [" + std::to_string(port) + "]";
|
||||||
Streaming::manager().addStream(sender, port, clientname);
|
Streaming::manager().addStream(sender, (int) port, clientname);
|
||||||
}
|
}
|
||||||
// Stream disconnection request /vimix/stream/disconnect
|
// Stream disconnection request /vimix/stream/disconnect
|
||||||
else if ( attribute.compare(OSC_STREAM_DISCONNECT) == 0 ) {
|
else if ( attribute.compare(OSC_STREAM_DISCONNECT) == 0 ) {
|
||||||
@@ -1037,10 +1037,10 @@ void Control::receiveStreamAttribute(const std::string &attribute,
|
|||||||
// Port is given: remove stream from that sender at given port
|
// Port is given: remove stream from that sender at given port
|
||||||
try {
|
try {
|
||||||
osc::ReceivedMessageArgumentStream arg = arguments;
|
osc::ReceivedMessageArgumentStream arg = arguments;
|
||||||
int port = 0;
|
osc::int32 port = 0;
|
||||||
arg >> port;
|
arg >> port;
|
||||||
// no exception, remove that port
|
// no exception, remove that port
|
||||||
removed = Streaming::manager().removeStream(sender, port);
|
removed = Streaming::manager().removeStream(sender, (int) port);
|
||||||
// silently ignore any other argument
|
// silently ignore any other argument
|
||||||
}
|
}
|
||||||
catch (osc::WrongArgumentTypeException &) {
|
catch (osc::WrongArgumentTypeException &) {
|
||||||
|
|||||||
Reference in New Issue
Block a user